]> granicus.if.org Git - llvm/log
llvm
8 years ago[SLPVectorizer] Fix for PR25748: reduction vectorization after loop
Alexey Bataev [Fri, 7 Oct 2016 09:39:22 +0000 (09:39 +0000)]
[SLPVectorizer] Fix for PR25748: reduction vectorization after loop
unrolling.

The next code is not vectorized by the SLPVectorizer:
```
 int test(unsigned int *p) {
  int sum = 0;
  for (int i = 0; i < 8; i++)
    sum += p[i];
  return sum;
 }
```
During optimization this loop is fully unrolled and SLPVectorizer is
unable to vectorize it. Patch tries to fix this problem.

Differential Revision: https://reviews.llvm.org/D24796

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283535 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Don't convert switches to lookup tables of pointers with ROPI/RWPI
Oliver Stannard [Fri, 7 Oct 2016 08:48:24 +0000 (08:48 +0000)]
[ARM] Don't convert switches to lookup tables of pointers with ROPI/RWPI

With the ROPI and RWPI relocation models we can't always have pointers
to global data or functions in constant data, so don't try to convert switches
into lookup tables if any value in the lookup table would require a relocation.
We can still safely emit lookup tables of other values, such as simple
constants.

Differential Revision: https://reviews.llvm.org/D24462

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283530 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse StringRef in ARMELFStreamer (NFC)
Mehdi Amini [Fri, 7 Oct 2016 08:48:07 +0000 (08:48 +0000)]
Use StringRef in ARMELFStreamer (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283529 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix use-after-free in SIOptimizeExecMasking
Nicolai Haehnle [Fri, 7 Oct 2016 08:40:14 +0000 (08:40 +0000)]
AMDGPU: Fix use-after-free in SIOptimizeExecMasking

Summary:
There was a bug with sequences like

   s_mov_b64 s[0:1], exec
   s_and_b64 s[2:3]<def>, s[0:1], s[2:3]<kill>
   ...
   s_mov_b64_term exec, s[2:3]

because s[2:3] was defined and used in the same instruction, ending up with
SaveExecInst inside OtherUseInsts.

Note that the test case also exposes an unrelated bug.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98028

Reviewers: tstellarAMD, arsenm

Subscribers: kzhuravl, wdng, yaxunl, llvm-commits, tony-tye

Differential Revision: https://reviews.llvm.org/D25306

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283528 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse StringReg in TargetParser APIs (NFC)
Mehdi Amini [Fri, 7 Oct 2016 08:37:29 +0000 (08:37 +0000)]
Use StringReg in TargetParser APIs (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283527 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Revert "Add a static_assert to enforce that parameters to llvm::format()...
Mehdi Amini [Fri, 7 Oct 2016 08:25:42 +0000 (08:25 +0000)]
Revert "Revert "Add a static_assert to enforce that parameters to llvm::format() are not totally unsafe""

This reverts commit r283510 and reapply r283509, with updates to
clang-tools-extra as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283525 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Fix patterns for VPMULLD and VPCMPEQQ to not require aligned loads.
Craig Topper [Fri, 7 Oct 2016 06:54:43 +0000 (06:54 +0000)]
[X86] Fix patterns for VPMULLD and VPCMPEQQ to not require aligned loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283524 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Remove unused PatFrags. NFC
Craig Topper [Fri, 7 Oct 2016 06:54:39 +0000 (06:54 +0000)]
[X86] Remove unused PatFrags. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283523 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVR] Add the AVRMCInstLower class
Dylan McKay [Fri, 7 Oct 2016 06:13:09 +0000 (06:13 +0000)]
[AVR] Add the AVRMCInstLower class

Summary:
This class deals with the lowering of CodeGen `MachineInstr` objects to
MC `MCInst` objects.

Reviewers: kparzysz, arsenm

Subscribers: wdng, beanz, japaric, mgorny

Differential Revision: https://reviews.llvm.org/D25269

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283522 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Change check prefix in test
Matt Arsenault [Fri, 7 Oct 2016 03:55:04 +0000 (03:55 +0000)]
AMDGPU: Change check prefix in test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283521 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-opt-report] Left justify unrolling counts, etc.
Hal Finkel [Fri, 7 Oct 2016 02:01:03 +0000 (02:01 +0000)]
[llvm-opt-report] Left justify unrolling counts, etc.

In the left part of the reports, we have things like U<number>; if some of
these numbers use more digits than others, we don't want a space in between the
U and the start of the number. Instead, the space should come afterward. This
way it is clear that the number goes with the U and not any other optimization
indicator that might come later on the line.

Tests committed in r283518.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283519 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-opt-report] Left justify unrolling counts, etc.
Hal Finkel [Fri, 7 Oct 2016 01:57:06 +0000 (01:57 +0000)]
[llvm-opt-report] Left justify unrolling counts, etc.

