]> granicus.if.org Git - llvm/log
llvm
8 years ago[inlineasm] Propagate operand constraints to the backend
Simon Dardis [Mon, 18 Jul 2016 13:17:31 +0000 (13:17 +0000)]
[inlineasm] Propagate operand constraints to the backend

When SelectionDAGISel transforms a node representing an inline asm
block, memory constraint information is not preserved. This can cause
constraints to be broken when a memory offset is of the form:

offset + frame index

when the frame is resolved.

By propagating the constraints all the way to the backend, targets can
enforce memory operands of inline assembly to conform to their constraints.

For MIPSR6, some instructions had their offsets reduced to 9 bits from
16 bits such as ll/sc. This becomes problematic when using inline assembly
to perform atomic operations, as an offset can generated that is too big to
encode in the instruction.

Reviewers: dsanders, vkalintris

Differential Review: https://reviews.llvm.org/D21615

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

8 years agoAMDGPU: Disable AMDGPUPromoteAlloca pass for shader calling conventions.
Nicolai Haehnle [Mon, 18 Jul 2016 09:02:47 +0000 (09:02 +0000)]
AMDGPU: Disable AMDGPUPromoteAlloca pass for shader calling conventions.

Summary:
The work item intrinsics are not available for the shader
calling conventions. And even if we did hook them up most
shader stages haves some extra restrictions on the amount
of available LDS.

Reviewers: tstellarAMD, arsenm

Subscribers: nhaehnle, arsenm, llvm-commits, kzhuravl

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

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

8 years ago[ARM] Update test to use CHECK-LABEL. NFCI.
Diana Picus [Mon, 18 Jul 2016 07:48:42 +0000 (07:48 +0000)]
[ARM] Update test to use CHECK-LABEL. NFCI.

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

8 years ago[ARM] Skip inline asm memory operands in DAGToDAGISel
Diana Picus [Mon, 18 Jul 2016 07:35:14 +0000 (07:35 +0000)]
[ARM] Skip inline asm memory operands in DAGToDAGISel

The current logic for handling inline asm operands in DAGToDAGISel interprets
the operands by looking for constants, which should represent the flags
describing the kind of operand we're dealing with (immediate, memory, register
def etc). The operands representing actual data are skipped only if they are
non-const, with the exception of immediate operands which are skipped explicitly
when a flag describing an immediate is found.

The oversight is that memory operands may be const too (e.g. for device drivers
reading a fixed address), so we should explicitly skip the operand following a
flag describing a memory operand. If we don't, we risk interpreting that
constant as a flag, which is definitely not intended.

Fixes PR26038

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

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

8 years ago[AVX512] Add EVEX versions of scalar ADD/SUB/MUL/DIV to load folding tables.
Craig Topper [Mon, 18 Jul 2016 06:49:32 +0000 (06:49 +0000)]
[AVX512] Add EVEX versions of scalar ADD/SUB/MUL/DIV to load folding tables.

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

8 years ago[X86] Fix test checks to include leading 'v' on avx mnemonic names.
Craig Topper [Mon, 18 Jul 2016 06:49:29 +0000 (06:49 +0000)]
[X86] Fix test checks to include leading 'v' on avx mnemonic names.

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

8 years ago[ARM] Honour ABI for rem under -O0 for EABI, GNUEABI, Android and Musl
Diana Picus [Mon, 18 Jul 2016 06:48:25 +0000 (06:48 +0000)]
[ARM] Honour ABI for rem under -O0 for EABI, GNUEABI, Android and Musl

At higher optimization levels, we generate the libcall for DIVREM_Ix, which is
fine: aeabi_{u|i}divmod. At -O0 we generate the one for REM_Ix, which is the
default {u}mod{q|h|s|d}i3.

This commit makes sure that we don't generate REM_Ix calls for ABIs that
don't support them (i.e. where we need to use DIVREM_Ix instead). This is
achieved by bailing out of FastISel, which can't handle non-double multi-reg
returns, and letting the legalization infrastructure expand the REM_Ix calls.

It also updates the divmod-eabi.ll test to run under -O0 as well, and adds some
Windows checks to it to make sure we don't break things for it.

Fixes PR27068

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

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

8 years ago[AVX512] Add KADD/KAND/KOR/KXOR to X86InstrInfo::isAssociativeAndCommutative.
Craig Topper [Mon, 18 Jul 2016 06:14:59 +0000 (06:14 +0000)]
[AVX512] Add KADD/KAND/KOR/KXOR to X86InstrInfo::isAssociativeAndCommutative.

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

8 years ago[X86] Add VPMULLW/D/Q instructions to X86InstrInfo::isAssociativeAndCommutative.
Craig Topper [Mon, 18 Jul 2016 06:14:57 +0000 (06:14 +0000)]
[X86] Add VPMULLW/D/Q instructions to X86InstrInfo::isAssociativeAndCommutative.

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

8 years ago[X86] Add VPADD instructions to X86InstrInfo::isAssociativeAndCommutative.
Craig Topper [Mon, 18 Jul 2016 06:14:54 +0000 (06:14 +0000)]
[X86] Add VPADD instructions to X86InstrInfo::isAssociativeAndCommutative.

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

