OSDN Git Service

android-x86/external-llvm.git
8 years agoRevert -r278269 [IndVarSimplify] Eliminate zext of a signed IV when the IV is known...
Artur Pilipenko [Mon, 22 Aug 2016 13:12:07 +0000 (13:12 +0000)]
Revert -r278269 [IndVarSimplify] Eliminate zext of a signed IV when the IV is known to be non-negative

This change needs to be reverted in order to revert -r278267 which cause performance regression on MultiSource/Benchmarks/TSVC/Symbolics-flt/Symbolics-flt from LNT and some other bechmarks.

See comments on https://reviews.llvm.org/D18777 for details.

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

8 years ago[PM] Port LoopDataPrefetch AArch64 tests to new pass manager
Balaram Makam [Mon, 22 Aug 2016 12:59:58 +0000 (12:59 +0000)]
[PM] Port LoopDataPrefetch AArch64 tests to new pass manager

Reviewers: mcrosier, tejohnson

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

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

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

8 years ago[X86][SSE] Avoid specifying unused arguments in SHUFPD lowering
Simon Pilgrim [Mon, 22 Aug 2016 12:56:54 +0000 (12:56 +0000)]
[X86][SSE] Avoid specifying unused arguments in SHUFPD lowering

As discussed on PR26491, we are missing the opportunity to make use of the smaller MOVHLPS instruction because we set both arguments of a SHUFPD when using it to lower a single input shuffle.

This patch sets the lowered argument to UNDEF if that shuffle element is undefined. This in turn makes it easier for target shuffle combining to decode UNDEF shuffle elements, allowing combines to MOVHLPS to occur.

A fix to match against MOVHPD stores was necessary as well.

This builds on the improved MOVLHPS/MOVHLPS lowering and memory folding support added in D16956

Adding similar support for SHUFPS will have to wait until have better support for target combining of binary shuffles.

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

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

8 years ago[mips][microMIPS] Implement BLTZC, BLEZC, BGEZC and BGTZC instructions, fix disassemb...
Hrvoje Varga [Mon, 22 Aug 2016 12:17:59 +0000 (12:17 +0000)]
[mips][microMIPS] Implement BLTZC, BLEZC, BGEZC and BGTZC instructions, fix disassembly and add operand checking to existing B<cond>C implementations
Differential Revision: https://reviews.llvm.org/D22667

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

8 years ago[MC] Remove guard(s). NFCI.
Davide Italiano [Mon, 22 Aug 2016 11:55:22 +0000 (11:55 +0000)]
[MC] Remove guard(s). NFCI.

All the methods are already marked with
LLVM_DUMP_METHOD.

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

8 years ago[ThinLTO][X86] Fix windows build
Simon Pilgrim [Mon, 22 Aug 2016 10:49:37 +0000 (10:49 +0000)]
[ThinLTO][X86] Fix windows build

Windows 'rm' complains about non-existent files if a wildcard is used. Be more explicit about the files deleted to avoid this.

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

8 years ago[X86] Create a new instruction format to handle 4VOp3 encoding. This saves one bit...
Craig Topper [Mon, 22 Aug 2016 07:38:50 +0000 (07:38 +0000)]
[X86] Create a new instruction format to handle 4VOp3 encoding. This saves one bit in TSFlags and simplifies MRMSrcMem/MRMSrcReg format handling.

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

8 years ago[X86] Create a new instruction format to handle MemOp4 encoding. This saves one bit...
Craig Topper [Mon, 22 Aug 2016 07:38:45 +0000 (07:38 +0000)]
[X86] Create a new instruction format to handle MemOp4 encoding. This saves one bit in TSFlags and simplifies MRMSrcMem/MRMSrcReg format handling.

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

8 years ago[X86] Space out the encodings of X86 instruction formats. I plan to add some new...
Craig Topper [Mon, 22 Aug 2016 07:38:41 +0000 (07:38 +0000)]
[X86] Space out the encodings of X86 instruction formats. I plan to add some new encodings in future commits and this will reduce the size of those commits. NFC

This tries to keep all the ModRM memory and register forms in their own regions of the encodings. Hoping to make it simple on some of the switch statements that operate on these encodings.

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

8 years ago[X86] Merge small helper function into the switch that calls it since they both opera...
Craig Topper [Mon, 22 Aug 2016 07:38:36 +0000 (07:38 +0000)]
[X86] Merge small helper function into the switch that calls it since they both operate on the same variable. NFC

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

8 years ago[X86] Explicitly list all X86 instruction forms in switch statement so its easier...
Craig Topper [Mon, 22 Aug 2016 07:38:30 +0000 (07:38 +0000)]
[X86] Explicitly list all X86 instruction forms in switch statement so its easier to detect when one is missing. NFC

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

8 years agoAdd REQUIRES:X86 to test/tools/llvm-lto2/common.ll
Mehdi Amini [Mon, 22 Aug 2016 06:37:41 +0000 (06:37 +0000)]
Add REQUIRES:X86 to test/tools/llvm-lto2/common.ll

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

