oota-llvm.git
8 years ago[X86] SRL non-LSB extracts when folding to truncating broadcasts.
Ahmed Bougacha [Fri, 6 Nov 2015 23:16:43 +0000 (23:16 +0000)]
[X86] SRL non-LSB extracts when folding to truncating broadcasts.

Now that we recognize this, we can support it instead of bailing out.
That is, we can fold:
  (v8i16 (shufflevector
    (v8i16 (bitcast (v4i32 (build_vector X, Y, ...)))),
    <1,1,...,1>))
into:
  (v8i16 (vbroadcast (i16 (trunc (srl Y, 16)))))

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

8 years ago[X86] Don't fold non-LSB extracts into truncating broadcasts.
Ahmed Bougacha [Fri, 6 Nov 2015 23:16:38 +0000 (23:16 +0000)]
[X86] Don't fold non-LSB extracts into truncating broadcasts.

We used to incorrectly assume that the offset we're extracting from
was a multiple of the element size. So, we'd fold:
  (v8i16 (shufflevector
    (v8i16 (bitcast (v4i32 (build_vector X, Y, ...)))),
    <1,1,...,1>))
into:
  (v8i16 (vbroadcast (i16 (trunc Y))))
whereas we should have extracted the higher bits from X.

Instead, bail out if the assumption doesn't hold.

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

8 years agoDAGCombiner: Check shouldReduceLoadWidth before combining (and (load), x) -> extload
Tom Stellard [Fri, 6 Nov 2015 21:58:37 +0000 (21:58 +0000)]
DAGCombiner: Check shouldReduceLoadWidth before combining (and (load), x) -> extload

Reviewers: resistor, arsenm

Subscribers: llvm-commits

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

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

8 years ago[WebAssembly] Use more explicit types in testcases.
Dan Gohman [Fri, 6 Nov 2015 21:32:42 +0000 (21:32 +0000)]
[WebAssembly] Use more explicit types in testcases.

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

8 years ago[WebAssembly] Add more explicit pushes to the tests.
Dan Gohman [Fri, 6 Nov 2015 21:26:50 +0000 (21:26 +0000)]
[WebAssembly] Add more explicit pushes to the tests.

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

8 years ago[InstCombine] Don't RAUW tokens with undef
David Majnemer [Fri, 6 Nov 2015 21:26:32 +0000 (21:26 +0000)]
[InstCombine] Don't RAUW tokens with undef

Let SimplifyCFG remove unreachable BBs which define token instructions.

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

8 years ago[SimplifyLibCalls] Don't hardcode the function name.
Davide Italiano [Fri, 6 Nov 2015 21:05:07 +0000 (21:05 +0000)]
[SimplifyLibCalls] Don't hardcode the function name.

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

8 years ago[ShrinkWrapping] Teach shrink-wrapping how to analyze RegMask.
Quentin Colombet [Fri, 6 Nov 2015 21:00:13 +0000 (21:00 +0000)]
[ShrinkWrapping] Teach shrink-wrapping how to analyze RegMask.

Previously we were conservatively assuming that RegMask operands clobber
callee saved registers.

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

8 years agoMachineScheduler: Add regpressure information to debug dump
Matthias Braun [Fri, 6 Nov 2015 20:59:02 +0000 (20:59 +0000)]
MachineScheduler: Add regpressure information to debug dump

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

8 years agoAMDGPU/SI: Refactor VOP[12C] tablegen definitions
Tom Stellard [Fri, 6 Nov 2015 20:56:18 +0000 (20:56 +0000)]
AMDGPU/SI: Refactor VOP[12C] tablegen definitions

Summary:
Pass the VOPProfile object all the through to *_m multiclasses.  This will
allow us to do more simplifications in the future.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

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

8 years agoFix SLPVectorizer commutativity reordering
Mehdi Amini [Fri, 6 Nov 2015 20:17:51 +0000 (20:17 +0000)]
Fix SLPVectorizer commutativity reordering