8 years ago[X86] Add floating point packed logical ops to X86InstrInfo::isAssociativeAndCommutative.
Craig Topper [Mon, 18 Jul 2016 06:14:50 +0000 (06:14 +0000)]
[X86] Add floating point packed logical ops to X86InstrInfo::isAssociativeAndCommutative.

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

8 years ago[X86] Add AVX512 instructions to X86InstrInfo::isAssociativeAndCommutative.
Craig Topper [Mon, 18 Jul 2016 06:14:47 +0000 (06:14 +0000)]
[X86] Add AVX512 instructions to X86InstrInfo::isAssociativeAndCommutative.

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

8 years ago[X86] Add more AVX512 instructions to X86InstrInfo::isHighLatencyDef. Also add all...
Craig Topper [Mon, 18 Jul 2016 06:14:45 +0000 (06:14 +0000)]
[X86] Add more AVX512 instructions to X86InstrInfo::isHighLatencyDef. Also add all packed fp division instructions.

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

8 years ago[X86] Add AVX512 load opcodes and a couple AVX load opcodes to X86InstrInfo::areLoads...
Craig Topper [Mon, 18 Jul 2016 06:14:43 +0000 (06:14 +0000)]
[X86] Add AVX512 load opcodes and a couple AVX load opcodes to X86InstrInfo::areLoadsFromSameBasePtr.

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

8 years ago[X86] Add more opcodes to isFrameLoadOpcode/isFrameStoreOpcode. Mainly AVX-512 related.
Craig Topper [Mon, 18 Jul 2016 06:14:39 +0000 (06:14 +0000)]
[X86] Add more opcodes to isFrameLoadOpcode/isFrameStoreOpcode. Mainly AVX-512 related.

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

8 years ago[AVX512] Use VMOVAPSZ128rr/VMOVAPS256rr for VR128X/VR256X physreg moves when VLX...
Craig Topper [Mon, 18 Jul 2016 06:14:34 +0000 (06:14 +0000)]
[AVX512] Use VMOVAPSZ128rr/VMOVAPS256rr for VR128X/VR256X physreg moves when VLX is supported.

Ideally we would use VEX encoded moves instead of EVEX if the high 16 registers aren't referenced, but this a good first step.

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

8 years ago[X86] Fix 80-column violations. NFC
Craig Topper [Mon, 18 Jul 2016 06:14:26 +0000 (06:14 +0000)]
[X86] Fix 80-column violations. NFC

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

8 years ago[GVNHoist] Change the key for VNtoInsns to a pair
David Majnemer [Mon, 18 Jul 2016 06:11:37 +0000 (06:11 +0000)]
[GVNHoist] Change the key for VNtoInsns to a pair

While debugging GVNHoist, I found it confusing that the entries in a
VNtoInsns were not always value numbers.  They _usually_ were except for
StoreInst in which case they were a hash of two different value numbers.

This leads to two observations:
- It is more difficult to debug things when the semantic contents of
  VNtoInsns changes over time.
- Using a single value number is not much cheaper, the value of
  VNtoInsns is a SmallVector.
- It is not immediately clear what the algorithm would do if there were
  hash collisions in the StoreInst case.

Using a DenseMap of std::pair sidesteps all of this.

N.B.  The changes in the test were due their sensitivity to the
iteration order of VNtoInsns which has changed.

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

8 years ago[llvm-cov] Attempt to fix a test failure on Windows
Vedant Kumar [Mon, 18 Jul 2016 04:49:42 +0000 (04:49 +0000)]
[llvm-cov] Attempt to fix a test failure on Windows

Don't make the test/tools/llvm-cov/demangle.test depend on the order in
which symbols are seen, or on the exact formatting llvm-cov emits after
a symbol is printed. This is an attempt to fix a Windows bot failure:

  http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9141

I don't know what the root cause of the failure is, or why the
showTemplateInstantiations test doesn't fail in the same way on the
Windows bots. However, this measure can't hurt, and it'll at least get
me on the blamelists again.

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

8 years agoRevert r275678, "Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument...
NAKAMURA Takumi [Mon, 18 Jul 2016 03:23:25 +0000 (03:23 +0000)]
Revert r275678, "Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute""

This reverts also r275029, "Update Clang tests after adding inference for the returned argument attribute"

It broke LTO build. Seems miscompilation.

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

8 years ago[GVNHoist] Sink HoistedCtr into GVNHoist
David Majnemer [Mon, 18 Jul 2016 00:35:01 +0000 (00:35 +0000)]
[GVNHoist] Sink HoistedCtr into GVNHoist

HoistedCtr cannot be a mutated global variable, that will open us up to
races between threads compiling code in parallel.

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

8 years ago[GVNHoist] Some small cleanups
David Majnemer [Mon, 18 Jul 2016 00:34:58 +0000 (00:34 +0000)]
[GVNHoist] Some small cleanups