In the left part of the reports, we have things like U<number>; if some of
these numbers use more digits than others, we don't want a space in between the
U and the start of the number. Instead, the space should come afterward. This
way it is clear that the number goes with the U and not any other optimization
indicator that might come later on the line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283518 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SimplifyCFG] Correctly test for unconditional branches in GetCaseResults
David Majnemer [Fri, 7 Oct 2016 01:38:35 +0000 (01:38 +0000)]
[SimplifyCFG] Correctly test for unconditional branches in GetCaseResults

GetCaseResults assumed that a terminator with one successor was an
unconditional branch.  This is not necessarily the case, it could be a
cleanupret.

Strengthen the check by querying whether or not the terminator is
exceptional.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283517 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-opt-report] Use -no-demangle to disable demangling
Hal Finkel [Fri, 7 Oct 2016 01:30:59 +0000 (01:30 +0000)]
[llvm-opt-report] Use -no-demangle to disable demangling

As this is intended to be a user-facing option, -no-demangle seems much better
than -demangle=0. Add testing for the option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283516 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTarget: Remove unused patterns and transforms. NFC.
Peter Collingbourne [Fri, 7 Oct 2016 00:30:49 +0000 (00:30 +0000)]
Target: Remove unused patterns and transforms. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283515 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] NFC Removing 'V4_' prefix from duplex instruction names.
Colin LeMahieu [Fri, 7 Oct 2016 00:15:07 +0000 (00:15 +0000)]
[Hexagon] NFC Removing 'V4_' prefix from duplex instruction names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283514 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Remove triples from target-independent vectorizer tests. NFC.
Michael Kuperstein [Thu, 6 Oct 2016 23:57:25 +0000 (23:57 +0000)]
[LV] Remove triples from target-independent vectorizer tests. NFC.

Vectorizer tests in the target-independent directory should not have a target
triple. If a test really needs to query a specific backend, it belongs in the
right target subdirectory (which "REQUIRES" the right backend). Otherwise, it
should not specify a triple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283512 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Add a static_assert to enforce that parameters to llvm::format() are not...
Mehdi Amini [Thu, 6 Oct 2016 23:41:49 +0000 (23:41 +0000)]
Revert "Add a static_assert to enforce that parameters to llvm::format() are not totally unsafe"

This reverts commit r283509, clang is hitting the assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283510 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a static_assert to enforce that parameters to llvm::format() are not totally...
Mehdi Amini [Thu, 6 Oct 2016 23:26:29 +0000 (23:26 +0000)]
Add a static_assert to enforce that parameters to llvm::format() are not totally unsafe

Summary:
I had for the second time today a bug where llvm::format("%s", Str)
was called with Str being a StringRef. The Linux and MacOS bots were
fine, but windows having different calling convention, it printed
garbage.

Instead we can catch this at compile-time: it is never expected to
call a C vararg printf-like function with non scalar type I believe.

Reviewers: bogner, Bigcheese, dexonsmith

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25266

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283509 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] NFC. Canonicalizing absolute address instruction names.
Colin LeMahieu [Thu, 6 Oct 2016 23:02:11 +0000 (23:02 +0000)]
[Hexagon] NFC. Canonicalizing absolute address instruction names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283507 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDelete some dead code in SelectionDAG (NFC)
Vedant Kumar [Thu, 6 Oct 2016 22:53:43 +0000 (22:53 +0000)]
Delete some dead code in SelectionDAG (NFC)

Differential Revision: https://reviews.llvm.org/D24435

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283505 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssemby] Implement block signatures.
Dan Gohman [Thu, 6 Oct 2016 22:29:32 +0000 (22:29 +0000)]
[WebAssemby] Implement block signatures.

Per spec changes, this implements block signatures, and adds just enough
logic to produce correct block signatures at the ends of functions.

Differential Revision: https://reviews.llvm.org/D25144

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283503 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Remove loop's bottom label.
Dan Gohman [Thu, 6 Oct 2016 22:10:23 +0000 (22:10 +0000)]
[WebAssembly] Remove loop's bottom label.

Per spec changes, loop constructs no longer have a bottom label.

https://reviews.llvm.org/D25118

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283502 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Remove the output operand from stores.
Dan Gohman [Thu, 6 Oct 2016 22:08:28 +0000 (22:08 +0000)]
[WebAssembly] Remove the output operand from stores.

Per spec changes, store instructions in WebAssembly no longer have a return
value. Update the instruction descriptions.

Differential Revision: https://reviews.llvm.org/D25122

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283501 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPreserve the debug location when CodeGenPrepare sinks a compare instruction into the
Wolfgang Pieb [Thu, 6 Oct 2016 21:43:45 +0000 (21:43 +0000)]
Preserve the debug location when CodeGenPrepare sinks a compare instruction into the
basic block of a user.

Patch by Andrea DiBiagio.

Differential Revision: https://reviews.llvm.org/D24632

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283500 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoHandle *_EXTEND_VECTOR_INREG during Integer Legalization
Pirama Arumuga Nainar [Thu, 6 Oct 2016 21:27:05 +0000 (21:27 +0000)]
Handle *_EXTEND_VECTOR_INREG during Integer Legalization