8 years ago[LTO] Handles commons in monolithic LTO
Mehdi Amini [Mon, 22 Aug 2016 06:25:46 +0000 (06:25 +0000)]
[LTO] Handles commons in monolithic LTO

The gold-plugin was doing this internally, now the API is handling
commons correctly based on the given resolution.

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

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

8 years ago[LTO] Add a "CodeGenOnly" option. Allows the client to skip the optimizer.
Mehdi Amini [Mon, 22 Aug 2016 06:25:41 +0000 (06:25 +0000)]
[LTO] Add a "CodeGenOnly" option. Allows the client to skip the optimizer.

Summary: Slowly getting on par with libLTO

Reviewers: tejohnson

Subscribers: llvm-commits, mehdi_amini

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

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

8 years ago[asan] Use 1 byte aligned stores to poison shadow memory
Vitaly Buka [Mon, 22 Aug 2016 04:16:14 +0000 (04:16 +0000)]
[asan] Use 1 byte aligned stores to poison shadow memory

Summary: r279379 introduced crash on arm 32bit bot. I suspect this is alignment issue.

Reviewers: eugenis

Subscribers: llvm-commits, aemerson

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

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

8 years ago[X86] Merge hasVEX_i8ImmReg into the ImmFormat type which had extra unused encodings...
Craig Topper [Mon, 22 Aug 2016 01:37:19 +0000 (01:37 +0000)]
[X86] Merge hasVEX_i8ImmReg into the ImmFormat type which had extra unused encodings. This saves one bit in TSFlags. NFC

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

8 years ago[X86] Remove ignoreVEX_L from TSFlags. Only the disassembler needs it and the disasse...
Craig Topper [Mon, 22 Aug 2016 01:37:16 +0000 (01:37 +0000)]
[X86] Remove ignoreVEX_L from TSFlags. Only the disassembler needs it and the disassembler doesn't use TSFlags. NFC

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

8 years agoReformat.
NAKAMURA Takumi [Mon, 22 Aug 2016 00:58:47 +0000 (00:58 +0000)]
Reformat.

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

8 years agoUntabify.
NAKAMURA Takumi [Mon, 22 Aug 2016 00:58:04 +0000 (00:58 +0000)]
Untabify.

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

8 years ago[CostModel][X86] Removed shift tests
Simon Pilgrim [Sun, 21 Aug 2016 19:56:02 +0000 (19:56 +0000)]
[CostModel][X86] Removed shift tests

There are more thorough tests found in vshift-*-cost.ll

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

8 years ago[CostModel][X86] Added costs for vXi16 and vXi8 vectors for add/sub/mul/and/or/xor...
Simon Pilgrim [Sun, 21 Aug 2016 19:44:44 +0000 (19:44 +0000)]
[CostModel][X86] Added costs for vXi16 and vXi8 vectors for add/sub/mul/and/or/xor tests

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

8 years ago[CostModel][X86] Replaced SSSE3 with SSE2 costs to create a better baseline
Simon Pilgrim [Sun, 21 Aug 2016 19:14:48 +0000 (19:14 +0000)]
[CostModel][X86] Replaced SSSE3 with SSE2 costs to create a better baseline

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

8 years ago[CostModel][X86] Added fsqrt and fma costs
Simon Pilgrim [Sun, 21 Aug 2016 19:06:25 +0000 (19:06 +0000)]
[CostModel][X86] Added fsqrt and fma costs

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

8 years ago[CostModel][X86] Split off float arithmetic cost tests
Simon Pilgrim [Sun, 21 Aug 2016 18:34:47 +0000 (18:34 +0000)]
[CostModel][X86] Split off float arithmetic cost tests

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