No functional change is intended, just trying to clean things up a
little.

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

8 years ago[GVN] Move other PRE tests to a subdirectory.
Davide Italiano [Sun, 17 Jul 2016 23:55:20 +0000 (23:55 +0000)]
[GVN] Move other PRE tests to a subdirectory.

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

8 years ago[GVN] Move the PRE/LOADPRE test in a subdirectory.
Davide Italiano [Sun, 17 Jul 2016 23:48:18 +0000 (23:48 +0000)]
[GVN] Move the PRE/LOADPRE test in a subdirectory.

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

8 years ago[GVN] Use FileCheck instead of grep for tests.
Davide Italiano [Sun, 17 Jul 2016 23:21:26 +0000 (23:21 +0000)]
[GVN] Use FileCheck instead of grep for tests.

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

8 years agoStrip trailing whitespace
Simon Pilgrim [Sun, 17 Jul 2016 19:02:27 +0000 (19:02 +0000)]
Strip trailing whitespace

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

8 years ago[X86] Add CTPOP/CTLZ/CTTZ scalar cost tests
Simon Pilgrim [Sun, 17 Jul 2016 18:29:19 +0000 (18:29 +0000)]
[X86] Add CTPOP/CTLZ/CTTZ scalar cost tests

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

8 years agoAdd tests for max/minIntN(64).
Justin Lebar [Sun, 17 Jul 2016 18:19:28 +0000 (18:19 +0000)]
Add tests for max/minIntN(64).

Summary:
Given that we had a bug on max/minUIntN(64), these should have tests
too.

Reviewers: rnk

Subscribers: dylanmckay, llvm-commits

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

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

8 years agoAvoid UB in maxIntN(64).
Justin Lebar [Sun, 17 Jul 2016 18:19:26 +0000 (18:19 +0000)]
Avoid UB in maxIntN(64).

Summary:
Previously we were relying on 2's complement underflow in an int64_t.
Now we cast to a uint64_t so we explicitly get the behavior we want.

Reviewers: rnk

Subscribers: dylanmckay, llvm-commits

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

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

8 years agoClean up some comments in MathExtras.h.
Justin Lebar [Sun, 17 Jul 2016 18:19:25 +0000 (18:19 +0000)]
Clean up some comments in MathExtras.h.

Reviewers: rnk

Subscribers: llvm-commits, dylanmckay

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

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

8 years agoAdd assertions checking SignExtend{32,64}'s bit width.
Justin Lebar [Sun, 17 Jul 2016 18:19:23 +0000 (18:19 +0000)]
Add assertions checking SignExtend{32,64}'s bit width.

Summary:
The bit width must be greater than zero, otherwise we shift by the
integer's width, which is UB.  Also (more obviously) the width must be
less than or equal to the integer's width, otherwise we shift by a
negative number, which is also UB.

Reviewers: rnk

Subscribers: llvm-commits, dylanmckay

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

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

8 years agoFix isShiftedInt and isShiftedUint for widths > 32.
Justin Lebar [Sun, 17 Jul 2016 18:19:21 +0000 (18:19 +0000)]
Fix isShiftedInt and isShiftedUint for widths > 32.

Summary:
Previously we were doing 1 << S.  "1" is an int, so this doesn't work
when S >= 32.

This patch also adds some static_asserts to these functions to ensure
that we don't hit UB by shifting left too much.

Reviewers: rnk

Subscribers: llvm-commits, dylanmckay

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

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

8 years agoUse a faster implementation of maxUIntN.
Justin Lebar [Sun, 17 Jul 2016 18:19:19 +0000 (18:19 +0000)]
Use a faster implementation of maxUIntN.

Summary:
On x86-64 with clang 3.8, before:

   mov     edx, 1
   mov     cl, dil
   shl     rdx, cl
   cmp     rdi, 64
   mov     rax, -1
   cmovne  rax, rdx
   ret

after:

  mov     ecx, 64
  sub     ecx, edi
  mov     rax, -1
  shr     rax, cl
  ret

Reviewers: rnk

Subscribers: dylanmckay, mkuper, llvm-commits

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

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

8 years agoFix warnings in ImmutableSetTest and SequenceTest.
Justin Lebar [Sun, 17 Jul 2016 18:10:30 +0000 (18:10 +0000)]
Fix warnings in ImmutableSetTest and SequenceTest.

Doing "I++" inside of an EXPECT_* triggers

  warning: expression with side effects has no effect in an unevaluated context

because EXPECT_* partially expands to

  EqHelper<(sizeof(::testing::internal::IsNullLiteralHelper(i++)) == 1)>

which is an unevaluated context.

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

8 years ago[X86][AVX] Added VBROADCASTF128/VBROADCASTI128 tests
Simon Pilgrim [Sun, 17 Jul 2016 17:44:18 +0000 (17:44 +0000)]
[X86][AVX] Added VBROADCASTF128/VBROADCASTI128 tests

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