Summary:
These nodes need legalization for 3-element vectors.  This commit
handles the legalization and adds tests for zext and sext.

This fixes PR30614.

Reviewers: RKSimon, srhines

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25268

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283496 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PGO] Create weak alias for the renamed Comdat function
Rong Xu [Thu, 6 Oct 2016 20:38:13 +0000 (20:38 +0000)]
[PGO] Create weak alias for the renamed Comdat function

Add a weak alias to the renamed Comdat function in IR level instrumentation,
using it's original name. This ensures the same behavior w/ and w/o IR
instrumentation, even for non standard conforming code.

Differential Revision: http://reviews.llvm.org/D25339

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283490 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Preserve BasePtr for LEA64_32r
Michael Kuperstein [Thu, 6 Oct 2016 19:31:27 +0000 (19:31 +0000)]
[X86] Preserve BasePtr for LEA64_32r

When replacing FrameIndex with BasePtr, we must preserve BasePtr for
LEA64_32r since BasePtr is used later for stack adjustment if it is
the same as StackPtr.

Patch by H.J Lu <hjl.tools@gmail.com>

Differential Revision: https://reviews.llvm.org/D23575

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283486 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Add f16/f80/f128 vector sitofp test cases
Simon Pilgrim [Thu, 6 Oct 2016 19:29:25 +0000 (19:29 +0000)]
[X86][SSE] Add f16/f80/f128 vector sitofp test cases

As discussed on D23808

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283485 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[DAG] Generalize build_vector -> vector_shuffle combine for more than 2 inputs
Michael Kuperstein [Thu, 6 Oct 2016 18:58:24 +0000 (18:58 +0000)]
[DAG] Generalize build_vector -> vector_shuffle combine for more than 2 inputs

This generalizes the build_vector -> vector_shuffle combine to support any
number of inputs. The idea is to create a binary tree of shuffles, where
the first layer performs pairwise shuffles of the input vectors placing each
input element into the correct lane, and the rest of the tree blends these
shuffles together.

This doesn't try to be smart and create any sort of "optimal" shuffles.
The assumption is that even a "poor" shuffle sequence is better than extracting
and inserting the elements one by one.

Differential Revision: https://reviews.llvm.org/D24683

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283480 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Add -strip-nonlinetable-debuginfo capability"
Michael Ilseman [Thu, 6 Oct 2016 18:30:26 +0000 (18:30 +0000)]
Revert "Add -strip-nonlinetable-debuginfo capability"

This reverts commit r283473.

Reverted until review is completed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283478 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Don't fold undef uses or copies with implicit uses
Matt Arsenault [Thu, 6 Oct 2016 18:12:13 +0000 (18:12 +0000)]
AMDGPU: Don't fold undef uses or copies with implicit uses

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283476 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Remove scheduling info from si_mask_branch
Matt Arsenault [Thu, 6 Oct 2016 18:12:07 +0000 (18:12 +0000)]
AMDGPU: Remove scheduling info from si_mask_branch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283475 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd -strip-nonlinetable-debuginfo capability
Michael Ilseman [Thu, 6 Oct 2016 17:58:38 +0000 (17:58 +0000)]
Add -strip-nonlinetable-debuginfo capability

This adds a new function to DebugInfo.cpp that takes an llvm::Module
as input and removes all debug info metadata that is not directly
needed for line tables, thus effectively stripping all type and
variable information from the module.

The primary motivation for this feature was the bitcode work flow
(cf. http://lists.llvm.org/pipermail/llvm-dev/2016-June/100643.html
for more background). This is not wired up yet, but will be in
subsequent patches.  For testing, the new functionality is exposed to
opt with a -strip-nonlinetable-debuginfo option.

The secondary use-case (and one that works right now!) is as a
reduction pass in bugpoint. I added two new bugpoint options
(-disable-strip-debuginfo and -disable-strip-debug-types) to control
the new features. By default it will first attempt to remove all debug
information, then only the type info, and then proceed to hack at any
remaining MDNodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283473 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Remove leftover implicit operands when folding immediates
Matt Arsenault [Thu, 6 Oct 2016 17:54:30 +0000 (17:54 +0000)]
AMDGPU: Remove leftover implicit operands when folding immediates

When constant folding an operation to a copy or an immediate
mov, the implicit uses/defs of the old instruction were left behind,
e.g. replacing v_or_b32 left the implicit exec use on the new copy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283471 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReapply "AMDGPU: Support using tablegened MC pseudo expansions"
Matt Arsenault [Thu, 6 Oct 2016 17:19:11 +0000 (17:19 +0000)]
Reapply "AMDGPU: Support using tablegened MC pseudo expansions"

Fix bad merge

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283470 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "AMDGPU: Support using tablegened MC pseudo expansions"
Matt Arsenault [Thu, 6 Oct 2016 17:08:01 +0000 (17:08 +0000)]
Revert "AMDGPU: Support using tablegened MC pseudo expansions"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283469 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Support using tablegened MC pseudo expansions
Matt Arsenault [Thu, 6 Oct 2016 16:56:41 +0000 (16:56 +0000)]
AMDGPU: Support using tablegened MC pseudo expansions