8 years ago[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vector...
Sanjay Patel [Sun, 21 Aug 2016 17:10:07 +0000 (17:10 +0000)]
[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vectors, part 4

This concludes the fixes for icmp+shl in this series:
https://reviews.llvm.org/rL279339
https://reviews.llvm.org/rL279398
https://reviews.llvm.org/rL279399

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

8 years agoremove FIXME comment; fixed by previous commit
Sanjay Patel [Sun, 21 Aug 2016 16:40:42 +0000 (16:40 +0000)]
remove FIXME comment; fixed by previous commit

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

8 years ago[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vector...
Sanjay Patel [Sun, 21 Aug 2016 16:35:34 +0000 (16:35 +0000)]
[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vectors, part 3

This is a partial enablement (move the ConstantInt guard down).

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

8 years ago[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vector...
Sanjay Patel [Sun, 21 Aug 2016 16:28:22 +0000 (16:28 +0000)]
[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vectors, part 2

This is a partial enablement (move the ConstantInt guard down).

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

8 years ago[X86][AVX] Dropped combineShuffle256 - this can now be performed by EltsFromConsecuti...
Simon Pilgrim [Sun, 21 Aug 2016 15:39:45 +0000 (15:39 +0000)]
[X86][AVX] Dropped combineShuffle256 - this can now be performed by EltsFromConsecutiveLoads

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

8 years ago[InstCombine] use APInt instead of ConstantInt in isSignBitCheck(); NFCI
Sanjay Patel [Sun, 21 Aug 2016 15:07:45 +0000 (15:07 +0000)]
[InstCombine] use APInt instead of ConstantInt in isSignBitCheck(); NFCI

The callers still have ConstantInt guards, so there is no functional change
intended from this change. But relaxing the callers will allow more folds
for vector types.

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

8 years ago[AVX512][FastISel] Do not use K registers in TEST instructions
Guy Blank [Sun, 21 Aug 2016 08:02:27 +0000 (08:02 +0000)]
[AVX512][FastISel] Do not use K registers in TEST instructions

In some cases, FastIsel was emitting TEST instruction with K reg input, which is illegal.
Changed to using KORTEST when dealing with K regs.

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

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

8 years agoARM: Avoid dereferencing end() in ARMFrameLowering::emitEpilogue
Duncan P. N. Exon Smith [Sun, 21 Aug 2016 00:08:10 +0000 (00:08 +0000)]
ARM: Avoid dereferencing end() in ARMFrameLowering::emitEpilogue

This fixes the crash from PR29072, where the MachineBasicBlock::iterator
wasn't being properly checked against MachineBasicBlock::end() before
iterating.  This was another bug exposed by the new
ilist::iterator::operator*() assertion from r279314.

This testcase is poor quality.  bugpoint couldn't reduce any further,
and I haven't had time to dig into what's going on so I can't invent a
better one.  I didn't even get good CHECK lines in: this is just a
crasher.

I'm committing anyway since this is a real crash with an obvious fix,
but I'll leave PR29072 open and ask an ARM maintainer to help improve
the testcase.

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

8 years agoFix broken macOS LLDB Xcode build from r279314
Todd Fiala [Sat, 20 Aug 2016 23:24:02 +0000 (23:24 +0000)]
Fix broken macOS LLDB Xcode build from r279314

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

8 years ago[X86][SSE] Regenerate 32-bit buildvector test
Simon Pilgrim [Sat, 20 Aug 2016 23:09:57 +0000 (23:09 +0000)]
[X86][SSE] Regenerate 32-bit buildvector test

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

8 years ago[X86][SSE] Regenerate subvector extraction widening test
Simon Pilgrim [Sat, 20 Aug 2016 22:00:53 +0000 (22:00 +0000)]
[X86][SSE] Regenerate subvector extraction widening test

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

8 years ago[X86] Regenerate fp truncate tests
Simon Pilgrim [Sat, 20 Aug 2016 21:56:33 +0000 (21:56 +0000)]
[X86] Regenerate fp truncate tests

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

8 years agoRegenerate test
Simon Pilgrim [Sat, 20 Aug 2016 21:37:30 +0000 (21:37 +0000)]
Regenerate test

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

8 years agoRegenerate test
Simon Pilgrim [Sat, 20 Aug 2016 21:35:45 +0000 (21:35 +0000)]
Regenerate test

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

8 years ago[X86][XOP] Tweak vpermil2pd test to stop it being combined away
Simon Pilgrim [Sat, 20 Aug 2016 21:07:41 +0000 (21:07 +0000)]
[X86][XOP] Tweak vpermil2pd test to stop it being combined away

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

8 years ago[asan] Minimize code size by using __asan_set_shadow_* for large blocks
Vitaly Buka [Sat, 20 Aug 2016 20:23:50 +0000 (20:23 +0000)]
[asan] Minimize code size by using __asan_set_shadow_* for large blocks

Summary:
We can insert function call instead of multiple store operation.
Current default is blocks larger than 64 bytes.
Changes are hidden behind -asan-experimental-poisoning flag.

PR27453

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

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

8 years agoUse SDValue::getOpcode() helper instead of via SDValue::getNode()
Simon Pilgrim [Sat, 20 Aug 2016 20:04:18 +0000 (20:04 +0000)]
Use SDValue::getOpcode() helper instead of via SDValue::getNode()

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

8 years ago[asan] Initialize __asan_set_shadow_* callbacks
Vitaly Buka [Sat, 20 Aug 2016 18:34:39 +0000 (18:34 +0000)]
[asan] Initialize __asan_set_shadow_* callbacks

Summary:
Callbacks are not being used yet.

PR27453

Reviewers: kcc, eugenis

Subscribers: llvm-commits

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

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

8 years ago[asan] Optimize store size in FunctionStackPoisoner::poisonRedZones
Vitaly Buka [Sat, 20 Aug 2016 18:34:36 +0000 (18:34 +0000)]
[asan] Optimize store size in FunctionStackPoisoner::poisonRedZones

Summary: Reduce store size to avoid leading and trailing zeros.

Reviewers: kcc, eugenis

Subscribers: llvm-commits

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

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

8 years ago[asan] Cleanup instrumentation of dynamic allocas
Vitaly Buka [Sat, 20 Aug 2016 17:22:27 +0000 (17:22 +0000)]
[asan] Cleanup instrumentation of dynamic allocas

Summary:
Extract instrumenting dynamic allocas into separate method.
Rename asan-instrument-allocas -> asan-instrument-dynamic-allocas

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

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

8 years ago[X86][SSE] Added vector interleave test (PR21281)
Simon Pilgrim [Sat, 20 Aug 2016 17:07:38 +0000 (17:07 +0000)]
[X86][SSE] Added vector interleave test (PR21281)

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

8 years ago[asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout
Vitaly Buka [Sat, 20 Aug 2016 16:48:24 +0000 (16:48 +0000)]
[asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout

Summary:
We are going to combine poisoning of red zones and scope poisoning.

PR27453

Reviewers: kcc, eugenis

Subscribers: llvm-commits

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

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

8 years agoMove unittests/Support/IteratorTest.cpp to unittests/ADT/
Duncan P. N. Exon Smith [Sat, 20 Aug 2016 14:58:31 +0000 (14:58 +0000)]
Move unittests/Support/IteratorTest.cpp to unittests/ADT/

This testing stuff from ADT, not Support.  Fix the file location.

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

8 years agoReapply "[SLP] Initialize VectorizedValue when gathering"
Matthew Simpson [Sat, 20 Aug 2016 14:49:02 +0000 (14:49 +0000)]
Reapply "[SLP] Initialize VectorizedValue when gathering"

The test case included in r279125 exposed existing undefined behavior in the
SLP vectorizer that it did not introduce. This patch reapplies the original
patch, but modifies the test case to avoid hitting the undefined behavior. This
allows us to close PR28330 while keeping the UBSan bot happy. The undefined
behavior the original test uncovered will be addressed in a follow-on patch.

Reference: https://llvm.org/bugs/show_bug.cgi?id=28330

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

8 years ago[SLP] Add command line option for minimum tree size (NFC)
Matthew Simpson [Sat, 20 Aug 2016 14:10:06 +0000 (14:10 +0000)]
[SLP] Add command line option for minimum tree size (NFC)

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

8 years agoRevert "[SLP] Initialize VectorizedValue when gathering" to fix ubsan bot.
Vitaly Buka [Sat, 20 Aug 2016 07:09:39 +0000 (07:09 +0000)]
Revert "[SLP] Initialize VectorizedValue when gathering" to fix ubsan bot.

This reverts commit r279125.

https://reviews.llvm.org/D23410

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

8 years ago[CMake/ASan] Skip using libedit if ASan is enabled -- it leaks memory.
Chandler Carruth [Sat, 20 Aug 2016 07:05:13 +0000 (07:05 +0000)]
[CMake/ASan] Skip using libedit if ASan is enabled -- it leaks memory.

Note that you'll have to clear this variable from your CMake cache for
it to take effect.

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

8 years ago[Profile] add test with large counts
Xinliang David Li [Sat, 20 Aug 2016 05:28:42 +0000 (05:28 +0000)]
[Profile] add test with large counts

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

8 years ago[PM] Introduce an abstraction for all the analyses over a particular IR
Chandler Carruth [Sat, 20 Aug 2016 04:57:28 +0000 (04:57 +0000)]
[PM] Introduce an abstraction for all the analyses over a particular IR
unit for use in the PreservedAnalyses set.

This doesn't have any important functional change yet but it cleans
things up and makes the analysis substantially more efficient by
avoiding querying through the type erasure for every analysis.

I also think it makes it much easier to reason about how analyses are
preserved when walking across pass managers and across IR unit
abstractions.

Thanks to Sean and Mehdi both for the comments and suggestions.

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

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

8 years ago[gold/ThinLTO] Restore ThinLTO file management in gold plugin
Teresa Johnson [Sat, 20 Aug 2016 01:24:07 +0000 (01:24 +0000)]
[gold/ThinLTO] Restore ThinLTO file management in gold plugin

Summary:
The gold-plugin changes added along with the new LTO API in r278338 had
the effect of removing the management of the PluginInputFile that
ensured the files weren't released back to gold until the backend
threads were complete. Add back the old file handling.

Fixes PR29020.

Reviewers: mehdi_amini

Subscribers: mehdi_amini, llvm-commits, hjl.tools

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

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

8 years ago[gold] Fix new gold test to specify emulation mode
Teresa Johnson [Sat, 20 Aug 2016 01:22:10 +0000 (01:22 +0000)]
[gold] Fix new gold test to specify emulation mode

Add emulation mode option for new test added in r279023.

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

8 years ago[LTO] Add the ability to test -thinlto-emit-imports-files through llvm-lto2
Mehdi Amini [Fri, 19 Aug 2016 23:54:40 +0000 (23:54 +0000)]
[LTO] Add the ability to test -thinlto-emit-imports-files through llvm-lto2

Summary:
Start bringing llvm-lto2 to a level where we can test the LTO API
a bit deeper.

Reviewers: tejohnson

Subscribers: llvm-commits, mehdi_amini

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

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

8 years agoMachineFunction: Add llvm_unreachable for missing properties
Matthias Braun [Fri, 19 Aug 2016 23:03:28 +0000 (23:03 +0000)]
MachineFunction: Add llvm_unreachable for missing properties

Most compilers should give you a warning anyway though.

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

8 years agoReset "undef" flag when coalescing subregister into whole register
Krzysztof Parzyszek [Fri, 19 Aug 2016 22:57:23 +0000 (22:57 +0000)]
Reset "undef" flag when coalescing subregister into whole register

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

8 years agoGlobalISel: support legalization of G_FCONSTANTs
Tim Northover [Fri, 19 Aug 2016 22:40:08 +0000 (22:40 +0000)]
GlobalISel: support legalization of G_FCONSTANTs

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

8 years agoGlobalISel: teach legalizer how to handle integer constants.
Tim Northover [Fri, 19 Aug 2016 22:40:00 +0000 (22:40 +0000)]
GlobalISel: teach legalizer how to handle integer constants.

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

8 years ago[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vector...
Sanjay Patel [Fri, 19 Aug 2016 22:33:26 +0000 (22:33 +0000)]
[InstCombine] use m_APInt to allow icmp (shl X, Y), C folds for splat constant vectors, part 1

This is a partial enablement (move the ConstantInt guard down) because there are many
different folds here and one of the later ones will require reworking 'isSignBitCheck'.

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

8 years agoMachineFunction: Cleanup/simplify MachineFunctionProperties::print()
Matthias Braun [Fri, 19 Aug 2016 22:31:45 +0000 (22:31 +0000)]
MachineFunction: Cleanup/simplify MachineFunctionProperties::print()

- Always compile print() regardless of LLVM_ENABLE_DUMP. (We usually
  only gard dump() functions with that).
- Only show the set properties to reduce output clutter.
- Remove the unused variant that even shows the unset properties.
- Fix comments

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

8 years agoMachineFunction: Make LastProperty an alias of the last property
Matthias Braun [Fri, 19 Aug 2016 22:31:42 +0000 (22:31 +0000)]
MachineFunction: Make LastProperty an alias of the last property

This avoids unnecessary cases in switch statements covering all
properties.

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

8 years agoPartially revert 279331, as we modify this instruction in the loop
Daniel Berlin [Fri, 19 Aug 2016 22:18:38 +0000 (22:18 +0000)]
Partially revert 279331, as we modify this instruction in the loop

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

8 years agoRevert "[asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout"
Vitaly Buka [Fri, 19 Aug 2016 22:12:58 +0000 (22:12 +0000)]
Revert "[asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout"

This reverts commit r279020.

Speculative revert in hope to fix asan test on arm.

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

8 years agoConvert some depth first traversals to depth_first
Daniel Berlin [Fri, 19 Aug 2016 22:06:23 +0000 (22:06 +0000)]
Convert some depth first traversals to depth_first

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

8 years ago[CallGraph] Use decltype instead of pointer_to_unary_function. NFC.
Tim Shen [Fri, 19 Aug 2016 21:52:34 +0000 (21:52 +0000)]
[CallGraph] Use decltype instead of pointer_to_unary_function. NFC.

Reviewers: dblaikie

Subscribers: llvm-commits

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

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

8 years ago[GraphTraits] Make nodes_iterator dereference to NodeType*/NodeRef
Tim Shen [Fri, 19 Aug 2016 21:20:13 +0000 (21:20 +0000)]
[GraphTraits] Make nodes_iterator dereference to NodeType*/NodeRef

Currently nodes_iterator may dereference to a NodeType* or a NodeType&. Make them all dereference to NodeType*, which is NodeRef later.

Differential Revision: https://reviews.llvm.org/D23704
Differential Revision: https://reviews.llvm.org/D23705

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

8 years ago[Packetizer] Add debugging code to stop packetization after N instructions
Krzysztof Parzyszek [Fri, 19 Aug 2016 21:12:52 +0000 (21:12 +0000)]
[Packetizer] Add debugging code to stop packetization after N instructions

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

8 years ago[Hexagon] Avoid register dependencies on indirect branches in packetizer
Krzysztof Parzyszek [Fri, 19 Aug 2016 21:07:35 +0000 (21:07 +0000)]
[Hexagon] Avoid register dependencies on indirect branches in packetizer

Do not packetize the instruction setting the branch address with the
indirect branch itself.

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

8 years ago[ADT] add pointer_iterator, the opposite of pointee_iterator
Tim Shen [Fri, 19 Aug 2016 21:04:45 +0000 (21:04 +0000)]
[ADT] add pointer_iterator, the opposite of pointee_iterator

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

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

8 years ago[libFuzzer] fix the non-debug build warnings
Kostya Serebryany [Fri, 19 Aug 2016 20:57:09 +0000 (20:57 +0000)]
[libFuzzer] fix the non-debug build warnings

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

8 years agoGlobalISel: translate floating-point round/extend
Tim Northover [Fri, 19 Aug 2016 20:48:23 +0000 (20:48 +0000)]
GlobalISel: translate floating-point round/extend

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

8 years agoGlobalISel: translate floating-point comparisons
Tim Northover [Fri, 19 Aug 2016 20:48:16 +0000 (20:48 +0000)]
GlobalISel: translate floating-point comparisons

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

8 years ago[NVPTX] Switch nvptx-use-infer-addrspace to true.
Justin Lebar [Fri, 19 Aug 2016 20:46:45 +0000 (20:46 +0000)]
[NVPTX] Switch nvptx-use-infer-addrspace to true.

Summary:
This switches us to use a different, more powerful algorithm for address
space inference.  I've tested this locally and it seems to work great.
Once we're more confident in it, we can remove the old pass altogether.

Reviewers: jingyue

Subscribers: llvm-commits, tra, jholewinski

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

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

8 years agoReapply "ADT: Remove UB in ilist (and use a circular linked list)"
Duncan P. N. Exon Smith [Fri, 19 Aug 2016 20:40:12 +0000 (20:40 +0000)]
Reapply "ADT: Remove UB in ilist (and use a circular linked list)"

This reverts commit r279053, reapplying r278974 after fixing PR29035
with r279104.

Note that r279312 has been committed in the meantime, and this has been
rebased on top of that.  Otherwise it's identical to r278974.

Note for maintainers of out-of-tree code (that I missed in the original
message): if the new isKnownSentinel() assertion is firing from
ilist_iterator<>::operator*(), this patch has identified a bug in your
code.  There are a few common patterns:
- Some IR-related APIs htake an IRUnit* that might be nullptr, and pass
  in an incremented iterator as an insertion point.  Some old code was
  using "&*++I", which in the case of end() only worked by fluke.  If
  the IRUnit in question inherits from ilist_node_with_parent<>, you can
  use "I->getNextNode()".  Otherwise, use "List.getNextNode(*I)".
- In most other cases, crashes on &*I just need to check for I==end()
  before dereferencing.
- There's also occasional code that sends iterators into a function, and
  then starts calling I->getOperand() (or other API).  Either check for
  end() before the entering the function, or early exit.

Note for if the static_assert with HasObsoleteCustomization is firing
for you:
- r278513 has examples of how to stop using custom sentinel traits.
- r278532 removed ilist_nextprev_traits since no one was using it.  See
  lld's r278469 for the only migration I needed to do.

Original commit message follows.

----

This removes the undefined behaviour (UB) in ilist/ilist_node/etc.,
mainly by removing (gutting) the ilist_sentinel_traits customization
point and canonicalizing on a single, efficient memory layout.  This
fixes PR26753.

The new ilist is a doubly-linked circular list.
- ilist_node_base has two ilist_node_base*: Next and Prev.  Size-of: two
  pointers.
- ilist_node<T> (size-of: two pointers) is a type-safe wrapper around
  ilist_node_base.
- ilist_iterator<T> (size-of: two pointers) operates on an
  ilist_node<T>*, and downcasts to T* on dereference.
- ilist_sentinel<T> (size-of: two pointers) is a wrapper around
  ilist_node<T> that has some extra API for list management.
- ilist<T> (size-of: two pointers) has an ilist_sentinel<T>, whose
  address is returned for end().

The new memory layout matches ilist_half_embedded_sentinel_traits<T>
exactly.  The Head pointer that previously lived in ilist<T> is
effectively glued to the ilist_half_node<T> that lived in
ilist_half_embedded_sentinel_traits<T>, becoming the Next and Prev in
the ilist_sentinel_node<T>, respectively.  sizeof(ilist<T>) is now the
size of two pointers, and there is never any additional storage for a
sentinel.

This is a much simpler design for a doubly-linked list, removing most of
the corner cases of list manipulation (add, remove, etc.).  In follow-up
commits, I intend to move as many algorithms as possible into a
non-templated base class (ilist_base) to reduce code size.

Moreover, this fixes the UB in ilist_iterator/getNext/getPrev
operations.  Previously, ilist_iterator<T> operated on a T*, even when
the sentinel was not of type T (i.e., ilist_embedded_sentinel_traits and
ilist_half_embedded_sentinel_traits).  This added UB to all operations
involving end().   Now, ilist_iterator<T> operates on an ilist_node<T>*,
and only downcasts when the full type is guaranteed to be T*.

What did we lose?  There used to be a crash (in some configurations) on
++end().  Curiously (via UB), ++end() would return begin() for users of
ilist_half_embedded_sentinel_traits<T>, but otherwise ++end() would
cause a nice dependable nullptr dereference, crashing instead of a
possible infinite loop.  Options:
 1. Lose that behaviour.
 2. Keep it, by stealing a bit from Prev in asserts builds.
 3. Crash on dereference instead, using the same technique.

Hans convinced me (because of the number of problems this and r278532
exposed on Windows) that we really need some assertion here, at least in
the short term.  I've opted for #3 since I think it catches more bugs.

I added only a couple of unit tests to root out specific bugs I hit
during bring-up, but otherwise this is tested implicitly via the
extensive usage throughout LLVM.

Planned follow-ups:
- Remove ilist_*sentinel_traits<T>.  Here I've just gutted them to
  prevent build failures in sub-projects.  Once I stop referring to them
  in sub-projects, I'll come back and delete them.
- Add ilist_base and move algorithms there.
- Check and fix move construction and assignment.

Eventually, there are other interesting directions:
- Rewrite reverse iterators, so that rbegin().getNodePtr()==&*rbegin().
  This allows much simpler logic when erasing elements during a reverse
  traversal.
- Remove ilist_traits::createNode, by deleting the remaining API that
  creates nodes.  Intrusive lists shouldn't be creating nodes
  themselves.
- Remove ilist_traits::deleteNode, by (1) asserting that lists are empty
  on destruction and (2) changing API that calls it to take a Deleter
  functor (intrusive lists shouldn't be in the memory management
  business).
- Reconfigure the remaining callback traits (addNodeToList, etc.) to be
  higher-level, pulling out a simple_ilist<T> that is much easier to
  read and understand.
- Allow tags (e.g., ilist_node<T,tag1> and ilist_node<T,tag2>) so that T
  can be a member of multiple intrusive lists.

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

8 years agoRevert "[SimplifyCFG] Rewrite SinkThenElseCodeToEnd"
Reid Kleckner [Fri, 19 Aug 2016 20:22:39 +0000 (20:22 +0000)]
Revert "[SimplifyCFG] Rewrite SinkThenElseCodeToEnd"

This reverts commit r279229. It breaks intrinsic function calls in
diamonds.

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

8 years agoReapply "ADT: Tidy up ilist_traits static asserts, NFC"
Duncan P. N. Exon Smith [Fri, 19 Aug 2016 20:17:23 +0000 (20:17 +0000)]
Reapply "ADT: Tidy up ilist_traits static asserts, NFC"

This spiritually reapplies r279012 (reverted in r279052) without the
r278974 parts.  The differences:

  - Only the HasGetNext trait exists here, so I've only cleaned up (and
    tested) it.  I still added HasObsoleteCustomization since I know
    this will be expanding when r278974 is reapplied.

  - I changed the unit tests to use static_assert to catch problems
    earlier in the build.

  - I added negative tests for the type traits.

Original commit message follows.

----

Change the ilist traits to use decltype instead of sizeof, and add
HasObsoleteCustomization so that additions to this list don't
need to be added in two places.

I suspect this will now work with MSVC, since the trait tested in
r278991 seems to work.  If for some reason it continues to fail on
Windows I'll follow up by adding back the #ifndef _MSC_VER.

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

8 years agoGlobalISel: translate floating-point constants
Tim Northover [Fri, 19 Aug 2016 20:09:15 +0000 (20:09 +0000)]
GlobalISel: translate floating-point constants

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

8 years agoGlobalISel: translate float/int conversion instructions.
Tim Northover [Fri, 19 Aug 2016 20:09:11 +0000 (20:09 +0000)]
GlobalISel: translate float/int conversion instructions.

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

8 years agoGlobalISel: support translating select instructions.
Tim Northover [Fri, 19 Aug 2016 20:09:07 +0000 (20:09 +0000)]
GlobalISel: support translating select instructions.

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

8 years agoGlobalISel: fix insert/extract to work on ConstantExprs too.
Tim Northover [Fri, 19 Aug 2016 20:09:03 +0000 (20:09 +0000)]
GlobalISel: fix insert/extract to work on ConstantExprs too.

No tests yet unfortunately (ConstantFolding reduces all supported constants to
ConstantInts before we get to translation). Soon.

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

8 years agoGlobalISel: fix stale comment
Tim Northover [Fri, 19 Aug 2016 20:09:01 +0000 (20:09 +0000)]
GlobalISel: fix stale comment

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

8 years agoGlobalISel: translate insertvalue instructions.
Tim Northover [Fri, 19 Aug 2016 20:08:55 +0000 (20:08 +0000)]
GlobalISel: translate insertvalue instructions.

This adds a G_INSERT instruction, which technically makes G_SEQUENCE redundant
(it's equivalent to a G_INSERT into an IMPLICIT_DEF). We'll leave G_SEQUENCE
for now though: it's likely to be far more common as it's a fundamental part of
legalization, so avoiding the mess and bloat of the extra IMPLICIT_DEFs is
probably worthwhile.

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

8 years agoMachineScheduler: Add constructor functions for the DAGMutations
Tom Stellard [Fri, 19 Aug 2016 19:59:18 +0000 (19:59 +0000)]
MachineScheduler: Add constructor functions for the DAGMutations

Summary: This way they can be re-used by target-specific schedulers.

Reviewers: atrick, MatzeB, kparzysz

Subscribers: kparzysz, llvm-commits, MatzeB

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

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

8 years ago[Hexagon] Add RUN line to test
Krzysztof Parzyszek [Fri, 19 Aug 2016 19:36:35 +0000 (19:36 +0000)]
[Hexagon] Add RUN line to test

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

8 years ago[Hexagon] Fix subesthetic indentation
Krzysztof Parzyszek [Fri, 19 Aug 2016 19:29:15 +0000 (19:29 +0000)]
[Hexagon] Fix subesthetic indentation

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

8 years ago[Hexagon] Allow i1 values for 'r' constraint in inline-asm
Krzysztof Parzyszek [Fri, 19 Aug 2016 19:17:28 +0000 (19:17 +0000)]
[Hexagon] Allow i1 values for 'r' constraint in inline-asm

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

8 years ago[CostModel][X86] Added sub, or, and, fadd and fsub costs and missing 512-bit mul...
Simon Pilgrim [Fri, 19 Aug 2016 19:07:10 +0000 (19:07 +0000)]
[CostModel][X86] Added sub, or, and, fadd and fsub costs and missing 512-bit mul costs

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

8 years ago[InstCombine] remove an icmp fold that is already handled by InstSimplify
Sanjay Patel [Fri, 19 Aug 2016 19:03:07 +0000 (19:03 +0000)]
[InstCombine] remove an icmp fold that is already handled by InstSimplify

Specifically, this is done near the end of "SimplifyICmpInst" using
computeKnownBits() as the broader solution. There are even vector
tests (yay!) for this in test/Transforms/InstSimplify/compare.ll.

I considered putting an assert here instead of just deleting, but
then we could assert every possible fold in InstSimplify in
InstCombine, so...less is more?

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

8 years agoAdd missing #include found by modules build.
Richard Smith [Fri, 19 Aug 2016 18:57:17 +0000 (18:57 +0000)]
Add missing #include found by modules build.

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

8 years ago[Hexagon] Do not cache alloca instructions during isel
Krzysztof Parzyszek [Fri, 19 Aug 2016 18:46:13 +0000 (18:46 +0000)]
[Hexagon] Do not cache alloca instructions during isel

They can be deleted or replicated, so the cache may become outdated.
They only need to be visited once during frame lowering, so just scan
the function instead.

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

8 years ago[PM] Re-instate r279227 and r279228 with a fix to the way the templating
Chandler Carruth [Fri, 19 Aug 2016 18:36:06 +0000 (18:36 +0000)]
[PM] Re-instate r279227 and r279228 with a fix to the way the templating
was done to hopefully appease MSVC.

As an upside, this also implements the suggestion Sanjoy made in code
review, so two for one! =]

I'll be watching the bots to see if there are still issues.

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

8 years agoGlobalISel: improve representation of G_SEQUENCE and G_EXTRACT
Tim Northover [Fri, 19 Aug 2016 18:32:14 +0000 (18:32 +0000)]
GlobalISel: improve representation of G_SEQUENCE and G_EXTRACT

First, make sure all types involved are represented, rather than being implicit
from the register width.

Second, canonicalize all types to scalar. These operations just act in bits and
don't care about vectors.

Also standardize spelling of Indices in the MachineIRBuilder (NFC here).

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

8 years ago[CostModel][X86] Added some AVX512 and 512-bit vector cost tests
Simon Pilgrim [Fri, 19 Aug 2016 18:24:10 +0000 (18:24 +0000)]
[CostModel][X86] Added some AVX512 and 512-bit vector cost tests

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

8 years agoRevert "IfConversion: Rescan diamonds."
Kyle Butt [Fri, 19 Aug 2016 18:17:06 +0000 (18:17 +0000)]
Revert "IfConversion: Rescan diamonds."

This reverts commit bfd62a4b4465dd21811bf615c3b04c30ddb09f7b.

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

8 years agoRevert "CodeGen: If Convert blocks that would form a diamond when tail-merged."
Kyle Butt [Fri, 19 Aug 2016 18:17:04 +0000 (18:17 +0000)]
Revert "CodeGen: If Convert blocks that would form a diamond when tail-merged."

This reverts commit 0fda93481c4231c06b838ef476c0c404c51ff875.

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

8 years agoGlobalISel: allow extractvalue to extract an aggregate.
Tim Northover [Fri, 19 Aug 2016 18:09:41 +0000 (18:09 +0000)]
GlobalISel: allow extractvalue to extract an aggregate.

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

8 years ago[Hexagon] Fixes for new-value jump formation
Krzysztof Parzyszek [Fri, 19 Aug 2016 17:54:49 +0000 (17:54 +0000)]
[Hexagon] Fixes for new-value jump formation

- Recognize C2_cmpgtui, S2_tstbit_i, and S4_ntstbit_i.
- Avoid creating new-value instructions with both source operands equal.

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

8 years agoGlobalISel: support translation of extractvalue instructions.
Tim Northover [Fri, 19 Aug 2016 17:47:05 +0000 (17:47 +0000)]
GlobalISel: support translation of extractvalue instructions.

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