8 years ago[X86] Regenerated ctlz/cttz scalar tests for 32/64-bit targets with/without LZCNT...
Simon Pilgrim [Sun, 17 Jul 2016 16:15:51 +0000 (16:15 +0000)]
[X86] Regenerated ctlz/cttz scalar tests for 32/64-bit targets with/without LZCNT/TZCNT support

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

8 years ago[X86] Regenerated popcnt scalar tests for 32/64-bit targets with/without POPCNT support
Simon Pilgrim [Sun, 17 Jul 2016 16:04:19 +0000 (16:04 +0000)]
[X86] Regenerated popcnt scalar tests for 32/64-bit targets with/without POPCNT support

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

8 years ago[X86][SSE] lowerVectorShuffleAsPermuteAndUnpack tidyup. NFCI.
Simon Pilgrim [Sun, 17 Jul 2016 15:48:25 +0000 (15:48 +0000)]
[X86][SSE] lowerVectorShuffleAsPermuteAndUnpack tidyup. NFCI.

Moved unpack type determination into TryUnpack lambda.

Added missing comment describing lowerVectorShuffleAsPermuteAndUnpack call.

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

8 years ago[ThinLTO] Perform profile-guided indirect call promotion
Teresa Johnson [Sun, 17 Jul 2016 14:47:01 +0000 (14:47 +0000)]
[ThinLTO] Perform profile-guided indirect call promotion

Summary:
To enable profile-guided indirect call promotion in ThinLTO mode, we
simply add call graph edges for each profitable target from the profile
to the summaries, then the summary-guided importing will consider the
callee for importing as usual.

Also we need to enable the indirect call promotion pass creation in the
PassManagerBuilder when PerformThinLTO=true (we are in the ThinLTO
backend), so that the newly imported functions are considered for
promotion in the backends.

The IC promotion profiles refer to callees by GUID, which required
adding GUIDs to the per-module VST in bitcode (and assigning them
valueIds similar to how they are assigned valueIds in the combined
index).

Reviewers: mehdi_amini, xur

Subscribers: mehdi_amini, davidxl, llvm-commits

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

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

8 years agoAddress review comments.
Teresa Johnson [Sun, 17 Jul 2016 14:46:58 +0000 (14:46 +0000)]
Address review comments.

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

8 years agoRefactor indirect call promotion profitability analysis (NFC)
Teresa Johnson [Sun, 17 Jul 2016 14:46:54 +0000 (14:46 +0000)]
Refactor indirect call promotion profitability analysis (NFC)

Summary:
Refactored the profitability analysis out of the IC promotion pass and
into lib/Analysis so that it can be accessed by the summary index
builder in a follow-on patch to enable IC promotion in ThinLTO (D21932).

Reviewers: davidxl, xur

Subscribers: llvm-commits

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

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

8 years agotest commit
Guy Blank [Sun, 17 Jul 2016 12:10:35 +0000 (12:10 +0000)]
test commit

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

8 years agoX86: Updated a test file. NFC.
Elena Demikhovsky [Sun, 17 Jul 2016 07:03:13 +0000 (07:03 +0000)]
X86: Updated a test file. NFC.

This test shows subotimal code generated for AVX-512 vs PENTIUM4.
The issue will be fixed in an upcomming commit.

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

8 years ago[PM] Convert IVUsers analysis to new pass manager.
Dehao Chen [Sat, 16 Jul 2016 22:51:33 +0000 (22:51 +0000)]
[PM] Convert IVUsers analysis to new pass manager.

Summary: Convert IVUsers analysis to new pass manager.

Reviewers: davidxl, silvas

Subscribers: junbuml, sanjoy, llvm-commits, mzolotukhin

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

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

8 years ago[InstCombine] allow X + signbit --> X ^ signbit for vector splats
Sanjay Patel [Sat, 16 Jul 2016 18:29:26 +0000 (18:29 +0000)]
[InstCombine] allow X + signbit --> X ^ signbit for vector splats

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

8 years agoadd vector test to show missing transform
Sanjay Patel [Sat, 16 Jul 2016 18:24:18 +0000 (18:24 +0000)]
add vector test to show missing transform

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

8 years agoIPRA: avoid double query to the map (NFC)
Mehdi Amini [Sat, 16 Jul 2016 18:20:26 +0000 (18:20 +0000)]
IPRA: avoid double query to the map (NFC)

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

8 years agoupdate tests to use FileCheck, consolidate tests, fix comments
Sanjay Patel [Sat, 16 Jul 2016 18:08:22 +0000 (18:08 +0000)]
update tests to use FileCheck, consolidate tests, fix comments

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

8 years agoupdate test to use FileCheck
Sanjay Patel [Sat, 16 Jul 2016 16:31:58 +0000 (16:31 +0000)]
update test to use FileCheck

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

8 years agoauto-generate checks
Sanjay Patel [Sat, 16 Jul 2016 16:27:58 +0000 (16:27 +0000)]
auto-generate checks

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

8 years agoauto-ggenerate checks
Sanjay Patel [Sat, 16 Jul 2016 16:24:06 +0000 (16:24 +0000)]
auto-ggenerate checks

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