Make the necessary refactorings to make use of PseudoInstExpansion

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283467 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[docs] Add PR to Lexicon
Brian Gesiak [Thu, 6 Oct 2016 16:39:22 +0000 (16:39 +0000)]
[docs] Add PR to Lexicon

Summary:
The acronym PR could be ambiguous to some users, especially those who
are used to interpreting it as GitHub's "pull request".

Reviewers: ddunbar, jordan_rose, void, beanz

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25331

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283465 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoBranchRelaxation: Support expanding unconditional branches
Matt Arsenault [Thu, 6 Oct 2016 16:20:41 +0000 (16:20 +0000)]
BranchRelaxation: Support expanding unconditional branches

AMDGPU needs to expand unconditional branches in a new
block with an indirect branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283464 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Avoid replacing full regs with subregisters in tied operands
Krzysztof Parzyszek [Thu, 6 Oct 2016 16:18:04 +0000 (16:18 +0000)]
[Hexagon] Avoid replacing full regs with subregisters in tied operands

Doing so will result in the two-address pass generating incorrect code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283463 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoBranchRelaxation: Account for function alignment
Matt Arsenault [Thu, 6 Oct 2016 16:00:58 +0000 (16:00 +0000)]
BranchRelaxation: Account for function alignment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283462 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove AArch64BranchRelaxation to generic code
Matt Arsenault [Thu, 6 Oct 2016 15:38:53 +0000 (15:38 +0000)]
Move AArch64BranchRelaxation to generic code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283459 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: Move remaining target specific BranchRelaxation bits to TII
Matt Arsenault [Thu, 6 Oct 2016 15:38:09 +0000 (15:38 +0000)]
AArch64: Move remaining target specific BranchRelaxation bits to TII

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283458 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Fix intel syntax push parsing bug
Nirav Dave [Thu, 6 Oct 2016 15:28:08 +0000 (15:28 +0000)]
[X86] Fix intel syntax push parsing bug

Change erroneous parsing of push immediate instructions in intel syntax
to default to pointer size by rewriting into the ATT style for matching.

This fixes PR22028.

Reviewers: majnemer, rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25288

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283457 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Use StringRef in LTOModule implementation (NFC)"
Mehdi Amini [Thu, 6 Oct 2016 15:12:22 +0000 (15:12 +0000)]
Revert "Use StringRef in LTOModule implementation (NFC)"

This reverts commit r282997, a windows bot is asserting in
one test apparently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283456 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCentralize sh_entsize checking.
Rafael Espindola [Thu, 6 Oct 2016 15:08:10 +0000 (15:08 +0000)]
Centralize sh_entsize checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283455 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRefactor to use getSectionContentsAsArray.
Rafael Espindola [Thu, 6 Oct 2016 14:47:04 +0000 (14:47 +0000)]
Refactor to use getSectionContentsAsArray.

This centralizes quite a bit of error checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283454 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRefactor duplicated typedefs. NFC.
Rafael Espindola [Thu, 6 Oct 2016 14:07:26 +0000 (14:07 +0000)]
Refactor duplicated typedefs. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283453 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoGlobalISel: fix misuse of using declaration in test.
Tim Northover [Thu, 6 Oct 2016 13:57:31 +0000 (13:57 +0000)]
GlobalISel: fix misuse of using declaration in test.

Clang didn't diagnose it before. Oops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283451 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] Disassembler: print label names in branch instructions
Sam Kolton [Thu, 6 Oct 2016 13:46:08 +0000 (13:46 +0000)]
[AMDGPU] Disassembler: print label names in branch instructions

Summary: Add AMDGPUSymbolizer for finding names for labels from ELF symbol table.
Initialize MCObjectFileInfo with some default values.

Reviewers: vpykhtin, artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

Differential Revision: https://reviews.llvm.org/D24802

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283450 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RS4GC] Fix comment to show TODO. NFC
Anna Thomas [Thu, 6 Oct 2016 13:24:20 +0000 (13:24 +0000)]
[RS4GC] Fix comment to show TODO. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283449 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse range loop. NFC.
Rafael Espindola [Thu, 6 Oct 2016 13:11:12 +0000 (13:11 +0000)]
Use range loop. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283447 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RDF] Replace some expensive copies with references in range-based loops
Krzysztof Parzyszek [Thu, 6 Oct 2016 13:05:46 +0000 (13:05 +0000)]
[RDF] Replace some expensive copies with references in range-based loops

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283446 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RDF] Replace potentially unclear autos with real types
Krzysztof Parzyszek [Thu, 6 Oct 2016 13:05:13 +0000 (13:05 +0000)]
[RDF] Replace potentially unclear autos with real types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283445 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-opt-report] Record VF, etc. correctly for multiple opts on one line
Hal Finkel [Thu, 6 Oct 2016 11:58:52 +0000 (11:58 +0000)]
[llvm-opt-report] Record VF, etc. correctly for multiple opts on one line

