OSDN Git Service

android-x86/external-llvm.git
8 years ago[PGO] Add another interface for annotateValueSite
Rong Xu [Fri, 12 Feb 2016 21:36:17 +0000 (21:36 +0000)]
[PGO] Add another interface for annotateValueSite

Add another interface to function annotateValueSite() which directly uses the
VauleData array.

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

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

8 years ago[WebAssembly] Fix byval for empty types.
Dan Gohman [Fri, 12 Feb 2016 21:30:18 +0000 (21:30 +0000)]
[WebAssembly] Fix byval for empty types.

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

8 years ago[AArch64] Enable post-RA MI scheduler for Kryo.
Chad Rosier [Fri, 12 Feb 2016 21:27:33 +0000 (21:27 +0000)]
[AArch64] Enable post-RA MI scheduler for Kryo.

This should have landed in r260686.

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

8 years ago[WebAssembly] Fix insertion of a BLOCK in a loop header that also ends a BLOCK.
Dan Gohman [Fri, 12 Feb 2016 21:19:25 +0000 (21:19 +0000)]
[WebAssembly] Fix insertion of a BLOCK in a loop header that also ends a BLOCK.

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

8 years ago[WinEH] Prevent EH state numbering from skipping nested cleanup pads that never return
Andrew Kaylor [Fri, 12 Feb 2016 21:10:16 +0000 (21:10 +0000)]
[WinEH] Prevent EH state numbering from skipping nested cleanup pads that never return

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

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

8 years ago[LIR] Allow merging of memsets in negatively strided loops.
Chad Rosier [Fri, 12 Feb 2016 21:03:23 +0000 (21:03 +0000)]
[LIR] Allow merging of memsets in negatively strided loops.

Last part of PR25166.

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

8 years agoFix typo in comment.
Justin Lebar [Fri, 12 Feb 2016 21:01:37 +0000 (21:01 +0000)]
Fix typo in comment.

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

8 years ago[SimplifyCFG] Don't fold conditional branches that contain calls to convergent functions.
Justin Lebar [Fri, 12 Feb 2016 21:01:36 +0000 (21:01 +0000)]
[SimplifyCFG] Don't fold conditional branches that contain calls to convergent functions.

Summary:
Performing this optimization duplicates the call to the convergent
function and adds new control-flow dependencies, which is a no-no.

Reviewers: jingyue

Subscribers: broune, hfinkel, tra, resistor, joker.eph, arsenm, llvm-commits, mzolotukhin

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

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

8 years ago[LoopRotate] Don't perform loop rotation if the loop header calls a convergent function.
Justin Lebar [Fri, 12 Feb 2016 21:01:33 +0000 (21:01 +0000)]
[LoopRotate] Don't perform loop rotation if the loop header calls a convergent function.

Summary:
Calls to convergent functions can be duplicated, but only if the
duplicates are not control-flow dependent on any additional values.
Loop rotation doesn't meet the bar.

Reviewers: jingyue

Subscribers: mzolotukhin, llvm-commits, arsenm, joker.eph, resistor, tra, hfinkel, broune

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

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

8 years agoAdd convergent property to CodeMetrics.
Justin Lebar [Fri, 12 Feb 2016 21:01:31 +0000 (21:01 +0000)]
Add convergent property to CodeMetrics.

Summary: No functional changes.

Reviewers: jingyue, arsenm

Subscribers: arsenm, llvm-commits

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

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

8 years agoInitialize CodeMetrics' member variables inline with definitions.
Justin Lebar [Fri, 12 Feb 2016 20:59:20 +0000 (20:59 +0000)]
Initialize CodeMetrics' member variables inline with definitions.

Summary: No functional changes.

Reviewers: jingyue

Subscribers: llvm-commits

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

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

8 years ago[Hexagon] Recognize more instructions in isLoadFromStackSlot/isStoreToStackSlot
Krzysztof Parzyszek [Fri, 12 Feb 2016 20:54:15 +0000 (20:54 +0000)]
[Hexagon] Recognize more instructions in isLoadFromStackSlot/isStoreToStackSlot

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

8 years agoGet rid of some GLOBAL_ISEL ifdefs that should be harmless for code size.
Quentin Colombet [Fri, 12 Feb 2016 20:41:24 +0000 (20:41 +0000)]
Get rid of some GLOBAL_ISEL ifdefs that should be harmless for code size.
More to come, but those were easy.

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

8 years agoRemove unused variable
David Majnemer [Fri, 12 Feb 2016 20:33:51 +0000 (20:33 +0000)]
Remove unused variable

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

8 years agoRemove LLVMGetTargetMachineData leftovers.
Benjamin Kramer [Fri, 12 Feb 2016 20:26:46 +0000 (20:26 +0000)]
Remove LLVMGetTargetMachineData leftovers.

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

8 years ago[ADT] Revert the llvm/ADT/OptionSet.h header and unit test.
Argyrios Kyrtzidis [Fri, 12 Feb 2016 19:47:35 +0000 (19:47 +0000)]
[ADT] Revert the llvm/ADT/OptionSet.h header and unit test.

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

8 years ago[GVN] Common code for local and non-local load availability [NFCI]
Philip Reames [Fri, 12 Feb 2016 19:24:57 +0000 (19:24 +0000)]
[GVN] Common code for local and non-local load availability [NFCI]