8 years ago[InstCombine] reassociate logic ops with constants separated by a zext
Sanjay Patel [Sat, 16 Jul 2016 15:20:19 +0000 (15:20 +0000)]
[InstCombine] reassociate logic ops with constants separated by a zext

This is a partial implementation of a general fold for associative+commutative operators:
(op (cast (op X, C2)), C1) --> (cast (op X, op (C1, C2)))
(op (cast (op X, C2)), C1) --> (op (cast X), op (C1, C2))

There are 7 associative operators and 13 cast types, so this could potentially go a lot further.

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

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

8 years agoRevert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute"
Hal Finkel [Sat, 16 Jul 2016 07:21:28 +0000 (07:21 +0000)]
Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute"

This reverts commit r275042; the initial commit triggered self-hosting failures
on ARM/AArch64. James Molloy identified the problematic backend code, which has
been disabled in r275677. Trying again...

Original commit message:

Let FuncAttrs infer the 'returned' argument attribute

A function can have one argument with the 'returned' attribute, indicating that
the associated argument is always the return value of the function. Add
FuncAttrs inference logic.

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

8 years agoDisable this-return argument forwarding on ARM/AArch64
Hal Finkel [Sat, 16 Jul 2016 07:07:29 +0000 (07:07 +0000)]
Disable this-return argument forwarding on ARM/AArch64

r275042 reverted function-attribute inference for the 'returned' attribute
because the feature triggered self-hosting failures on ARM and AArch64. James
Molloy determined that the this-return argument forwarding feature, which
directly ties the returned input argument to the returned value, was the cause.
It seems likely that this forwarding code contains, or triggers, a subtle bug.
Disabling for now until we can track that down.

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

8 years agoRe-commit [AMDGPU] Add metadata for runtime
Yaxun Liu [Sat, 16 Jul 2016 05:09:21 +0000 (05:09 +0000)]
Re-commit [AMDGPU] Add metadata for runtime

Attempting to fix lit test failure on ppc.

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

8 years ago[AVX512] Remove CodeGenOnly VBROADCAST m_Int instructions. They can be implemented...
Craig Topper [Sat, 16 Jul 2016 03:42:59 +0000 (03:42 +0000)]
[AVX512] Remove CodeGenOnly VBROADCAST m_Int instructions. They can be implemented with patterns selecting existing instructions. NFC

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

8 years agollc: Add support for -run-pass none
Matthias Braun [Sat, 16 Jul 2016 02:24:59 +0000 (02:24 +0000)]
llc: Add support for -run-pass none

This does not schedule any passes besides the ones necessary to
construct and print the machine function. This is useful to test .mir
file reading and printing.

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

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

8 years agollc: Move pass query/add code into an own function; NFC
Matthias Braun [Sat, 16 Jul 2016 02:24:15 +0000 (02:24 +0000)]
llc: Move pass query/add code into an own function; NFC

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

8 years agoARM/MIR: Move test from MIR to CodeGen/ARM directory
Matthias Braun [Sat, 16 Jul 2016 02:24:13 +0000 (02:24 +0000)]
ARM/MIR: Move test from MIR to CodeGen/ARM directory

test/CodeGen/MIR/ARM/ARMLoadStoreDBG.mir is an actual test for the ARM
load store optimization pass and not a test of the mir parser/printer.

It belongs to test/CodeGen/ARM; This also updates the test to use the
new -run-pass llc syntax.

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

8 years agoARM: Initialize LoadStore passes in TargetMachine
Matthias Braun [Sat, 16 Jul 2016 02:24:10 +0000 (02:24 +0000)]
ARM: Initialize LoadStore passes in TargetMachine

Initializing them in LLVMInitializeARMTarget() makes them visible early
enough for "llc -run-pass usage".

This required the pass to be renamed from "arm-load-store-opt" to
"arm-ldst-opt", because there already exists an arm-load-store-opt
cl::opt switch which would now clash with the passname getting added as
a switch in opt. On the bright side the pass name now matches the
DEBUG_TYPE name. Renamed "arm-prera-load-store-opt" to
"arm-repra-ldst-opt" as well for consistency.

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

8 years agoReword comment to be more clear.
Eric Christopher [Sat, 16 Jul 2016 01:55:45 +0000 (01:55 +0000)]
Reword comment to be more clear.

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

8 years agoMIParser: reject subregister indexes on physregs
Matthias Braun [Sat, 16 Jul 2016 01:36:18 +0000 (01:36 +0000)]
MIParser: reject subregister indexes on physregs

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

8 years agoFix modules buildbot after r275633.
Richard Smith [Sat, 16 Jul 2016 01:05:39 +0000 (01:05 +0000)]
Fix modules buildbot after r275633.

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

8 years agoDon't do uint64_t(1) << 64 in maxUIntN.
Justin Lebar [Sat, 16 Jul 2016 00:59:41 +0000 (00:59 +0000)]
Don't do uint64_t(1) << 64 in maxUIntN.

Summary:
This shift is undefined behavior (and, as compiled by clang, gives the
wrong answer for maxUIntN(64)).