When there are multiple optimizations on one line, record the vectorization
factors, etc. correctly (instead of incorrectly substituting default values).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283443 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[ARM] Use __rt_div functions for divrem on Windows"
Diana Picus [Thu, 6 Oct 2016 11:24:29 +0000 (11:24 +0000)]
Revert "[ARM] Use __rt_div functions for divrem on Windows"

This reverts commit r283383 because it broke some of the bots:
undefined reference to ` __aeabi_uldivmod'

It affected (at least) clang-cmake-armv7-a15-selfhost,
clang-cmake-armv7-a15-selfhost and clang-native-arm-lnt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283442 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-opt-report] Print line numbers starting from 1
Hal Finkel [Thu, 6 Oct 2016 11:11:11 +0000 (11:11 +0000)]
[llvm-opt-report] Print line numbers starting from 1

Line numbers should start from 1, not 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283440 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTest commit access (NFC)
Henric Karlsson [Thu, 6 Oct 2016 10:58:41 +0000 (10:58 +0000)]
Test commit access (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283439 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Partially fix reported code size for some instructions
Matt Arsenault [Thu, 6 Oct 2016 10:13:23 +0000 (10:13 +0000)]
AMDGPU: Partially fix reported code size for some instructions

These ones need to have the size on the pseudo instruction set for
getInstSizeInBytes to work correctly. These also have a statically
known size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283437 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd test-cases which demontrate pr30561
Zvi Rackover [Thu, 6 Oct 2016 10:04:00 +0000 (10:04 +0000)]
Add test-cases which demontrate pr30561

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283436 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ValueTracking] Teach computeKnownBits and ComputeNumSignBits to look through Extract...
Bjorn Pettersson [Thu, 6 Oct 2016 09:56:21 +0000 (09:56 +0000)]
[ValueTracking] Teach computeKnownBits and ComputeNumSignBits to look through ExtractElement.

Summary:
The computeKnownBits and ComputeNumSignBits functions in ValueTracking can now do a simple look-through of ExtractElement.

Reviewers: majnemer, spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24955

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283434 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[EfficiencySanitizer] Adds shadow memory parameters for 40-bit virtual memory address.
Sagar Thakur [Thu, 6 Oct 2016 09:52:06 +0000 (09:52 +0000)]
[EfficiencySanitizer] Adds shadow memory parameters for 40-bit virtual memory address.

Adding 40-bit shadow memory parameters because MIPS64 uses 40-bit virtual memory addresses.

Reviewed by rengolin.
Differential: https://reviews.llvm.org/D23801

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283433 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix build on cygwin
Nuno Lopes [Thu, 6 Oct 2016 09:32:16 +0000 (09:32 +0000)]
fix build on cygwin
Cygwin has dlfcn.h, but no Dl_info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283427 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Constant pool promotion - fix alignment calculation
James Molloy [Thu, 6 Oct 2016 07:56:00 +0000 (07:56 +0000)]
[ARM] Constant pool promotion - fix alignment calculation

Global variables are GlobalValues, so they have explicit alignment. Querying
DataLayout for the alignment was incorrect.

Testcase added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283423 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Improve testcase for r283323
James Molloy [Thu, 6 Oct 2016 07:44:05 +0000 (07:44 +0000)]
[ARM] Improve testcase for r283323

We can work around a shortcoming of FileCheck by using {{\[}} to match a square
bracket before a [[ sequence.

Thanks to Eli Friedman for the heads up!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283422 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Triple] Add triple for Fuchsia
Petr Hosek [Thu, 6 Oct 2016 05:17:26 +0000 (05:17 +0000)]
[Triple] Add triple for Fuchsia

Fuchsia is a new operating system.

Differential Revision: https://reviews.llvm.org/D25116

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283419 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] be more careful with memory usage, print peak rss in status lines
Kostya Serebryany [Thu, 6 Oct 2016 05:14:00 +0000 (05:14 +0000)]
[libFuzzer] be more careful with memory usage, print peak rss in status lines

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283418 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] Promote uniform i16 bitreverse intrinsic to i32
Konstantin Zhuravlyov [Thu, 6 Oct 2016 02:20:46 +0000 (02:20 +0000)]
[AMDGPU] Promote uniform i16 bitreverse intrinsic to i32

Differential Revision: https://reviews.llvm.org/D25121

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283415 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] when re-running for lsan, don't look at the coverage
Kostya Serebryany [Wed, 5 Oct 2016 23:31:01 +0000 (23:31 +0000)]
[libFuzzer] when re-running for lsan, don't look at the coverage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283411 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[DAG] add tests to show missing checks for SDNode FMF
Sanjay Patel [Wed, 5 Oct 2016 23:20:32 +0000 (23:20 +0000)]
[DAG] add tests to show missing checks for SDNode FMF

The AVX attribute is added to remove noise caused by SSE's destructive insts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283410 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] refactoring to make -shrink=1 work for value profile, added a test.
Kostya Serebryany [Wed, 5 Oct 2016 22:56:21 +0000 (22:56 +0000)]
[libFuzzer] refactoring to make -shrink=1 work for value profile, added a test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283409 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix tests for Windows
Hal Finkel [Wed, 5 Oct 2016 22:48:13 +0000 (22:48 +0000)]
Fix tests for Windows

We need to match file names with both forward and backward slashes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283407 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd missing #include from r283039. Found by modules build.
Richard Smith [Wed, 5 Oct 2016 22:40:54 +0000 (22:40 +0000)]
Add missing #include from r283039. Found by modules build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283405 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] Truncate records to maximum record size near 64KB
Reid Kleckner [Wed, 5 Oct 2016 22:36:07 +0000 (22:36 +0000)]
[codeview] Truncate records to maximum record size near 64KB

If we don't truncate, LLVM asserts when the label difference doesn't fit
in a 16 bit field. This patch truncates two kinds of data: trailing null
terminated names in symbol records, and inline line tables. The inline
line table test that I have is too large (many MB), so I'm not checking
it in.

Hopefully fixes PR28264.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283403 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-opt-report] Distinguish inlined contexts when optimizations differ
Hal Finkel [Wed, 5 Oct 2016 22:25:33 +0000 (22:25 +0000)]
[llvm-opt-report] Distinguish inlined contexts when optimizations differ

How code is optimized sometimes, perhaps often, depends on the context into
which it was inlined. This change allows llvm-opt-report to track the
differences between the optimizations performed, or not, in different contexts,
and when these differ, display those differences.

For example, this code:

  $ cat /tmp/q.cpp
  void bar();
  void foo(int n) {
    for (int i = 0; i < n; ++i)
      bar();
  }

  void quack() {
    foo(4);
  }

  void quack2() {
    foo(4);
  }

will now produce this report:

  < /home/hfinkel/src/llvm/test/tools/llvm-opt-report/Inputs/q.cpp
   2         | void bar();
   3         | void foo(int n) {
   [[
    > foo(int):
   4         |   for (int i = 0; i < n; ++i)
    > quack(), quack2():
   4  U4     |   for (int i = 0; i < n; ++i)
   ]]
   5         |     bar();
   6         | }
   7         |
   8         | void quack() {
   9 I       |   foo(4);
  10         | }
  11         |
  12         | void quack2() {
  13 I       |   foo(4);
  14         | }
  15         |

Note that the tool has demangled the function names, and grouped the reports
associated with line 4. This shows that the loop on line 4 was unrolled by a
factor of 4 when inlined into the functions quack() and quack2(), but not in
the function foo(int) itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283402 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoVerifier: Reject any unknown named MD nodes in the llvm.dbg namespace.
Adrian Prantl [Wed, 5 Oct 2016 22:15:37 +0000 (22:15 +0000)]
Verifier: Reject any unknown named MD nodes in the llvm.dbg namespace.

This came out of a discussion in https://reviews.llvm.org/D25285.

There used to be various other llvm.dbg.* nodes, but we don't support
upgrading them and we want to reserve the namespace for future uses.

This also removes an entirely obsolete and bitrotted testcase for PR7662.

Reapplies 283390 with a forgotten testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283400 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Verifier: Reject any unknown named MD nodes in the llvm.dbg namespace."
Adrian Prantl [Wed, 5 Oct 2016 22:15:34 +0000 (22:15 +0000)]
Revert "Verifier: Reject any unknown named MD nodes in the llvm.dbg namespace."

Forgot to add a testcase in r283390.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283399 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd an llvm-opt-report tool to generate basic source-annotated optimization summaries
Hal Finkel [Wed, 5 Oct 2016 22:10:35 +0000 (22:10 +0000)]
Add an llvm-opt-report tool to generate basic source-annotated optimization summaries

LLVM now has the ability to record information from optimization remarks in a
machine-consumable YAML file for later analysis. This can be enabled in opt
(see r282539), and D25225 adds a Clang flag to do the same. This patch adds
llvm-opt-report, a tool to generate basic optimization "listing" files
(annotated sources with information about what optimizations were performed)
from one of these YAML inputs.

D19678 proposed to add this capability directly to Clang, but this more-general
YAML-based infrastructure was the direction we decided upon in that review
thread.

For this optimization report, I focused on making the output as succinct as
possible while providing information on inlining and loop transformations. The
goal here is that the source code should still be easily readable in the
report. My primary inspiration here is the reports generated by Cray's tools
(http://docs.cray.com/books/S-2496-4101/html-S-2496-4101/z1112823641oswald.html).
These reports are highly regarded within the HPC community. Intel's compiler,
for example, also has an optimization-report capability
(https://software.intel.com/sites/default/files/managed/55/b1/new-compiler-optimization-reports.pdf).

  $ cat /tmp/v.c
  void bar();
  void foo() { bar(); }

  void Test(int *res, int *c, int *d, int *p, int n) {
    int i;

  #pragma clang loop vectorize(assume_safety)
    for (i = 0; i < 1600; i++) {
      res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
    }

    for (i = 0; i < 16; i++) {
      res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
    }

    foo();

    foo(); bar(); foo();
  }

D25225 adds -fsave-optimization-record (and
-fsave-optimization-record=filename), and this would be used as follows:

  $ clang -O3 -o /tmp/v.o -c /tmp/v.c -fsave-optimization-record
  $ llvm-opt-report /tmp/v.yaml > /tmp/v.lst
  $ cat /tmp/v.lst

  < /tmp/v.c
   2          | void bar();
   3          | void foo() { bar(); }
   4          |
   5          | void Test(int *res, int *c, int *d, int *p, int n) {
   6          |   int i;
   7          |
   8          | #pragma clang loop vectorize(assume_safety)
   9     V4,2 |   for (i = 0; i < 1600; i++) {
  10          |     res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
  11          |   }
  12          |
  13  U16     |   for (i = 0; i < 16; i++) {
  14          |     res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
  15          |   }
  16          |
  17 I        |   foo();
  18          |
  19          |   foo(); bar(); foo();
     I        |   ^
     I        |                 ^
  20          | }

Each source line gets a prefix giving the line number, and a few columns for
important optimizations: inlining, loop unrolling and loop vectorization. An
'I' is printed next to a line where a function was inlined, a 'U' next to an
unrolled loop, and 'V' next to a vectorized loop. These are printed on the
relevant code line when that seems unambiguous, or on subsequent lines when
multiple potential options exist (messages, both positive and negative, from
the same optimization with different column numbers are taken to indicate
potential ambiguity). When on subsequent lines, a '^' is output in the relevant
column.

Annotated source for all relevant input files are put into the listing file
(each starting with '<' and then the file name).

You can disable having the unrolling/vectorization factors appear by using the
-s flag.

Differential Revision: https://reviews.llvm.org/D25262

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283398 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove extra semicolon
Reid Kleckner [Wed, 5 Oct 2016 21:46:56 +0000 (21:46 +0000)]
Remove extra semicolon

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283395 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix the build with MSVC 2013, still cannot default move ctors yet
Reid Kleckner [Wed, 5 Oct 2016 21:44:46 +0000 (21:44 +0000)]
Fix the build with MSVC 2013, still cannot default move ctors yet

Ten days.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283394 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[DAG] change test to use 'unsafe' function attribute instead of global setting
Sanjay Patel [Wed, 5 Oct 2016 21:43:50 +0000 (21:43 +0000)]
[DAG] change test to use 'unsafe' function attribute instead of global setting

But we have node-level FMF, so the next step is to fix this at the instruction/node-level.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283393 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoModify df_iterator to support post-order actions
David Callahan [Wed, 5 Oct 2016 21:36:16 +0000 (21:36 +0000)]
Modify df_iterator to support post-order actions

Summary: This makes a change to the state used to maintain visited information for depth first iterator. We know assume a method "completed(...)" which is called after all children of a node have been visited. In all existing cases, this method does nothing so this patch has no functional changes.  It will however allow a client to distinguish back from cross edges in a DFS tree.

Reviewers: nadav, mehdi_amini, dberlin

Subscribers: MatzeB, mzolotukhin, twoh, freik, llvm-commits

Differential Revision: https://reviews.llvm.org/D25191

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283391 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoVerifier: Reject any unknown named MD nodes in the llvm.dbg namespace.
Adrian Prantl [Wed, 5 Oct 2016 21:31:19 +0000 (21:31 +0000)]
Verifier: Reject any unknown named MD nodes in the llvm.dbg namespace.

This came out of a discussion in https://reviews.llvm.org/D25285.

There used to be various other llvm.dbg.* nodes, but we don't support
upgrading them and we want to reserve the namespace for future uses.

This also removes an entirely obsolete and bitrotted testcase for PR7662.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283390 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Add binary-encoding opcode values to instruction descriptions.
Dan Gohman [Wed, 5 Oct 2016 21:24:08 +0000 (21:24 +0000)]
[WebAssembly] Add binary-encoding opcode values to instruction descriptions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283389 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] Translate bitpiece metadata to DEFRANGE_SUBFIELD* records
Reid Kleckner [Wed, 5 Oct 2016 21:21:33 +0000 (21:21 +0000)]
[codeview] Translate bitpiece metadata to DEFRANGE_SUBFIELD* records

This allows LLVM to describe locations of aggregate variables that have
been split by SROA.

Fixes PR29141

Reviewers: amccarth, majnemer

Differential Revision: https://reviews.llvm.org/D25253

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283388 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Object] Fix a crash in Archive::child_iterator's default constructor.
Lang Hames [Wed, 5 Oct 2016 21:20:00 +0000 (21:20 +0000)]
[Object] Fix a crash in Archive::child_iterator's default constructor.

To be default constructible, Archive::child_iterator needs to be able to
construct an Archive::Child with a null parent, however Archive::Child's
constructor always dereferenced its Parent argument to compute the remaining
archive size. This commit fixes Archive::Child's constructor to only do the
size calculation when the parent is non-null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283387 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Use __rt_div functions for divrem on Windows
Martin Storsjo [Wed, 5 Oct 2016 21:08:02 +0000 (21:08 +0000)]
[ARM] Use __rt_div functions for divrem on Windows

This avoids falling back to calling out to the GCC rem functions
(__moddi3, __umoddi3) when targeting Windows.

The __rt_div functions have flipped the two arguments compared
to the __aeabi_divmod functions. To match MSVC, we emit a
check for division by zero before actually calling the library
function (even if the library function itself also might do
the same check).

Not all calls to __rt_div functions for division are currently
merged with calls to the same function with the same parameters
for the remainder. This is more wasteful than a div + mls as before,
but avoids calls to __moddi3.

Differential Revision: https://reviews.llvm.org/D24076

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283383 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sparc] Implement UMUL_LOHI and SMUL_LOHI instead of MULHS/MULHU/MUL.
James Y Knight [Wed, 5 Oct 2016 20:54:17 +0000 (20:54 +0000)]
[Sparc] Implement UMUL_LOHI and SMUL_LOHI instead of MULHS/MULHU/MUL.

This is what the instruction-set actually provides, and the default
expansions of the others into the lohi opcodes are good.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283381 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ADT] Add missing const_iterator DenseSet::find() const
Vitaly Buka [Wed, 5 Oct 2016 20:36:39 +0000 (20:36 +0000)]
[ADT] Add missing const_iterator DenseSet::find() const

Summary: Probably overlooked.

Reviewers: eugenis, dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24689

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283377 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[asan] Reapply: Switch to using dynamic shadow offset on iOS
Anna Zaks [Wed, 5 Oct 2016 20:34:13 +0000 (20:34 +0000)]
[asan] Reapply: Switch to using dynamic shadow offset on iOS

The VM layout is not stable between iOS version releases, so switch to dynamic shadow offset.

This is the LLVM counterpart of https://reviews.llvm.org/D25218

Differential Revision: https://reviews.llvm.org/D25219

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283376 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoImprove the debug-info test created in r274263.
Yunzhong Gao [Wed, 5 Oct 2016 20:26:29 +0000 (20:26 +0000)]
Improve the debug-info test created in r274263.

This patch is related to r274263 or Phabricator/D21818.
This patch aims to improve the test case added in the previous commit to verify
specifically that the stack protector pass is adding the debug line info as
intended. Before, the test only verified that the verifier pass does not crash.
The current approach is to generate the assembly output and then look for the
.loc directive.

Differential Revision: https://reviews.llvm.org/D25290

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283374 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Pass profitability analysis in vectorizer constructor (NFC)
Matthew Simpson [Wed, 5 Oct 2016 20:23:46 +0000 (20:23 +0000)]
[LV] Pass profitability analysis in vectorizer constructor (NFC)

The vectorizer already holds a pointer to one cost model artifact in a member
variable (i.e., MinBWs). As we add more, it will be easier to communicate these
artifacts to the vectorizer if we simply pass a pointer to the cost model
instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283373 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RDF] Fix live def propagation through basic block
Krzysztof Parzyszek [Wed, 5 Oct 2016 20:08:09 +0000 (20:08 +0000)]
[RDF] Fix live def propagation through basic block

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283371 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Do not re-use tmpreg in spill/restore lowering
Matthias Braun [Wed, 5 Oct 2016 20:02:51 +0000 (20:02 +0000)]
AMDGPU: Do not re-use tmpreg in spill/restore lowering

The register scavenging code does not support multiple definitions of
the same vreg.

Differential Revision: https://reviews.llvm.org/D25220

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283369 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Pass legality analysis in vectorizer constructor (NFC)
Matthew Simpson [Wed, 5 Oct 2016 19:53:20 +0000 (19:53 +0000)]
[LV] Pass legality analysis in vectorizer constructor (NFC)

The vectorizer already holds a pointer to the legality analysis in a member
variable, so it makes sense that we would pass it in the constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283368 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFastISel: Remove unused/un-overridden entry points. NFCI.
Peter Collingbourne [Wed, 5 Oct 2016 19:25:20 +0000 (19:25 +0000)]
FastISel: Remove unused/un-overridden entry points. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283366 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Remove obsolete comment (NFC)
Matthew Simpson [Wed, 5 Oct 2016 19:19:49 +0000 (19:19 +0000)]
[LV] Remove obsolete comment (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283365 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Use getScalarizationOverhead in memory instruction costs (NFC)
Matthew Simpson [Wed, 5 Oct 2016 19:11:54 +0000 (19:11 +0000)]
[LV] Use getScalarizationOverhead in memory instruction costs (NFC)

This patch refactors the cost estimation of scalarized loads and stores to
reuse getScalarizationOverhead for the cost of the extractelement and
insertelement instructions we might create. The existing code accounted for
this cost, but it was functionally equivalent to the helper function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283364 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix documentation comments; NFC
Sanjay Patel [Wed, 5 Oct 2016 18:51:12 +0000 (18:51 +0000)]
fix documentation comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283361 91177308-0d34-0410-b5e6-96231b3b80d8