The attached patch removes all of the block local code for performing X-load forwarding by reusing the code used in the non-local case.

The motivation here is to remove duplication and in the process increase our test coverage of some fairly tricky code. I have some upcoming changes I'll be proposing in this area and wanted to have the code cleaned up a bit first.

Note: The review for this mostly happened in email which didn't make it to phabricator on the 258882 commit thread.

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

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

8 years ago[LIR] Partially revert r252926(NFC), which introduced a very subtle change.
Chad Rosier [Fri, 12 Feb 2016 19:05:27 +0000 (19:05 +0000)]
[LIR] Partially revert r252926(NFC), which introduced a very subtle change.

In short, before r252926 we were comparing an unsigned (StoreSize) against an a
APInt (Stride), which is fine and well.  After we were zero extending the Stride
and then converting to an unsigned, which is not the same thing.  Obviously,
Stides can also be negative.  This commit just restores the original behavior.

AFAICT, it's not possible to write a test case to expose the issue because
the code already has checks to make sure the StoreSize can't overflow an
unsigned (which prevents the Stride from overflowing an unsigned as well).

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

8 years ago[LVI] Exploit nsw/nuw when computing constant ranges
Philip Reames [Fri, 12 Feb 2016 19:05:16 +0000 (19:05 +0000)]
[LVI] Exploit nsw/nuw when computing constant ranges

As the title says. Modelled after similar code in SCEV.

This is useful when analysing induction variables in loops which have been canonicalized by other passes. I wrote the tests as non-loops specifically to avoid the generality introduced in http://reviews.llvm.org/D17174. While that can handle many induction variables without *needing* to exploit nsw, there's no reason not to use it if we've already proven it.

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

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

8 years ago[CMake] don't build libLTO when LLVM_ENABLE_PIC is OFF
Hans Wennborg [Fri, 12 Feb 2016 19:02:39 +0000 (19:02 +0000)]
[CMake] don't build libLTO when LLVM_ENABLE_PIC is OFF

When cmake is run with -DLLVM_ENABLE_PIC=OFF, build fails while
linking shared library libLTO.so, because its dependencies are built
with -fno-PIC. More details here: https://llvm.org/bugs/show_bug.cgi?id=26484.
This diff reverts r252652 (git 9fd4377ddb83aee3c049dc8757e7771edbb8ee71),
which removed check NOT LLVM_ENABLE_PIC before disabling build for libLTO.so.

Patch by Igor Sugak!

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

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

8 years agoGlobalISel is always built since r260566, reflect it in LLVMBuild.txt
Mehdi Amini [Fri, 12 Feb 2016 18:43:14 +0000 (18:43 +0000)]
GlobalISel is always built since r260566, reflect it in LLVMBuild.txt

Other component could not depends on an optional library in llvm-config

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agollvm-config: replace assertions with a helpful error message
Mehdi Amini [Fri, 12 Feb 2016 18:43:10 +0000 (18:43 +0000)]
llvm-config: replace assertions with a helpful error message

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years ago[Hexagon] Add utility functions to detect sign- and zero-extending loads
Krzysztof Parzyszek [Fri, 12 Feb 2016 18:37:23 +0000 (18:37 +0000)]
[Hexagon] Add utility functions to detect sign- and zero-extending loads

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

8 years ago[Hexagon] Replace expansion of spill pseudo-instructions in frame lowering
Krzysztof Parzyszek [Fri, 12 Feb 2016 18:19:53 +0000 (18:19 +0000)]
[Hexagon] Replace expansion of spill pseudo-instructions in frame lowering

Rewrite the code to handle all pseudo-instructions in a single pass.

This temporarily reverts spill slot optimization that used general-
purpose registers to hold values of spilled predicate registers.

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

8 years ago[InstCombine] Don't aggressively replace xor with icmp
David Majnemer [Fri, 12 Feb 2016 18:12:38 +0000 (18:12 +0000)]
[InstCombine] Don't aggressively replace xor with icmp

For some cases, InstCombine replaces the sequence of xor/sub instruction
followed by cmp instruction into a single cmp instruction.