Reviewers: mkuper

Subscribers: llvm-commits, jroelofs, rsmith

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

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

8 years ago[libFuzzer] add hooks for strstr, strcasestr, strcasecmp, strncasecmp
Kostya Serebryany [Fri, 15 Jul 2016 23:27:19 +0000 (23:27 +0000)]
[libFuzzer] add hooks for strstr, strcasestr, strcasecmp, strncasecmp

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

8 years ago[llvm-cov] Attempt to appease an older builder
Vedant Kumar [Fri, 15 Jul 2016 23:15:35 +0000 (23:15 +0000)]
[llvm-cov] Attempt to appease an older builder

It's using a version of clang which can't (or won't) deduce an implicit
conversion from a SmallString to a StringRef. Write the conversion out
explicitly:

  http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/8574

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

8 years agobugpoint: add flag -verbose-errors
Sebastian Pop [Fri, 15 Jul 2016 23:15:06 +0000 (23:15 +0000)]
bugpoint: add flag -verbose-errors

The default behavior of bugpoint is to print "<crash>" when it finds a reduced
test that crashes compilation.  With this flag we now can see the output of the
crashing program.  This is useful to make sure it is the same error being
tracked down and not a different error that happens to crash the compiler as
well.

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

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

8 years agoReapply "Mips: Avoid implicit iterator conversions, NFC"
Duncan P. N. Exon Smith [Fri, 15 Jul 2016 23:09:47 +0000 (23:09 +0000)]
Reapply "Mips: Avoid implicit iterator conversions, NFC"

This reverts commit r275562, effectively reapplying r275141.  Doug
Gilmore reported that there was an error when bisecting the Mips
buildbot failure, and that r275141 was not to blame after all.  Here is
the green build:
https://dmz-portal.mips.com/bb/builders/LLVM%20with%20integrated%20assembler%20and%20fPIC%20and%20-O0/builds/803

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

8 years ago[llvm-cov] Attempt to appease Windows bots
Vedant Kumar [Fri, 15 Jul 2016 23:08:22 +0000 (23:08 +0000)]
[llvm-cov] Attempt to appease Windows bots

They appear to reject r275640 because stdin is held open during an
ExecuteAndWait in which it's redirected:

  http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/8390

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

8 years ago[llvm-cov] Optionally use a symbol demangler when preparing reports
Vedant Kumar [Fri, 15 Jul 2016 22:44:57 +0000 (22:44 +0000)]
[llvm-cov] Optionally use a symbol demangler when preparing reports

Add an option to specify a symbol demangler (as well as options to the
demangler). This can be used to make reports more human-readable.

This option is especially useful in -output-dir mode, since it isn't as
easy to manually pipe reports into a demangler in this mode.

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

8 years ago[llvm-cov] Document a few private fields of CodeCoverageTool (NFC)
Vedant Kumar [Fri, 15 Jul 2016 22:44:54 +0000 (22:44 +0000)]
[llvm-cov] Document a few private fields of CodeCoverageTool (NFC)

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

8 years ago[Support] Fix a doxygen comment (NFC)
Vedant Kumar [Fri, 15 Jul 2016 22:44:52 +0000 (22:44 +0000)]
[Support] Fix a doxygen comment (NFC)

There was a missing "<" on a line, so its contents wrapped around into
the description of the next argument.

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

8 years agoMinor code cleanups. NFC.
Junmo Park [Fri, 15 Jul 2016 22:42:52 +0000 (22:42 +0000)]
Minor code cleanups. NFC.

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

8 years ago[lanai] Small cleanup: remove/comment out unused args
Jacques Pienaar [Fri, 15 Jul 2016 22:38:32 +0000 (22:38 +0000)]
[lanai] Small cleanup: remove/comment out unused args

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

8 years agoAMDGPU: Fix verifier error from partially undef copy
Matt Arsenault [Fri, 15 Jul 2016 22:32:02 +0000 (22:32 +0000)]
AMDGPU: Fix verifier error from partially undef copy

In this situation:

%VGPR2<def> = BUFFER_LOAD_DWORD_OFFSET %SGPR8_SGPR9_SGPR10_SGPR11,
%VGPR7<def,tied3> = V_MAC_F32_e32 %VGPR0<undef>, %VGPR1<kill>, %VGPR7<kill,tied0>, %EXEC<imp-use>
%VGPR3_VGPR4_VGPR5_VGPR6<def> = COPY %VGPR0_VGPR1_VGPR2_VGPR3
%VGPR4<def> = COPY %VGPR2

The copy for VGPR1 -> VGPR4 was an error from reading undefined VGPR1,
but VGPR4 is defined immediately after this copy.

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

8 years agoExpandPostRAPseudos should transfer implicit uses, not only implicit defs
Michael Kuperstein [Fri, 15 Jul 2016 22:31:14 +0000 (22:31 +0000)]
ExpandPostRAPseudos should transfer implicit uses, not only implicit defs

Previously, we would expand:
%BL<def> = COPY %DL<kill>, %EBX<imp-use,kill>, %EBX<imp-def>
Into:
%BL<def> = MOV8rr %DL<kill>, %EBX<imp-def>
Dropping the imp-use on the floor.

That confused CriticalAntiDepBreaker, which (correctly) assumes that if an
instruction defs but doesn't use a register, that register is dead immediately
before the instruction - while in this case, the high lanes of EBX can be very
much alive.

This fixes PR28560.

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

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

8 years agoBPF: Use official ELF e_machine value
Alexei Starovoitov [Fri, 15 Jul 2016 22:27:55 +0000 (22:27 +0000)]
BPF: Use official ELF e_machine value

The same value for EM_BPF is being propagated to glibc,
elfutils, and binutils.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275633 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[lanai] Fix build by updating calls to getLoad & getStore.
Jacques Pienaar [Fri, 15 Jul 2016 22:18:33 +0000 (22:18 +0000)]
[lanai] Fix build by updating calls to getLoad & getStore.

rL275592 removed the boolean parameters of SelectionDAG::getLoad and getStore, updating Lanai backend's calls to these functions.

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

8 years ago[pdb] Teach MsfBuilder and other classes about the Free Page Map.
Zachary Turner [Fri, 15 Jul 2016 22:17:19 +0000 (22:17 +0000)]
[pdb] Teach MsfBuilder and other classes about the Free Page Map.

Block 1 and 2 of an MSF file are bit vectors that represent the
list of blocks allocated and free in the file.  We had been using
these blocks to write stream data and other data, so we mark them
as the free page map now.  We don't yet serialize these pages to
the disk, but at least we make a note of what it is, and avoid
writing random data to them.

Doing this also necessitated cleaning up some of the tests to be
more general and hardcode fewer values, which is nice.

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

8 years ago[pdb] Round trip the NameMap data structure to YAML.
Zachary Turner [Fri, 15 Jul 2016 22:17:08 +0000 (22:17 +0000)]
[pdb] Round trip the NameMap data structure to YAML.

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

8 years ago[pdb] Use MsfBuilder to handle the writing PDBs.
Zachary Turner [Fri, 15 Jul 2016 22:16:56 +0000 (22:16 +0000)]
[pdb] Use MsfBuilder to handle the writing PDBs.

Previously we would read a PDB, then write some of it back out,
but write the directory, super block, and other pertinent metadata
back out unchanged.  This generates incorrect PDBs since the amount
of data written was not always the same as the amount of data read.

This patch changes things to use the newly introduced `MsfBuilder`
class to write out a correct and accurate set of Msf metadata for
the data *actually* written, which opens up the door for adding and
removing type records, symbol records, and other types of data to
an existing PDB.

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

8 years agoStructurizeCFG: Fix inverting constantexpr conditions
Matt Arsenault [Fri, 15 Jul 2016 22:13:16 +0000 (22:13 +0000)]
StructurizeCFG: Fix inverting constantexpr conditions

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

8 years ago[Hexagon] Handle instruction latency for 0 or 2 cycles
Krzysztof Parzyszek [Fri, 15 Jul 2016 21:34:02 +0000 (21:34 +0000)]
[Hexagon] Handle instruction latency for 0 or 2 cycles

The Hexagon schedulers need to handle instructions with a latency
of 0 or 2 more accurately. The problem, in v60, is that a dependence
between two instructions with a 2 cycle latency can use a .cur version
of the source to achieve a 0 cycle latency when the use is in the
same packet. Any othe use, must be at least 2 packets later, or a
stall occurs. In other words, the compiler does not want to schedule
the dependent instructions 1 cycle later.

To achieve this, the latency adjustment code allows only a single
dependence to have a zero latency. All other instructions have the
other value, which is typically 2 cycles. We use a heuristic to
determine which instruction gets the 0 latency.

The Hexagon machine scheduler was also changed to increase the cost
associated with 0 latency dependences than can be scheduled in the
same packet.

Patch by Brendon Cahoon.

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

8 years agoAMDGPU: Remove brev intrinsic
Matt Arsenault [Fri, 15 Jul 2016 21:27:13 +0000 (21:27 +0000)]
AMDGPU: Remove brev intrinsic

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

8 years agoAMDGPU: Fix TargetPrefix for remaining r600 intrinsics
Matt Arsenault [Fri, 15 Jul 2016 21:27:08 +0000 (21:27 +0000)]
AMDGPU: Fix TargetPrefix for remaining r600 intrinsics

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

8 years agoAMDGPU: Remove AMDGPU.ldexp
Matt Arsenault [Fri, 15 Jul 2016 21:26:56 +0000 (21:26 +0000)]
AMDGPU: Remove AMDGPU.ldexp

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

8 years agoAMDGPU: Remove legacy rsq.clamped intrinsic
Matt Arsenault [Fri, 15 Jul 2016 21:26:52 +0000 (21:26 +0000)]
AMDGPU: Remove legacy rsq.clamped intrinsic

Mesa still has a use of llvm.AMDGPU.rsq.f64 remaining.

Also fix mismatch with non-IEEE rsq selecting to IEEE rsq.

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

8 years agoAMDGPU/R600: Delete dead code.
Matt Arsenault [Fri, 15 Jul 2016 21:26:46 +0000 (21:26 +0000)]
AMDGPU/R600: Delete dead code.

Dead or the same as the base implementation.

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

8 years agoDebugInfo: reorder some initializers
Saleem Abdulrasool [Fri, 15 Jul 2016 21:10:31 +0000 (21:10 +0000)]
DebugInfo: reorder some initializers

Fix a few initialization ordering warnings from gcc from `-Wreorder`.  NFC.

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

8 years agoCodeGen: avoid emitting unnecessary CFI
Saleem Abdulrasool [Fri, 15 Jul 2016 21:10:29 +0000 (21:10 +0000)]
CodeGen: avoid emitting unnecessary CFI

Remove unnecessary clutter in assembly output.  When using SjLj EH, the CFI is
not actually used for anything.  Do not emit the CFI needlessly.  The minor test
adjustments are interesting.  The prologue test was just overzealous matcching.
The interesting case is the LSDA change.  It was originally added to ensure that
various compilations did not mangle the name (it explicitly checked the name!).
However, subsequent cleanups made it more reliant on the CFI to find the name.
Parse the generated code flow to generically find the label still.

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

8 years agoMake processInstruction from LCSSA.cpp externally available.
Michael Zolotukhin [Fri, 15 Jul 2016 21:08:41 +0000 (21:08 +0000)]
Make processInstruction from LCSSA.cpp externally available.

Summary:
When a pass tries to keep LCSSA form it's often convenient to be able to update
LCSSA for a set of instructions rather than for the entire loop. This patch makes the
processInstruction from LCSSA externally available under a name
formLCSSAForInstruction.

Reviewers: chandlerc, sanjoy, hfinkel

Subscribers: llvm-commits

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

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

8 years ago[pdb] Introduce MsfBuilder for laying out PDB files.
Zachary Turner [Fri, 15 Jul 2016 20:43:38 +0000 (20:43 +0000)]
[pdb] Introduce MsfBuilder for laying out PDB files.

Reviewed by: ruiu
Differential Revision: https://reviews.llvm.org/D22308

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

8 years agoTeach fast isel about the win64 calling convention.
Nico Weber [Fri, 15 Jul 2016 20:18:37 +0000 (20:18 +0000)]
Teach fast isel about the win64 calling convention.

This mostly just works.

Vectorcall rets are still not supported.

The win64_eh test change is because fast isel doesn't use rsi for temporary
computations, so it doesn't need to be pushed. The test case I'm changing was
originally added to test pushes, but by now there are other test cases in that
file exercising that code path.

https://reviews.llvm.org/D22422

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

8 years ago[Hexagon] Make MI scheduler check for stalls in previous packet on v60
Krzysztof Parzyszek [Fri, 15 Jul 2016 20:16:03 +0000 (20:16 +0000)]
[Hexagon] Make MI scheduler check for stalls in previous packet on v60

Patch by Ikhlas Ajbar.

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

8 years ago[CFLAA] Add attributes handling for CFLAnders.
George Burgess IV [Fri, 15 Jul 2016 20:02:49 +0000 (20:02 +0000)]
[CFLAA] Add attributes handling for CFLAnders.

This patch adds proper handling of stratified attributes into our
anders-style CFLAA implementation. It also comes bundled with more
CFLAnders tests. :)