The SLPVectorizer had a very crude way of trying to benefit
from associativity: it tried to optimize for splat/broadcast
or in order to have the same operator on the same side.
This is benefitial to the cost model and allows more vectorization
to occur.
This patch improve the logic and make the detection optimal (locally,
we don't look at the full tree but only at the immediate children).

Should fix https://llvm.org/bugs/show_bug.cgi?id=25247

Reviewers: mzolotukhin

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

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

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

8 years agoImproved the operands commute transformation for X86-FMA3 instructions.
Andrew Kaylor [Fri, 6 Nov 2015 19:47:25 +0000 (19:47 +0000)]
Improved the operands commute transformation for X86-FMA3 instructions.
All 3 operands of FMA3 instructions are commutable now.

Patch by Slava Klochkov

Reviewers: Quentin Colombet(qcolombet), Ahmed Bougacha(ab).

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

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

8 years ago[WebAssembly] Make expression-stack pushing explicit
Dan Gohman [Fri, 6 Nov 2015 19:45:01 +0000 (19:45 +0000)]
[WebAssembly] Make expression-stack pushing explicit

Modelling of the expression stack is evolving. This patch takes another
step by making pushes explicit.

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

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

8 years ago[ValueTracking] Add parameters to isImpliedCondition; NFC
Sanjoy Das [Fri, 6 Nov 2015 19:01:08 +0000 (19:01 +0000)]
[ValueTracking] Add parameters to isImpliedCondition; NFC

Summary:
This change makes the `isImpliedCondition` interface similar to the rest
of the functions in ValueTracking (in that it takes a DataLayout,
AssumptionCache etc.).  This is an NFC, intended to make a later diff
less noisy.

Depends on D14369

Subscribers: llvm-commits

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

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

8 years ago[ValueTracking] De-pessimize isImpliedCondition around unsigned compares
Sanjoy Das [Fri, 6 Nov 2015 19:01:03 +0000 (19:01 +0000)]
[ValueTracking] De-pessimize isImpliedCondition around unsigned compares

Summary:
Currently `isImpliedCondition` will optimize "I +_nuw C < L ==> I < L"
only if C is positive.  This is an unnecessary restriction -- the
implication holds even if `C` is negative.

Reviewers: reames, majnemer

Subscribers: llvm-commits

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

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

8 years ago[ValueTracking] Add a framework for encoding implication rules
Sanjoy Das [Fri, 6 Nov 2015 19:00:57 +0000 (19:00 +0000)]
[ValueTracking] Add a framework for encoding implication rules

Summary:
This change adds a framework for adding more smarts to
`isImpliedCondition` around inequalities.  Informally,
`isImpliedCondition` will now try to prove "A < B ==> C < D" by proving
"C <= A && B <= D", since then it follows "C <= A < B <= D".

While this change is in principle NFC, I could not think of a way to not
handle cases like "i +_nsw 1 < L ==> i < L +_nsw 1" (that ValueTracking
did not handle before) while keeping the change understandable.  I've
added tests for these cases.

Reviewers: reames, majnemer, hfinkel

Subscribers: llvm-commits

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

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

8 years ago[Docs] Change ARM build info to CMake
Renato Golin [Fri, 6 Nov 2015 18:39:34 +0000 (18:39 +0000)]
[Docs] Change ARM build info to CMake

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

8 years agoAMDGPU: Cleanup includes
Matt Arsenault [Fri, 6 Nov 2015 18:23:00 +0000 (18:23 +0000)]
AMDGPU: Cleanup includes

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

8 years agoAMDGPU: Create emergency stack slots during frame lowering
Matt Arsenault [Fri, 6 Nov 2015 18:17:45 +0000 (18:17 +0000)]
AMDGPU: Create emergency stack slots during frame lowering

Test has a bogus verifier error which will be fixed by later commits.

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

8 years agoAMDGPU: Remove unused scratch resource operands
Matt Arsenault [Fri, 6 Nov 2015 18:07:53 +0000 (18:07 +0000)]
AMDGPU: Remove unused scratch resource operands

The SGPR spill pseudos don't actually use them.

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

8 years agoAMDGPU: Add pass to detect used kernel features
Matt Arsenault [Fri, 6 Nov 2015 18:01:57 +0000 (18:01 +0000)]
AMDGPU: Add pass to detect used kernel features

Mark kernels that use certain features that require user
SGPRs to support with kernel attributes. We need to know
before instruction selection begins because it impacts
the kernel calling convention lowering.

For now this only detects the workitem intrinsics.

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

8 years agoAMDGPU: Fix hardcoded alignment of spill.
Matt Arsenault [Fri, 6 Nov 2015 17:54:47 +0000 (17:54 +0000)]
AMDGPU: Fix hardcoded alignment of spill.

Instead of forcing 4 alignment when spilled, set register class
alignments.

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

8 years agoAMDGPU: Hack for VS_32 register pressure
Matt Arsenault [Fri, 6 Nov 2015 17:54:43 +0000 (17:54 +0000)]
AMDGPU: Hack for VS_32 register pressure

For some reason VS_32 ends up factoring into the pressure heuristics
even though we should never see a virtual register with this class.

When SGPRs are reserved for register spilling, this for some reason
triggers reg-crit scheduling.

Setting isAllocatable = 0 may help with this since that seems to remove
it from the default implementation's generated table.

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

8 years agoRestore "Move metadata linking after lazy global materialization/linking."
Teresa Johnson [Fri, 6 Nov 2015 17:50:53 +0000 (17:50 +0000)]
Restore "Move metadata linking after lazy global materialization/linking."

Summary:
This reverts commit r251965.

Restore "Move metadata linking after lazy global materialization/linking."

This restores commit r251926, with fixes for the LTO bootstrapping bot
failure.

The bot failure was caused by references from debug metadata to
otherwise unreferenced globals. Previously, this caused the lazy linking
to link in their defs, which is unnecessary. With this patch, because
lazy linking is complete when we encounter the metadata reference, the
materializer created a declaration. For definitions such as aliases and
comdats, it is illegal to have a declaration. Furthermore, metadata
linking should not change code generation. Therefore, when linking of
global value bodies is complete, the materializer will simply return
nullptr as the new reference for the linked metadata.

This change required fixing a different test to ensure there was a
real reference to a linkonce global that was only being reference from
metadata.

Note that the new changes to the only-needed-named-metadata.ll test
illustrate an issue with llvm-link -only-needed handling of comdat
groups, whereby it may result in an incomplete comdat group. I note this
in the test comments, but the issue is orthogonal to this patch (it can
be reproduced without any metadata at head).

Reviewers: dexonsmith, rafael, tra

Subscribers: tobiasvk, joker.eph, llvm-commits

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

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

8 years agoRestore "Move metadata linking after lazy global materialization/linking."
Teresa Johnson [Fri, 6 Nov 2015 17:50:48 +0000 (17:50 +0000)]
Restore "Move metadata linking after lazy global materialization/linking."

This reverts commit r251965.

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

8 years ago[WinEH] Mark funclet entries and exits as clobbering all registers
Reid Kleckner [Fri, 6 Nov 2015 17:06:38 +0000 (17:06 +0000)]
[WinEH] Mark funclet entries and exits as clobbering all registers

Summary:
In this implementation, LiveIntervalAnalysis invents a few register
masks on basic block boundaries that preserve no registers. The nice
thing about this is that it prevents the prologue inserter from thinking
it needs to spill all XMM CSRs, because it doesn't see any explicit
physreg defs in the MI.

Reviewers: MatzeB, qcolombet, JosephTremoulet, majnemer

Subscribers: MatzeB, llvm-commits

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

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

8 years ago[LIR] Simplify code by making DataLayout globally accessible. NFC.
Chad Rosier [Fri, 6 Nov 2015 16:33:57 +0000 (16:33 +0000)]
[LIR] Simplify code by making DataLayout globally accessible. NFC.

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

8 years ago[AArch64]Enable the narrow ld promotion only on profitable microarchitectures
Jun Bum Lim [Fri, 6 Nov 2015 16:27:47 +0000 (16:27 +0000)]
[AArch64]Enable the narrow ld promotion only on profitable microarchitectures

The benefit from converting narrow loads into a wider load (r251438) could be
micro-architecturally dependent, as it assumes that a single load with two bitfield
extracts is cheaper than two narrow loads. Currently, this conversion is
enabled only in cortex-a57 on which performance benefits were verified.

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

8 years agoBring r252305 back with a test fix.
Rafael Espindola [Fri, 6 Nov 2015 15:30:45 +0000 (15:30 +0000)]
Bring r252305 back with a test fix.

We now create the .eh_frame section early, just like every other special
section.

This means that the special flags are visible in code that explicitly
asks for ".eh_frame".

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

8 years agoRevert "Simplify the creation of .eh_frame/.debug_frame sections."
Rafael Espindola [Fri, 6 Nov 2015 14:51:09 +0000 (14:51 +0000)]
Revert "Simplify the creation of .eh_frame/.debug_frame sections."

This reverts commit r252305.

Investigating a test failure.

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

8 years agoSimplify the creation of .eh_frame/.debug_frame sections.
Rafael Espindola [Fri, 6 Nov 2015 14:47:44 +0000 (14:47 +0000)]
Simplify the creation of .eh_frame/.debug_frame sections.

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

8 years agogit clang-format and fix variable names. NFC.
Rafael Espindola [Fri, 6 Nov 2015 14:12:17 +0000 (14:12 +0000)]
git clang-format and fix variable names. NFC.

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

8 years agoUse SHT_X86_64_UNWIND on every OS.
Rafael Espindola [Fri, 6 Nov 2015 13:35:35 +0000 (13:35 +0000)]
Use SHT_X86_64_UNWIND on every OS.

That is the ABI required type. Linkers still check the section name, so
everything should still work.

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

8 years agoPass SectionStart directly to the one function that uses it.
Rafael Espindola [Fri, 6 Nov 2015 13:14:59 +0000 (13:14 +0000)]
Pass SectionStart directly to the one function that uses it.

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

8 years ago[mips][ias] Range check uimm4 operands and fixed a bug this revealed.
Daniel Sanders [Fri, 6 Nov 2015 12:41:43 +0000 (12:41 +0000)]
[mips][ias] Range check uimm4 operands and fixed a bug this revealed.

Summary:
The bug was that the sldi instructions have immediate widths dependant on
their element size. So sldi.d has a 1-bit immediate and sldi.b has a 4-bit
immediate. All of these were using 4-bit immediates previously.

Reviewers: vkalintiris

Subscribers: llvm-commits, atanasyan, dsanders

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

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

8 years ago[mips][ias] Range check uimm3 operands.
Daniel Sanders [Fri, 6 Nov 2015 12:31:27 +0000 (12:31 +0000)]
[mips][ias] Range check uimm3 operands.

Summary:

Reviewers: vkalintiris

Subscribers: atanasyan, dsanders, llvm-commits

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

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

8 years ago[mips][ias] Range check uimm2 operands and fix a bug this revealed.
Daniel Sanders [Fri, 6 Nov 2015 12:22:31 +0000 (12:22 +0000)]
[mips][ias] Range check uimm2 operands and fix a bug this revealed.

Summary:
The bug was that the MIPS32R6/MIPS64R6/microMIPS32R6 versions of LSA and DLSA
(unlike the MSA version) failed to account for the off-by-one encoding of the
immediate. The range is actually 1..4 rather than 0..3.

Reviewers: vkalintiris

Subscribers: atanasyan, dsanders, llvm-commits

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

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

8 years ago[mips][ias] Range check uimmz operands.
Daniel Sanders [Fri, 6 Nov 2015 12:11:03 +0000 (12:11 +0000)]
[mips][ias] Range check uimmz operands.

Reviewers: vkalintiris

Subscribers: dsanders, atanasyan, llvm-commits

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

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

8 years ago[mips] Define patterns for the atomic_{load,store}_{8,16,32,64} nodes.
Vasileios Kalintiris [Fri, 6 Nov 2015 12:07:20 +0000 (12:07 +0000)]
[mips] Define patterns for the atomic_{load,store}_{8,16,32,64} nodes.

Summary:
Without these patterns we would generate a complete LL/SC sequence.
This would be problematic for memory regions marked as WRITE-only or
READ-only, as the instructions LL/SC would read/write to the protected
memory regions correspondingly.

Reviewers: dsanders

Subscribers: llvm-commits, dsanders

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

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

8 years agoAMDGPU/SI: Emit HSA kernels with symbol type STT_AMDGPU_HSA_KERNEL
Tom Stellard [Fri, 6 Nov 2015 11:45:14 +0000 (11:45 +0000)]
AMDGPU/SI: Emit HSA kernels with symbol type STT_AMDGPU_HSA_KERNEL

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

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

8 years agoAdd a new attribute: norecurse
James Molloy [Fri, 6 Nov 2015 10:32:53 +0000 (10:32 +0000)]
Add a new attribute: norecurse

This attribute allows the compiler to assume that the function never recurses into itself, either directly or indirectly (transitively). This can be used among other things to demote global variables to locals.

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

8 years agoDIBuilder.h: Prune \param(s) corresponding to r252219. [-Wdocumentation]
NAKAMURA Takumi [Fri, 6 Nov 2015 10:30:32 +0000 (10:30 +0000)]
DIBuilder.h: Prune \param(s) corresponding to r252219. [-Wdocumentation]

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

8 years agoRevert r252249 (and r252255, r252258), "[WinEH] Clone funclets with multiple parents"
NAKAMURA Takumi [Fri, 6 Nov 2015 10:07:33 +0000 (10:07 +0000)]
Revert r252249 (and r252255, r252258), "[WinEH] Clone funclets with multiple parents"

It behaved flaky due to iterating pointer key values on std::set and std::map.

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

8 years agoCode style fix (caused by wrongly default clang-format style) (NFC)
Xinliang David Li [Fri, 6 Nov 2015 07:54:21 +0000 (07:54 +0000)]
Code style fix (caused by wrongly default clang-format style) (NFC)

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

8 years agoSimplify the alignment handling in FDE emission.
Rafael Espindola [Fri, 6 Nov 2015 03:02:51 +0000 (03:02 +0000)]
Simplify the alignment handling in FDE emission.

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

8 years agoDelete dead store. NFC.
Rafael Espindola [Fri, 6 Nov 2015 02:44:22 +0000 (02:44 +0000)]
Delete dead store. NFC.

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

8 years agodocs: Document function-attached metadata and IR changes from r252219.
Peter Collingbourne [Fri, 6 Nov 2015 02:41:02 +0000 (02:41 +0000)]
docs: Document function-attached metadata and IR changes from r252219.

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

8 years agoRange-for some LiveIntervals code under review
Reid Kleckner [Fri, 6 Nov 2015 02:01:02 +0000 (02:01 +0000)]
Range-for some LiveIntervals code under review

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

8 years ago[WinEH] Split EH_RESTORE out of CATCHRET for 32-bit EH
Reid Kleckner [Fri, 6 Nov 2015 01:49:05 +0000 (01:49 +0000)]
[WinEH] Split EH_RESTORE out of CATCHRET for 32-bit EH

This adds the EH_RESTORE x86 pseudo instr, which is responsible for
restoring the stack pointers: EBP and ESP, and ESI if stack realignment
is involved. We only need this on 32-bit x86, because on x64 the runtime
restores CSRs for us.

Previously we had to keep the CATCHRET instruction around during SEH so
that we could convince X86FrameLowering to restore our frame pointers.
Now we can split these instructions earlier.

This was confusing, because we had a return instruction which wasn't
really a return and was ultimately going to be removed by
X86FrameLowering. This change also simplifies X86FrameLowering, which
really shouldn't be building new MBBs.

No observable functional change currently, but with the new register
mask stuff in D14407, CATCHRET will become a register allocator barrier,
and our existing tests rely on us having reasonable register allocation
around SEH.

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

8 years agoNFC: Update documentation for createUniqueFile() to explain that models without an...
Cameron Esfahani [Fri, 6 Nov 2015 01:45:30 +0000 (01:45 +0000)]
NFC: Update documentation for createUniqueFile() to explain that models without an absolute path will be created in the current directory.

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

8 years agoUse a range loop.
Rafael Espindola [Fri, 6 Nov 2015 01:25:56 +0000 (01:25 +0000)]
Use a range loop.

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

8 years ago[Statepoints] Mark gc.result and gc.relocate as readonly
Igor Laevsky [Fri, 6 Nov 2015 01:15:58 +0000 (01:15 +0000)]
[Statepoints] Mark gc.result and gc.relocate as readonly

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

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

8 years agoTemporarily disable flaky checks in wineh-multi-parent-cloning.
Andrew Kaylor [Fri, 6 Nov 2015 01:15:04 +0000 (01:15 +0000)]
Temporarily disable flaky checks in wineh-multi-parent-cloning.

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

8 years agoCommandGuide/lit.rst: Document the new commandline option -a
Matthias Braun [Fri, 6 Nov 2015 01:13:40 +0000 (01:13 +0000)]
CommandGuide/lit.rst: Document the new commandline option -a

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

8 years agoFix build warnings
Andrew Kaylor [Fri, 6 Nov 2015 01:08:35 +0000 (01:08 +0000)]
Fix build warnings

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

8 years agoFix bugpoint breakage on libcxx introduced by r252247
Keno Fischer [Fri, 6 Nov 2015 00:45:47 +0000 (00:45 +0000)]
Fix bugpoint breakage on libcxx introduced by r252247

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

8 years ago[WinEH] Clone funclets with multiple parents
Andrew Kaylor [Fri, 6 Nov 2015 00:20:50 +0000 (00:20 +0000)]
[WinEH] Clone funclets with multiple parents

Windows EH funclets need to always return to a single parent funclet.  However, it is possible for earlier optimizations to combine funclets (probably based on one funclet having an unreachable terminator) in such a way that this condition is violated.

These changes add code to the WinEHPrepare pass to detect situations where a funclet has multiple parents and clone such funclets, fixing up the unwind and catch return edges so that each copy of the funclet returns to the correct parent funclet.

Differential Revision: http://reviews.llvm.org/D13274?id=39098

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

8 years ago[bugpoint] Add a named metadata (+their operands) reducer
Keno Fischer [Fri, 6 Nov 2015 00:12:50 +0000 (00:12 +0000)]
[bugpoint] Add a named metadata (+their operands) reducer

Summary:
We frequently run bugpoint on a linked module that consists of all
modules we create while jitting the julia standard library. This module
has a very large number of compile units (10000+) in `llvm.dbg.cu`,
which didn't get reduced at all, requiring manual post processing.
This is an attempt to have bugpoint go through and attempt to reduce
the number of global named metadata nodes as well as their operands,
to cut down the number of roots for such metadata.

Reviewers: dexonsmith, reames, pete

Subscribers: pete, dexonsmith, reames, llvm-commits

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

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

8 years agoPass the streamer to the constructor instead of every other method. NFC.
Rafael Espindola [Fri, 6 Nov 2015 00:05:57 +0000 (00:05 +0000)]
Pass the streamer to the constructor instead of every other method. NFC.

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

8 years agoSimplify the constructor. NFC.
Rafael Espindola [Thu, 5 Nov 2015 23:55:51 +0000 (23:55 +0000)]
Simplify the constructor. NFC.

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

8 years agogit-clang-format an area I am about to change.
Rafael Espindola [Thu, 5 Nov 2015 23:54:18 +0000 (23:54 +0000)]
git-clang-format an area I am about to change.

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

8 years agoSmall simplification by moving early continue earlier.
Rafael Espindola [Thu, 5 Nov 2015 23:47:20 +0000 (23:47 +0000)]
Small simplification by moving early continue earlier.

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

8 years agoRe-apply r251050 with a for PR25421
Sanjoy Das [Thu, 5 Nov 2015 23:45:38 +0000 (23:45 +0000)]
Re-apply r251050 with a for PR25421

The bug: I missed adding break statements in the switch / case.

Original commit message:

[SCEV] Teach SCEV some axioms about non-wrapping arithmetic

Summary:
 - A s<  (A + C)<nsw> if C >  0
 - A s<= (A + C)<nsw> if C >= 0
 - (A + C)<nsw> s<  A if C <  0
 - (A + C)<nsw> s<= A if C <= 0

Right now `C` needs to be a constant, but we can later generalize it to
be a non-constant if needed.

Reviewers: atrick, hfinkel, reames, nlewycky

Subscribers: sanjoy, llvm-commits

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

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

8 years agoRevert r251050 to fix miscompile when running Clang -O1
Richard Trieu [Thu, 5 Nov 2015 23:20:36 +0000 (23:20 +0000)]
Revert r251050 to fix miscompile when running Clang -O1

See bug for details: https://llvm.org/bugs/show_bug.cgi?id=25421
Some comparisons were incorrectly replaced with a constant value.

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

8 years agoUpdate tutorial for debug info IR change.
Peter Collingbourne [Thu, 5 Nov 2015 22:55:44 +0000 (22:55 +0000)]
Update tutorial for debug info IR change.

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

8 years agoFix Kaleidoscope example.
Peter Collingbourne [Thu, 5 Nov 2015 22:18:31 +0000 (22:18 +0000)]
Fix Kaleidoscope example.

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

8 years agoDI: Reverse direction of subprogram -> function edge.
Peter Collingbourne [Thu, 5 Nov 2015 22:03:56 +0000 (22:03 +0000)]
DI: Reverse direction of subprogram -> function edge.

Previously, subprograms contained a metadata reference to the function they
described. Because most clients need to get or set a subprogram for a given
function rather than the other way around, this created unneeded inefficiency.

For example, many passes needed to call the function llvm::makeSubprogramMap()
to build a mapping from functions to subprograms, and the IR linker needed to
fix up function references in a way that caused quadratic complexity in the IR
linking phase of LTO.

This change reverses the direction of the edge by storing the subprogram as
function-level metadata and removing DISubprogram's function field.

Since this is an IR change, a bitcode upgrade has been provided.

Fixes PR23367. An upgrade script for textual IR for out-of-tree clients is
attached to the PR.

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

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

8 years agoRemove windows line endings introduced by r252177. NFC.
Tim Northover [Thu, 5 Nov 2015 21:54:58 +0000 (21:54 +0000)]
Remove windows line endings introduced by r252177. NFC.

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

8 years ago[ASan] Disable instrumentation for inalloca variables.
Alexey Samsonov [Thu, 5 Nov 2015 21:18:41 +0000 (21:18 +0000)]
[ASan] Disable instrumentation for inalloca variables.

inalloca variables were not treated as static allocas, therefore didn't
participate in regular stack instrumentation. We don't want them to
participate in dynamic alloca instrumentation as well.

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/llvm/ExecutionEngine/Orc
Alexander Kornienko [Thu, 5 Nov 2015 21:18:09 +0000 (21:18 +0000)]
Refactor: Simplify boolean conditional return statements in lib/llvm/ExecutionEngine/Orc

Patch by Richard Thomson!

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

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

8 years ago[WinEH] Fix funclet prologues with stack realignment
Reid Kleckner [Thu, 5 Nov 2015 21:09:49 +0000 (21:09 +0000)]
[WinEH] Fix funclet prologues with stack realignment

We already had a test for this for 32-bit SEH catchpads, but those don't
actually create funclets. We had a bug that only appeared in funclet
prologues, where we would establish EBP and ESI as our FP and BP, and
then downstream prologue code would overwrite them.

While I was at it, I fixed Win64+funclets+stackrealign. This issue
doesn't come up as often there due to the ABI requring 16 byte stack
alignment, but now we can rest easy that AVX and WinEH will work well
together =P.

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

8 years agoRefactor: Simplify boolean conditional return statements in llvm/lib/Analysis
Alexander Kornienko [Thu, 5 Nov 2015 21:07:12 +0000 (21:07 +0000)]
Refactor: Simplify boolean conditional return statements in llvm/lib/Analysis

Patch by Richard Thomson!

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

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

8 years ago[WebAssembly] Fix copypasta.
Dan Gohman [Thu, 5 Nov 2015 20:59:49 +0000 (20:59 +0000)]
[WebAssembly] Fix copypasta.

Noticed by dschff in http://reviews.llvm.org/rL252203

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

8 years ago[WebAssembly] Rename Immediate instructions to Const.
Dan Gohman [Thu, 5 Nov 2015 20:44:29 +0000 (20:44 +0000)]
[WebAssembly] Rename Immediate instructions to Const.

This more closely reflects the naming convention in the spec.

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

8 years ago[WebAssembly] Add AsmString strings for most instructions.
Dan Gohman [Thu, 5 Nov 2015 20:42:30 +0000 (20:42 +0000)]
[WebAssembly] Add AsmString strings for most instructions.

Mangling type information into MachineInstr opcode names was a temporary
measure, and it's starting to get hairy. At the same time, the MC instruction
printer wants to use AsmString strings for printing. This patch takes the
first step, starting the process of adding AsmStrings for instructions.

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

8 years ago[WebAssembly] Update wasm builtin functions to match spec changes.
Dan Gohman [Thu, 5 Nov 2015 20:16:59 +0000 (20:16 +0000)]
[WebAssembly] Update wasm builtin functions to match spec changes.

The page_size operator has been removed from the spec, and the resize_memory
operator has been changed to grow_memory.

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

8 years agoreplace MachineCombinerPattern namespace and enum with enum class; NFCI
Sanjay Patel [Thu, 5 Nov 2015 19:34:57 +0000 (19:34 +0000)]
replace MachineCombinerPattern namespace and enum with enum class; NFCI

Also, remove an enum hack where enum values were used as indexes into an array.

We may want to make this a real class to allow pattern-based queries/customization (D13417).

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

8 years ago[WebAssembly] Add WebAssemblyMCInstLower.cpp.
Dan Gohman [Thu, 5 Nov 2015 19:28:16 +0000 (19:28 +0000)]
[WebAssembly] Add WebAssemblyMCInstLower.cpp.

This isn't used yet; it's just a start towards eventually using MC to
do instruction printing, and eventually binary encoding.

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

8 years agoReapply r250906 with many suggested updates from Rafael Espindola.
Kevin Enderby [Thu, 5 Nov 2015 19:24:56 +0000 (19:24 +0000)]
Reapply r250906 with many suggested updates from Rafael Espindola.
The needed lld matching changes to be submitted immediately next,
but this revision will cause lld failures with this alone which is expected.

This removes the eating of the error in Archive::Child::getSize() when the characters
in the size field in the archive header for the member is not a number.  To do this we
have all of the needed methods return ErrorOr to push them up until we get out of lib.
Then the tools and can handle the error in whatever way is appropriate for that tool.

So the solution is to plumb all the ErrorOr stuff through everything that touches archives.
This include its iterators as one can create an Archive object but the first or any other
Child object may fail to be created due to a bad size field in its header.

Thanks to Lang Hames on the changes making child_iterator contain an
ErrorOr<Child> instead of a Child and the needed changes to ErrorOr.h to add
operator overloading for * and -> .

We don’t want to use llvm_unreachable() as it calls abort() and is produces a “crash”
and using report_fatal_error() to move the error checking will cause the program to
stop, neither of which are really correct in library code. There are still some uses of
these that should be cleaned up in this library code for other than the size field.

The test cases use archives with text files so one can see the non-digit character,
in this case a ‘%’, in the size field.

These changes will require corresponding changes to the lld project.  That will be
committed immediately after this change.  But this revision will cause lld failures
with this alone which is expected.

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

8 years ago[SimplifyLibCalls] Use hasFloatVersion(). NFCI.
Davide Italiano [Thu, 5 Nov 2015 19:18:23 +0000 (19:18 +0000)]
[SimplifyLibCalls] Use hasFloatVersion(). NFCI.

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

8 years ago[DebugInfo] Fix ARM/AArch64 prologue_end position. Related to D11268.
Oleg Ranevskyy [Thu, 5 Nov 2015 17:50:17 +0000 (17:50 +0000)]
[DebugInfo] Fix ARM/AArch64 prologue_end position. Related to D11268.

Summary:
This review is related to another review request http://reviews.llvm.org/D11268, does the same and merely fixes a couple of issues with it.

D11268 is quite old and has merge conflicts against the current trunk.
This request
 - rebases D11268 onto the new trunk;
 - resolves the merge conflicts;
 - fixes the prologue_end tests, which do not pass due to the subprogram definitions not marked as distinct.

Reviewers: echristo, rengolin, kubabrecka

Subscribers: aemerson, rengolin, jyknight, dsanders, llvm-commits, asl

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

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

8 years agoAdd cfi instr for CFA calculation when movpc is expanded to call and pop
Petar Jovanovic [Thu, 5 Nov 2015 17:19:59 +0000 (17:19 +0000)]
Add cfi instr for CFA calculation when movpc is expanded to call and pop

This fixes the issue of wrong CFA calculation in the following case:

0x08048400 <+0>: push   %ebx
0x08048401 <+1>: sub    $0x8,%esp
0x08048404 <+4>: **call   0x8048409 <test+9>**
0x08048409 <+9>: **pop    %eax**
0x0804840a <+10>: add    $0x1bf7,%eax
0x08048410 <+16>: mov    %eax,%ebx
0x08048412 <+18>: call   0x80483f0 <bar>
0x08048417 <+23>: add    $0x8,%esp
0x0804841a <+26>: pop    %ebx
0x0804841b <+27>: ret

The highlighted instructions are a product of movpc instruction. The call
instruction changes the stack pointer, and pop instruction restores its
value. However, the rule for computing CFA is not updated and is wrong on
the pop instruction. So, e.g. backtrace in gdb does not work when on the pop
instruction. This adds cfi instructions for both call and pop instructions.

cfi_adjust_cfa_offset** instruction is used with the appropriate offset for
setting the rules to calculate CFA correctly.

Patch by Violeta Vukobrat.

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

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

8 years ago[WebAssembly] Rename ior operator to or to match the spec
Derek Schuff [Thu, 5 Nov 2015 17:08:11 +0000 (17:08 +0000)]
[WebAssembly] Rename ior operator to or to match the spec

Summary: The spec uses "or" for inclusive-or and "xor" for exclusive-or

Reviewers: sunfish

Subscribers: jfb, llvm-commits, dschuff

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

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

8 years agoUpdate comment to LoopAccessInfo after r251800. NFC
Silviu Baranga [Thu, 5 Nov 2015 15:55:41 +0000 (15:55 +0000)]
Update comment to LoopAccessInfo after r251800. NFC

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

8 years ago[ARM] Compute known bits for ARMISD::CMOV
James Molloy [Thu, 5 Nov 2015 15:21:58 +0000 (15:21 +0000)]
[ARM] Compute known bits for ARMISD::CMOV

We can conservatively know that CMOV's known bits are the intersection of known bits for each of its operands. This helps PerformCMOVToBFICombine find more opportunities.

I tried hard to create a testcase for this and failed - we have to sufficiently confuse DAG.computeKnownBits which can see through all the cheap tricks I tried to narrow my larger testcase down :(

This code is actually exercised in CodeGen/ARM/bfi.ll, there's just no functional difference because DAG.computeKnownBits gets the right answer in that case.

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

8 years agoFix a signed/unsigned mismatch warning; NFC.
Aaron Ballman [Thu, 5 Nov 2015 14:22:56 +0000 (14:22 +0000)]
Fix a signed/unsigned mismatch warning; NFC.

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

8 years agorevert rev. 252153 due to build failure on ubuntu
Asaf Badouh [Thu, 5 Nov 2015 08:55:54 +0000 (08:55 +0000)]
revert rev. 252153 due to build failure on ubuntu
[X86][AVX512] add comi with Sae

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

8 years ago[X86][AVX512] add comi with Sae
Asaf Badouh [Thu, 5 Nov 2015 08:45:06 +0000 (08:45 +0000)]
[X86][AVX512] add comi with Sae
add builtin_ia32_vcomisd and builtin_ia32_vcomisd

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

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

8 years ago[SimplifyCFG] Tweak heuristic for merging conditional stores
James Molloy [Thu, 5 Nov 2015 08:40:19 +0000 (08:40 +0000)]
[SimplifyCFG] Tweak heuristic for merging conditional stores

We were correctly skipping dbginfo intrinsics and terminators, but the initial bailout wasn't, causing it to bail out on almost any block.

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

8 years ago[X86][AVX512] small bugfix in VPBROADCASTM
Asaf Badouh [Thu, 5 Nov 2015 08:08:21 +0000 (08:08 +0000)]
[X86][AVX512] small bugfix in VPBROADCASTM

VPBROADCASTMW2D and VPBROADCASTMB2Q

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

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

8 years agoRuntimeDyld: fix -Wtype-limits
Saleem Abdulrasool [Thu, 5 Nov 2015 06:24:09 +0000 (06:24 +0000)]
RuntimeDyld: fix -Wtype-limits

Adjust the casted type.  By casting to the same size rather than just the
signed-ness, we were asserting tautological statements.  NFC.

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

8 years agoFix LoopAccessAnalysis when potentially nullptr check are involved
Mehdi Amini [Thu, 5 Nov 2015 05:49:43 +0000 (05:49 +0000)]
Fix LoopAccessAnalysis when potentially nullptr check are involved

Summary:
GetUnderlyingObjects() can return "null" among its list of objects,
we don't want to deduce that two pointers can point to the same
memory in this case, so filter it out.

Reviewers: anemet

Subscribers: dexonsmith, llvm-commits

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

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

8 years agoMCStreamer.h: Prune \return, corresponding to r252102. [-Wdocumentation]
NAKAMURA Takumi [Thu, 5 Nov 2015 05:47:46 +0000 (05:47 +0000)]
MCStreamer.h: Prune \return, corresponding to r252102. [-Wdocumentation]

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

8 years agoFix a bug exposed by uses in CFE
Xinliang David Li [Thu, 5 Nov 2015 05:45:06 +0000 (05:45 +0000)]
Fix a bug exposed by uses in CFE

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

8 years agoAMDGPU: Also track whether SGPRs were spilled
Matt Arsenault [Thu, 5 Nov 2015 05:27:10 +0000 (05:27 +0000)]
AMDGPU: Also track whether SGPRs were spilled

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

8 years agoAMDGPU: Print number user SGPRs
Matt Arsenault [Thu, 5 Nov 2015 05:27:07 +0000 (05:27 +0000)]
AMDGPU: Print number user SGPRs

This doesn't quite match how SC prints it, which doesn't put it in a
comment.

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

8 years agoAMDGPU: Disallow s[102:103] on VI in assembler
Matt Arsenault [Thu, 5 Nov 2015 03:11:27 +0000 (03:11 +0000)]
AMDGPU: Disallow s[102:103] on VI in assembler

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

8 years ago[FunctionAttrs] Remove a loop, NFC refactor
Sanjoy Das [Thu, 5 Nov 2015 03:04:40 +0000 (03:04 +0000)]
[FunctionAttrs] Remove a loop, NFC refactor

Summary:
Remove the loop over the uses of the CallSite in ArgumentUsesTracker.
Since we have the `Use *` for actual argument operand, we can just use
pointer subtraction.

The time complexity remains the same though (except for a vararg
argument) -- `std::advance` is O(UseIndex) for the ArgumentList
iterator.

The real motivation is to make a later change adding support for operand
bundles simpler.

Reviewers: reames, chandlerc, nlewycky

Subscribers: llvm-commits

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

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

8 years agoAMDGPU: Fix assert when legalizing atomic operands
Matt Arsenault [Thu, 5 Nov 2015 02:46:56 +0000 (02:46 +0000)]
AMDGPU: Fix assert when legalizing atomic operands

The operand layout is slightly different for the atomic
opcodes from the usual MUBUF loads and stores.

This should only fix it on SI/CI. VI is still broken
because it still emits the addr64 replacement.

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

8 years agoAMDGPU: Make addr64 atomic operand order consistent
Matt Arsenault [Thu, 5 Nov 2015 02:46:53 +0000 (02:46 +0000)]
AMDGPU: Make addr64 atomic operand order consistent

vaddr comes before srsrc in every other MUBUF instruction,
and is the order it is printed.

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