However, this replacement may result suboptimal result especially when
the xor/sub has more than one use, as discussed in
bug 26465 (https://llvm.org/bugs/show_bug.cgi?id=26465).

This patch make the replacement happen only when xor/sub has only one
use.

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

Patch by Taewook Oh!

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

8 years ago[AMDGPU] Assembler: Swap operands of flat_store instructions to match AMD assembler
Tom Stellard [Fri, 12 Feb 2016 17:57:54 +0000 (17:57 +0000)]
[AMDGPU] Assembler: Swap operands of flat_store instructions to match AMD assembler

Historically, AMD internal sp3 assembler has flat_store* addr, data
format. To match existing code and to enable reuse, change LLVM
definitions to match.  Also update MC and CodeGen tests.

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

Patch by: Nikolay Haustov

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

8 years agoAMDGPU/SI: Annotate Loops with Constant Condition in SIAnnotateControlFlow pass.
Changpeng Fang [Fri, 12 Feb 2016 17:11:04 +0000 (17:11 +0000)]
AMDGPU/SI: Annotate Loops with Constant Condition in SIAnnotateControlFlow pass.

Summary:
  It is possible that the loop condition can be a boolean constant (infinite loop,
for example). So we sould handle constant condition in annotating a loop. This
patch adds this functionality to support annotating constant condition.

Reviewers: tstellarAMD, arsenm

Subscribers: llvm-commits, arsenm

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

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

8 years ago[Hexagon] Remove HexagonExpandPredSpillCode pass
Krzysztof Parzyszek [Fri, 12 Feb 2016 17:09:58 +0000 (17:09 +0000)]
[Hexagon] Remove HexagonExpandPredSpillCode pass

This code is dead. The expansion is now done in HexagonFrameLowering.

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

8 years ago[Hexagon] Eliminate pseudo instructions for circ/brev loads and stores
Krzysztof Parzyszek [Fri, 12 Feb 2016 17:01:51 +0000 (17:01 +0000)]
[Hexagon] Eliminate pseudo instructions for circ/brev loads and stores

We can generate the actual instructions from the intrinsics without the
need for pseudo-instructions. Also, since the intrinsics have a side-
effect in a form of a store, attempt to optimize away loads from the
store location.

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

8 years ago[AArch64] Reduce number of callee-save save/restores.
Geoff Berry [Fri, 12 Feb 2016 16:31:41 +0000 (16:31 +0000)]
[AArch64] Reduce number of callee-save save/restores.

Summary:
Before this change, callee-save registers would be rounded up to even
pairs of GPRs and FPRs.  This change eliminates these extra padding
load/stores, though it does keep the stack allocation the same size
unless both the GPR and FPR sets have an odd size, in which case one
full pair stack slot (16 bytes) is saved.

This optimization cannot currently be done for MachO targets since they
rely on a fast-path .debug_frame equivalent that can only encode
callee-save registers as pairs.

Reviewers: t.p.northover, rengolin, mcrosier, jmolloy

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

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

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

8 years ago[Hexagon] Handle out-of-range offsets in eliminateFrameIndex
Krzysztof Parzyszek [Fri, 12 Feb 2016 16:27:23 +0000 (16:27 +0000)]
[Hexagon] Handle out-of-range offsets in eliminateFrameIndex

Create a virtual register that will hold the actual address and use it
with the offset of 0 in the place of the original FI.

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

8 years ago[AArch64] Add support for Qualcomm Kryo CPU.
Chad Rosier [Fri, 12 Feb 2016 15:51:51 +0000 (15:51 +0000)]
[AArch64] Add support for Qualcomm Kryo CPU.

Machine model description by Dave Estes <cestes@codeaurora.org>.

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

8 years agoDelete the deprecated LLVMLinkModules.
Rafael Espindola [Fri, 12 Feb 2016 15:28:45 +0000 (15:28 +0000)]
Delete the deprecated LLVMLinkModules.

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

8 years ago[AArch64] Merge two adjacent str WZR into str XZR
Jun Bum Lim [Fri, 12 Feb 2016 15:25:39 +0000 (15:25 +0000)]
[AArch64] Merge two adjacent str WZR into str XZR

Summary:
This change merges adjacent 32 bit zero stores into a 64 bit zero store.
e.g.,
  str wzr, [x0]
  str wzr, [x0, #4]
becomes
  str xzr, [x0]

Therefore, four adjacent 32 bit zero stores will be a single stp.
e.g.,
  str wzr, [x0]
  str wzr, [x0, #4]
  str wzr, [x0, #8]
  str wzr, [x0, #12]
becomes
  stp xzr, xzr, [x0]

Reviewers: mcrosier, jmolloy, gberry, t.p.northover

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

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

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

8 years ago[Hexagon] Specify vector alignment in DataLayout string
Krzysztof Parzyszek [Fri, 12 Feb 2016 14:47:38 +0000 (14:47 +0000)]
[Hexagon] Specify vector alignment in DataLayout string

The DataLayout can calculate alignment of vectors based on the alignment
of the element type and the number of elements. In fact, it is the product
of these two values. The problem is that for vectors of N x i1, this will
return the alignment of N bytes, since the alignment of i1 is 8 bits. The
vector types of vNi1 should be aligned to N bits instead. Provide explicit
alignment for HVX vectors to avoid such complications.

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

8 years agoFix uninitialized memory read.
Benjamin Kramer [Fri, 12 Feb 2016 12:37:21 +0000 (12:37 +0000)]
Fix uninitialized memory read.

Found by msan.

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

8 years ago[mips][micromips] Written missing test for CEIL.L.S, CEIL.L.D, FLOOR.L.S and FLOOR...
Hrvoje Varga [Fri, 12 Feb 2016 12:11:26 +0000 (12:11 +0000)]
[mips][micromips] Written missing test for CEIL.L.S, CEIL.L.D, FLOOR.L.S and FLOOR.L.D instructions
Differential Revision: http://reviews.llvm.org/D17192

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

8 years agoRemove LLVMGetTargetMachineData in go-binding.
Haojian Wu [Fri, 12 Feb 2016 11:35:11 +0000 (11:35 +0000)]
Remove LLVMGetTargetMachineData in go-binding.

Summary:
LLVMGetTargetMachineData has been removed, and LLVMGetDataLayout is
suggested to use. The LLVMGetDataLayout is exposed in go bindings.
So it's safe to remove the function.

Reviewers: bkramer

Subscribers: llvm-commits, axw

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

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

8 years ago[attrs] Simplify the convergent removal to directly use the pre-built
Chandler Carruth [Fri, 12 Feb 2016 09:47:49 +0000 (09:47 +0000)]
[attrs] Simplify the convergent removal to directly use the pre-built
node set rather than walking the SCC directly.

This directly exposes the functions and has already had null entries
filtered out. We also don't need need to handle optnone as it has
already been handled in the caller -- we never try to remove convergent
when there are optnone functions in the SCC.

With this change, the code for removing convergent should work with the
new pass manager and a different SCC analysis.

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

8 years ago[attrs] Consolidate the test for a non-SCC, non-convergent function call
Chandler Carruth [Fri, 12 Feb 2016 09:23:53 +0000 (09:23 +0000)]
[attrs] Consolidate the test for a non-SCC, non-convergent function call
with the test for a non-convergent intrinsic call.

While it is possible to use the call records to search for function
calls, we're going to do an instruction scan anyways to find the
intrinsics, we can handle both cases while scanning instructions. This
will also make the logic more amenable to the new pass manager which
doesn't use the same call graph structure.

My next patch will remove use of CallGraphNode entirely and allow this
code to work with both the old and new pass manager. Fortunately, it
should also get strictly simpler without changing functionality.

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

8 years ago[unittests/ADT] OptionSetTest: ifdef out for now a specific test that fails on MSVC.
Argyrios Kyrtzidis [Fri, 12 Feb 2016 07:50:01 +0000 (07:50 +0000)]
[unittests/ADT] OptionSetTest: ifdef out for now a specific test that fails on MSVC.

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

8 years agoAMDGPU: Set flat_scratch from flat_scratch_init reg
Matt Arsenault [Fri, 12 Feb 2016 06:31:30 +0000 (06:31 +0000)]
AMDGPU: Set flat_scratch from flat_scratch_init reg

This was hardcoded to the static private size, but this
would be missing the offset and additional size for someday
when we have dynamic sizing.

Also stops always initializing flat_scratch even when unused.

In the future we should stop emitting this unless flat instructions
are used to access private memory. For example this will initialize
it almost always on VI because flat is used for global access.

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

8 years agoC API: Remove LLVMGetDataLayout that was deprecated in 3.7
Mehdi Amini [Fri, 12 Feb 2016 06:22:00 +0000 (06:22 +0000)]
C API: Remove LLVMGetDataLayout that was deprecated in 3.7

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoFix minor error with debug info doc.
Mark Lacey [Fri, 12 Feb 2016 06:19:16 +0000 (06:19 +0000)]
Fix minor error with debug info doc.

Replace 'third' with 'fourth' in the description of the fourth argument.

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

8 years ago[unittests/ADT] OptionSetTest: ifdef out a part that fails to compile on MSVC.
Argyrios Kyrtzidis [Fri, 12 Feb 2016 05:52:37 +0000 (05:52 +0000)]
[unittests/ADT] OptionSetTest: ifdef out a part that fails to compile on MSVC.

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

8 years ago[ADT] OptionSet: ifdef out some code that seems to be crashing MSVC.
Argyrios Kyrtzidis [Fri, 12 Feb 2016 04:36:48 +0000 (04:36 +0000)]
[ADT] OptionSet: ifdef out some code that seems to be crashing MSVC.

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

8 years ago[attrs] Run clang-format over a newly added routine in function-attrs
Chandler Carruth [Fri, 12 Feb 2016 03:07:50 +0000 (03:07 +0000)]
[attrs] Run clang-format over a newly added routine in function-attrs
before I update it to be friendly with the new pass manager.

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

8 years ago[ADT] Introduce ‘OptionSet’ in llvm/ADT headers, which is a utility class that makes...
Argyrios Kyrtzidis [Fri, 12 Feb 2016 02:48:26 +0000 (02:48 +0000)]
[ADT] Introduce â€˜OptionSet’ in llvm/ADT headers, which is a utility class that makes it convenient to work with enumerators representing bit options.

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

8 years agoAMDGPU: Set element_size in private resource descriptor
Matt Arsenault [Fri, 12 Feb 2016 02:40:47 +0000 (02:40 +0000)]
AMDGPU: Set element_size in private resource descriptor

Introduce a subtarget feature for this, and leave the default with
the current behavior which assumes up to 16-byte loads/stores can
be used. The field also seems to have the ability to be set to 2 bytes,
but I'm not sure what that would be used for.

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

8 years ago[libFuzzer] make -runs=N flag also affect the simple runner (will execute every input...
Kostya Serebryany [Fri, 12 Feb 2016 02:32:03 +0000 (02:32 +0000)]
[libFuzzer] make -runs=N flag also affect the simple runner (will execute every input N times)

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

8 years agoAMDGPU: Fix mishandling alignment when scalarizing vector loads/stores
Matt Arsenault [Fri, 12 Feb 2016 02:22:21 +0000 (02:22 +0000)]
AMDGPU: Fix mishandling alignment when scalarizing vector loads/stores

I don't think this was causing any real problems, so I'm not sure
how to test for this.

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

8 years agoAMDGPU: Initialize SILowerControlFlow
Matt Arsenault [Fri, 12 Feb 2016 02:16:10 +0000 (02:16 +0000)]
AMDGPU: Initialize SILowerControlFlow

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

8 years agoAMDGPU: Remove trailing whitespace
Matt Arsenault [Fri, 12 Feb 2016 02:16:07 +0000 (02:16 +0000)]
AMDGPU: Remove trailing whitespace

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

8 years agoAvoid linking LLVM component libraries with libLLVM
Andrew Wilkins [Fri, 12 Feb 2016 01:42:43 +0000 (01:42 +0000)]
Avoid linking LLVM component libraries with libLLVM

Patch by Jack Howarth.

When linking to libLLVM, don't also link to the component
libraries that constitute libLLVM.

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

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

8 years ago[msan] Put msan constructor in a comdat.
Evgeniy Stepanov [Fri, 12 Feb 2016 00:37:52 +0000 (00:37 +0000)]
[msan] Put msan constructor in a comdat.

MSan adds a constructor to each translation unit that calls
__msan_init, and does nothing else. The idea is to run __msan_init
before any instrumented code. This results in multiple constructors
and multiple .init_array entries in the final binary, one per
translation unit. This is absolutely unnecessary; one would be
enough.

This change moves the constructors to a comdat group in order to drop
the extra ones.

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

8 years ago[sancov] improved object files handling.
Mike Aizatsky [Fri, 12 Feb 2016 00:29:07 +0000 (00:29 +0000)]
[sancov] improved object files handling.

Multi-dso programs result in multiple coverage files dumped of the form
'<module_name>.<pid>.sancov'. When analyzing these coverage files it is
important to use correct corresponding object file.

This change removes the "-obj" sancov flag and lets user specify object
file names alongside coverage files. Sancov tool would match them using
<module_name> part of coverage file and short file name of the object
file.

Corresponding changes:
- compiler-rt: http://reviews.llvm.org/D17171
- docs: http://reviews.llvm.org/D17175

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

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

8 years ago[LVI] Improve select handling to use condition
Philip Reames [Fri, 12 Feb 2016 00:09:18 +0000 (00:09 +0000)]
[LVI] Improve select handling to use condition

This patches teaches LVI to recognize clamp idioms (e.g. select(a > 5, a, 5) will always produce something greater than 5.

The tests end up being somewhat simplistic because trying to exercise the case I actually care about (a loop with a range check on a clamped secondary induction variable) ends up tripping across a couple of other imprecisions in the analysis. Ah, the joys of LVI...

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

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

8 years agoAMDGPU: Quick fix for extreme slowness in spill-scavenge-offset.ll test
Nicolai Haehnle [Fri, 12 Feb 2016 00:05:34 +0000 (00:05 +0000)]
AMDGPU: Quick fix for extreme slowness in spill-scavenge-offset.ll test

Summary: Also, some cosmetic fixes.

Reviewers: arsenm, tstellarAMD

Subscribers: qcolombet, llvm-commits

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

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

8 years agollvm/test/CodeGen/NVPTX/debug-file-loc.ll: Tweak expressions for dos path.
NAKAMURA Takumi [Thu, 11 Feb 2016 23:59:43 +0000 (23:59 +0000)]
llvm/test/CodeGen/NVPTX/debug-file-loc.ll: Tweak expressions for dos path.

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

8 years agoARMv7k: use Cortex-A7 by default even for tvOS
Tim Northover [Thu, 11 Feb 2016 23:49:08 +0000 (23:49 +0000)]
ARMv7k: use Cortex-A7 by default even for tvOS

Also actually test the default CPU from those triples.

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

8 years ago[codeview] Dump def range lengths in hex
Reid Kleckner [Thu, 11 Feb 2016 23:40:14 +0000 (23:40 +0000)]
[codeview] Dump def range lengths in hex

It makes it easier to correlate with assembly dumps, which are typically
given with hex offsets.

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

8 years ago[SLP] Add debug output for extract cost (NFC)
Matthew Simpson [Thu, 11 Feb 2016 23:06:40 +0000 (23:06 +0000)]
[SLP] Add debug output for extract cost (NFC)

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

8 years agoRe-apply r238452, the bug was in clang and was fixed in r260567.
Quentin Colombet [Thu, 11 Feb 2016 22:30:41 +0000 (22:30 +0000)]
Re-apply r238452, the bug was in clang and was fixed in r260567.

Original commit message:
[InstCombine] Fold IntToPtr and PtrToInt into preceding loads.

Currently we only fold a BitCast into a Load when the BitCast is its
only user.

Do the same for any no-op cast.

Patch by Philip Pfaffe!

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

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

8 years ago[libfuzzer] Removing coverage-related flags from asan options.
Mike Aizatsky [Thu, 11 Feb 2016 22:20:34 +0000 (22:20 +0000)]
[libfuzzer] Removing coverage-related flags from asan options.

Summary:
Reasons to remove are twofold:
 - we don't really need coverage=1 for libfuzzer operation
 - makes controlling coverage for fuzzer processes non-trivial.

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

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

8 years ago[x86] simplify getZeroVector() ; NFCI
Sanjay Patel [Thu, 11 Feb 2016 22:17:04 +0000 (22:17 +0000)]
[x86] simplify getZeroVector() ; NFCI

Let DAG.getConstant() handle the splatting; there's no need
to repeat that logic here.

See also:
http://reviews.llvm.org/rL258833
http://reviews.llvm.org/rL260582

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

8 years agoRevert "Refactor the PassManagerBuilder: extract a "addFunctionSimplificationPasses()""
Mehdi Amini [Thu, 11 Feb 2016 22:09:11 +0000 (22:09 +0000)]
Revert "Refactor the PassManagerBuilder: extract a "addFunctionSimplificationPasses()""

This reverts commit r260603.
I didn't intend to push it :(

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoRevert "Define the ThinLTO Pipeline"
Mehdi Amini [Thu, 11 Feb 2016 22:09:07 +0000 (22:09 +0000)]
Revert "Define the ThinLTO Pipeline"

This reverts commit r260604.
I didn't intend to push this now.

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoRevert "Add a new insert_as() method to DenseMap and use it for ConstantUniqueMap"
Mehdi Amini [Thu, 11 Feb 2016 22:00:36 +0000 (22:00 +0000)]
Revert "Add a new insert_as() method to DenseMap and use it for ConstantUniqueMap"

This reverts commit r260458.

It was backported on an internal branch and broke stage2 build. Since
this can lead to weird random crash I'm reverting upstream as well
while investigating.

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoDefine the ThinLTO Pipeline
Mehdi Amini [Thu, 11 Feb 2016 22:00:31 +0000 (22:00 +0000)]
Define the ThinLTO Pipeline

Summary:
On the contrary to Full LTO, ThinLTO can afford to shift compile time
from the frontend to the linker: both phases are parallel.
This pipeline is based on the proposal in D13443 for full LTO. We ]
didn't move forward on this proposal because the link was far too long
after that.

This patch refactor the "function simplification" passes that are part
of the inliner loop in a helper function (this part is NFC and can be
commited separately to simplify the diff). The ThinLTO pipeline
integrates in the regular O2/O3 flow:

 - The compile phase perform the inliner with a somehow lighter
   function simplification. (TODO: tune the inliner thresholds here)
   This is intendend to simplify the IR and get rid of obvious things
   like linkonce_odr that will be inlined.
 - The link phase will run the pipeline from the start, extended with
   some specific passes that leverage the augmented knowledge we have
   during LTO. Especially after the inliner is done, a sequence of
   globalDCE/globalOpt is performed, followed by another run of the
   "function simplification" passes.

The measurements on the public test suite as well as on our internal
suite show an overall net improvement. The binary size for the clang
executable is reduced by 5%. We're still tuning it with the bringup
of ThinLTO but this should provide a good starting point.

Reviewers: tejohnson

Subscribers: joker.eph, llvm-commits, dexonsmith

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoRefactor the PassManagerBuilder: extract a "addFunctionSimplificationPasses()"
Mehdi Amini [Thu, 11 Feb 2016 22:00:25 +0000 (22:00 +0000)]
Refactor the PassManagerBuilder: extract a "addFunctionSimplificationPasses()"

It is intended to contains the passes run over a function after the
inliner is done with a function and before it moves to its callers.

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years ago[IRTranslator] Use a single virtual register to represent any Value.
Quentin Colombet [Thu, 11 Feb 2016 21:48:32 +0000 (21:48 +0000)]
[IRTranslator] Use a single virtual register to represent any Value.
PR26161.

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

8 years ago[AArch64] Implements the lowering of formal arguments for GlobalISel.
Quentin Colombet [Thu, 11 Feb 2016 21:45:08 +0000 (21:45 +0000)]
[AArch64] Implements the lowering of formal arguments for GlobalISel.
This is just a trivial implementation:
- Support only arguments passed in registers.
- Support only "plain" arguments, i.e., no sext/zext attribute.

At this point, it is possible to play with the IRTranslator on AArch64:
llc -mtriple arm64-<vendor>-<os> -print-machineinstrs <input.ll> -o - -global-isel

For now, we only support the translation of program with adds and returns.

Follow-up patches are on their way to add a test case (the MIRParser is
not ready as it is).

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

8 years agoAMDGPU/SI: Make sure MIMG descriptors and samplers stay in SGPRs
Tom Stellard [Thu, 11 Feb 2016 21:45:07 +0000 (21:45 +0000)]
AMDGPU/SI: Make sure MIMG descriptors and samplers stay in SGPRs

Summary:
It's possible to have resource descriptors and samplers stored in
VGPRs, either by a VMEM instruction or in the case of samplers,
floating-point calculations.  When this happens, we need to use
v_readfirstlane to copy these values back to sgprs.

Reviewers: mareko, arsenm

Subscribers: arsenm, llvm-commits

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

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

8 years agoAdd support for phi nodes in the LLVM C API test
Amaury Sechet [Thu, 11 Feb 2016 21:37:54 +0000 (21:37 +0000)]
Add support for phi nodes in the LLVM C API test

Summary: This required to add binding to Instruction::removeFromParent so that instruction can be forward declared and then moved at the right place.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

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

8 years ago[GlobalISel][MachineIRBuilder] Fix comments.
Quentin Colombet [Thu, 11 Feb 2016 21:21:40 +0000 (21:21 +0000)]
[GlobalISel][MachineIRBuilder] Fix comments.

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

8 years ago[GlobalISel] Make the getter for MBB in MachneIRBuilder public.
Quentin Colombet [Thu, 11 Feb 2016 21:20:35 +0000 (21:20 +0000)]
[GlobalISel] Make the getter for MBB in MachneIRBuilder public.

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

8 years ago[Target] Add a helper function to check if an opcode is invalid after isel.
Quentin Colombet [Thu, 11 Feb 2016 21:16:56 +0000 (21:16 +0000)]
[Target] Add a helper function to check if an opcode is invalid after isel.

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

8 years agoAMDGPU/SI: When splitting SMRD instructions, add its users to VALU worklist
Tom Stellard [Thu, 11 Feb 2016 21:14:34 +0000 (21:14 +0000)]
AMDGPU/SI: When splitting SMRD instructions, add its users to VALU worklist

Summary:
When we split SMRD instructions into two MUBUFs we were adding the users
of the newly created MUBUFs to the VALU worklist.  However, the only
users these instructions had was the REG_SEQUENCE that was inserted
by splitSMRD when the original SMRD instruction was split.

We need to make sure to add the users of the original SMRD to the VALU
worklist before it is split.

I have a test case, but it requires one other bug fix, so it will be
added in a later commt.

Reviewers: mareko, arsenm

Subscribers: arsenm, llvm-commits

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

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

8 years agoSet load alignment on aggregate loads.
Pete Cooper [Thu, 11 Feb 2016 21:10:40 +0000 (21:10 +0000)]
Set load alignment on aggregate loads.

When optimizing a extractvalue(load), we generate a load from the
aggregate type.  This load didn't have alignment set and so would
get the alignment of the type.  This breaks when the type is packed
and so the alignment should be lower.

For example, loading { int, int } would give us alignment of 4, but
the original load from this type may have an alignment of 1 if packed.

Reviewed by David Majnemer

Differential revision: http://reviews.llvm.org/D17158

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

8 years agoRevert "LiveIntervalAnalysis: Support moving of subregister defs in handleMove"
Matthias Braun [Thu, 11 Feb 2016 21:07:44 +0000 (21:07 +0000)]
Revert "LiveIntervalAnalysis: Support moving of subregister defs in handleMove"

This is broke a bot:

http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/4703/steps/test-suite/logs/test.log

Reverting while I investigate.

This reverts commit r260565.

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

8 years ago[WebAssembly] Reformat WebAssemblyFrameLowering and WebAssemblyISelLowering
Derek Schuff [Thu, 11 Feb 2016 20:57:09 +0000 (20:57 +0000)]
[WebAssembly] Reformat WebAssemblyFrameLowering and WebAssemblyISelLowering

Reviewers: sunfish, jfb

Subscribers: jfb, dschuff

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

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

8 years ago[SelectionDAG] change getConstant() to use the input SDLoc when building splat vectors
Sanjay Patel [Thu, 11 Feb 2016 20:21:24 +0000 (20:21 +0000)]
[SelectionDAG] change getConstant() to use the input SDLoc when building splat vectors

The code change is simple enough: instead of attaching an anonymous SDLoc to splatted
vector constants, use the scalar constant's existing SDLoc since that is what is passed
into getConstant() as a param. But this changes instruction scheduling, so I'll explain
why that happens.

The motivation for this patch starts near:
http://reviews.llvm.org/rL258833
...x86's getZeroVector() could be similarly cleaned up and I thought it would be 'NFC'.
But when I made that change locally, several x86 codegen tests wiggled.

It turns out that the lack of SDLoc consistency in getConstant() changes the way
ScheduleDAGRRList behaves. This is because the SDLoc contains 'IROrder' and some DAG
scheduler algorithms use IROrder for tie-breaking.

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

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

8 years ago[GlobalISel] Add the necessary plumbing to lower formal arguments.
Quentin Colombet [Thu, 11 Feb 2016 19:59:41 +0000 (19:59 +0000)]
[GlobalISel] Add the necessary plumbing to lower formal arguments.

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

8 years agoDwarfDebug: emit type units immediately.
Peter Collingbourne [Thu, 11 Feb 2016 19:57:46 +0000 (19:57 +0000)]
DwarfDebug: emit type units immediately.

Rather than storing type units in a vector and emitting them at the end
of code generation, emit them immediately and destroy them, reclaiming the
memory we were using for their DIEs.

In one benchmark carried out against Chromium's 50 largest (by bitcode
file size) translation units, total peak memory consumption with type units
decreased by median 17%, or by 7% when compared against disabling type units.

Tested using check-{llvm,clang}, the GDB 7.5 test suite (with
'-fdebug-types-section') and by eyeballing llvm-dwarfdump output on those
Chromium translation units with split DWARF both disabled and enabled, and
verifying that the only changes were to addresses and abbreviation ordering.

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

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

8 years agoUse copy initialization.
Rafael Espindola [Thu, 11 Feb 2016 19:54:18 +0000 (19:54 +0000)]
Use copy initialization.

We can do it since getMemBuffer returns a unique_ptr.

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

8 years ago[AArch64] Trivial implementation of lower return for the IRTranslator.
Quentin Colombet [Thu, 11 Feb 2016 19:45:27 +0000 (19:45 +0000)]
[AArch64] Trivial implementation of lower return for the IRTranslator.

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

8 years ago[codeview] Add test intended for r260571
Reid Kleckner [Thu, 11 Feb 2016 19:44:26 +0000 (19:44 +0000)]
[codeview] Add test intended for r260571

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

8 years ago[X86] New pass to change byte and word instructions to zero-extending versions.
Kevin B. Smith [Thu, 11 Feb 2016 19:43:04 +0000 (19:43 +0000)]
[X86] New pass to change byte and word instructions to zero-extending versions.
Differential Revision: http://reviews.llvm.org/D17032

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

8 years ago[codeview] Fix bug around multi-level wrapper inlining
Reid Kleckner [Thu, 11 Feb 2016 19:41:47 +0000 (19:41 +0000)]
[codeview] Fix bug around multi-level wrapper inlining

If there were wrapper functions with no instructions of their own in the
inlining tree, we would fail to emit InlineSite records for them.

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

8 years ago[AArch64] Plug the beginning of the GlobalISel pipeline.
Quentin Colombet [Thu, 11 Feb 2016 19:35:06 +0000 (19:35 +0000)]
[AArch64] Plug the beginning of the GlobalISel pipeline.

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

8 years agoPlay nice with Visual Studio and attributes
Quentin Colombet [Thu, 11 Feb 2016 19:33:21 +0000 (19:33 +0000)]
Play nice with Visual Studio and attributes

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

8 years ago[CMake] Produce an empty library for GlobalISel when not building it.
Quentin Colombet [Thu, 11 Feb 2016 19:18:27 +0000 (19:18 +0000)]
[CMake] Produce an empty library for GlobalISel when not building it.
The rational for this change is that LLVMBuild cannot express conditional
dependencies. Therefore, when we start optionally using GlobalISel library for
say AArch64, without that change, all the tools that use the AArch64 library
would need to explicitly link with GlobalISel when we ask for it.

This does not scale.

Instead, we will set the dependencies between the target and GlobalISel and if
we did not ask to build GlobalISel, the library will just be empty.

Thanks to Chris Bieneman and Mehdi Animi for the idea.

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

8 years agoLiveIntervalAnalysis: Support moving of subregister defs in handleMove
Matthias Braun [Thu, 11 Feb 2016 19:03:53 +0000 (19:03 +0000)]
LiveIntervalAnalysis: Support moving of subregister defs in handleMove

If two definitions write to independent subregisters then they can be
put in any order. LiveIntervalAnalysis::handleMove() did not support
this previously because it looks like moving a definition of a vreg past
another one.

This is a modified version of a patch proposed (two years ago) by
Vincent Lejeune! This version does not touch the read-undef flags and is
extended for the case of moving a subregister def behind all uses - this
can happen for subregister defs that are completely unused.

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

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

8 years ago[GlobalISel] Teach the IRTranslator how to lower returns.
Quentin Colombet [Thu, 11 Feb 2016 18:53:28 +0000 (18:53 +0000)]
[GlobalISel] Teach the IRTranslator how to lower returns.

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

8 years ago[AMDGPU] Fix for "v_div_scale_f64 reg, vcc, ..." parsing
Tom Stellard [Thu, 11 Feb 2016 18:25:26 +0000 (18:25 +0000)]
[AMDGPU] Fix for "v_div_scale_f64 reg, vcc, ..." parsing

Summary:
Added support for "VOP3Only" attribute in VOP3bInst encoding.
Set VOP3Only=1 for V_DIV_SCALE_F64/32 insns.
Added support for multi-dest instructions in AMDGPUAs::cvt*().
Added lit test for "V_DIV_SCALE_F64|F32 vreg,vcc|sreg,vreg,vreg,vreg".

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, SamWot, nhaustov, vpykhtin

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

Patch By: Artem Tamazov

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

8 years ago[GlobalISel] Add a type to MachineInstr.
Quentin Colombet [Thu, 11 Feb 2016 18:22:37 +0000 (18:22 +0000)]
[GlobalISel] Add a type to MachineInstr.
We actually need that information only for generic instructions, therefore it
would be nice not to have to pay the extra memory consumption for all
instructions. Especially because a typed non-generic instruction does not make
sense.

The question is then, is it possible to have that information in a union or
something?
My initial thought was that we could have a derived class GenericMachineInstr
with additional information, but in practice it makes little to no sense since
generic MachineInstrs are likely turned into non-generic ones by just switching
the opcode. In other words, we don't want to go through the process of creating
a new, non-generic MachineInstr, object each time we do this switch. The memory
benefit probably is not worth the extra compile time.

Another option would be to keep the type of the MachineInstr in a side table.
This would induce an extra indirection though.

Anyway, I will file a PR to discuss about it and remember we need to come back
to it at some point.

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

8 years ago[NVPTX] emit .file directives for files referenced by subprograms.
Artem Belevich [Thu, 11 Feb 2016 18:21:47 +0000 (18:21 +0000)]
[NVPTX] emit .file directives for files referenced by subprograms.

.. so .loc directives referring to those files work correctly.

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

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

8 years ago[GlobalISel] Add a hook in TargetConfigPass to run GlobalISel.
Quentin Colombet [Thu, 11 Feb 2016 17:57:22 +0000 (17:57 +0000)]
[GlobalISel] Add a hook in TargetConfigPass to run GlobalISel.

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

8 years ago[GlobalISel][IRTranslator] Change the ownership of the MIRBuilder field.
Quentin Colombet [Thu, 11 Feb 2016 17:53:23 +0000 (17:53 +0000)]
[GlobalISel][IRTranslator] Change the ownership of the MIRBuilder field.

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

8 years ago[GlobalISel][IRTranslator] Fix a typo in assert.
Quentin Colombet [Thu, 11 Feb 2016 17:52:28 +0000 (17:52 +0000)]
[GlobalISel][IRTranslator] Fix a typo in assert.

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