Patch by Jia Chen.

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

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

8 years ago[PowerPC] Set kill flag for scratch register when spilling the link register
Nemanja Ivanovic [Fri, 15 Jul 2016 19:56:32 +0000 (19:56 +0000)]
[PowerPC] Set kill flag for scratch register when spilling the link register

This fixes PR 28526.

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

8 years ago[CFLAA] Add an initial CFLAnders implementation.
George Burgess IV [Fri, 15 Jul 2016 19:53:25 +0000 (19:53 +0000)]
[CFLAA] Add an initial CFLAnders implementation.

This adds an incomplete anders-style implementation for CFLAA. It's
incomplete in that it's missing interprocedural analysis, attrs
handling, etc. and that it needs more tests. More tests and features
will be added in future commits.

Patch by Jia Chen.

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

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

8 years agoFix calls to SelectionDAG::getStore
Derek Schuff [Fri, 15 Jul 2016 19:35:43 +0000 (19:35 +0000)]
Fix calls to SelectionDAG::getStore

It was refactored in r275592. NFC

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

8 years agoRevert "[AMDGPU] Add metadata for runtime"
Vitaly Buka [Fri, 15 Jul 2016 19:14:57 +0000 (19:14 +0000)]
Revert "[AMDGPU] Add metadata for runtime"

This reverts commit r275566.

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

8 years ago[Hexagon] Replace postprocessDAG with a more elaborate DAG mutation
Krzysztof Parzyszek [Fri, 15 Jul 2016 19:09:37 +0000 (19:09 +0000)]
[Hexagon] Replace postprocessDAG with a more elaborate DAG mutation

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