]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/log
8 years ago[canonicalize] Teach InstCombine to canonicalize loads which are only
Chandler Carruth [Thu, 22 Jan 2015 05:08:12 +0000 (05:08 +0000)]
[canonicalize] Teach InstCombine to canonicalize loads which are only
ever stored to always use a legal integer type if one is available.

Regardless of whether this particular type is good or bad, it ensures we
don't get weird differences in generated code (and resulting
performance) from "equivalent" patterns that happen to end up using
a slightly different type.

After some discussion on llvmdev it seems everyone generally likes this
canonicalization. However, there may be some parts of LLVM that handle
it poorly and need to be fixed. I have at least verified that this
doesn't impede GVN and instcombine's store-to-load forwarding powers in
any obvious cases. Subtle cases are exactly what we need te flush out if
they remain.

Also note that this IR pattern should already be hitting LLVM from Clang
at least because it is exactly the IR which would be produced if you
used memcpy to copy a pointer or floating point between memory instead
of a variable.

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

8 years agoARM: fail less catastrophically on invalid Windows input
Saleem Abdulrasool [Thu, 22 Jan 2015 04:03:32 +0000 (04:03 +0000)]
ARM: fail less catastrophically on invalid Windows input

Windows supports a restricted set of relocations (compared to ARM ELF).  In some
cases, we may end up generating an unsupported relocation.  This can occur with
bad input to the assembler in particular (the frontend should never generate
code that cannot be compiled).  Generate an error rather than just aborting.

The change in the API is driven by the desire to provide a slightly more helpful
message for debugging purposes.

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

8 years ago[canonicalize] Move a helper function further up the file so it can be
Chandler Carruth [Thu, 22 Jan 2015 03:34:54 +0000 (03:34 +0000)]
[canonicalize] Move a helper function further up the file so it can be
used earlier. NFC.

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

8 years agoDIBuilder: Make header iterator constructor explicit, NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 03:20:09 +0000 (03:20 +0000)]
DIBuilder: Make header iterator constructor explicit, NFC

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

8 years agoDIBuilder: Extract header_begin() and header_end(), NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 03:17:43 +0000 (03:17 +0000)]
DIBuilder: Extract header_begin() and header_end(), NFC

Use begin/end functions so that users don't need to know how these weird
things work.

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

8 years agoDIBuilder: Stop abusing DIExpressionIterator::operator*(), NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 03:13:35 +0000 (03:13 +0000)]
DIBuilder: Stop abusing DIExpressionIterator::operator*(), NFC

This code was confusing, since it created a `DIExpressionIterator` from
an invalid start point (although it wasn't wrong: it never actually
iterated).  Now that the underlying iterator has `getNumber()`, just use
it directly.

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

8 years agoDIBuilder: Extract DIHeaderFieldIterator::getNumber(), NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 03:11:13 +0000 (03:11 +0000)]
DIBuilder: Extract DIHeaderFieldIterator::getNumber(), NFC

Reduce code duplication between `DIBuilder` and `DIExpressionIterator`
by implementing a `getNumber()` directly in the iterator.

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

8 years agoDIBuilder: Create a getHeaderIterator() helper, NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 03:00:01 +0000 (03:00 +0000)]
DIBuilder: Create a getHeaderIterator() helper, NFC

Extract this so it can be reused.

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

8 years agoMaking deleted copy constructors and operators to be private for better diagnostics...
Chris Bieneman [Thu, 22 Jan 2015 02:51:33 +0000 (02:51 +0000)]
Making deleted copy constructors and operators to be private for better diagnostics when deleted is not available.

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

8 years agoSEH: Finish writing the catch-all test case
Reid Kleckner [Thu, 22 Jan 2015 02:31:09 +0000 (02:31 +0000)]
SEH: Finish writing the catch-all test case

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

8 years agoWin64 SEH: Emit the constant 1 for catch-all into xdata
Reid Kleckner [Thu, 22 Jan 2015 02:27:44 +0000 (02:27 +0000)]
Win64 SEH: Emit the constant 1 for catch-all into xdata

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

8 years agoAssigning and copying command line option objects shouldn't be allowed.
Chris Bieneman [Thu, 22 Jan 2015 01:49:59 +0000 (01:49 +0000)]
Assigning and copying command line option objects shouldn't be allowed.

The default copy and assignment operators for these objects probably don't actually do what the clients intend, so they should be deleted.

Places using the assignment operator to set the value of an option should cast to the option's data type first to call into the override for operator=. Places using the copy constructor just need to be changed to not copy (i.e. passing by const reference instead of value).

Reviewers: dexonsmith, chandlerc

Subscribers: llvm-commits

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

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

8 years agoMake ScalarEvolution less aggressive with respect to no-wrap flags.
Sanjoy Das [Thu, 22 Jan 2015 00:48:47 +0000 (00:48 +0000)]
Make ScalarEvolution less aggressive with respect to no-wrap flags.

ScalarEvolution currently lowers a subtraction recurrence to an add
recurrence with the same no-wrap flags as the subtraction.  This is
incorrect because `sub nsw X, Y` is not the same as `add nsw X, -Y`
and `sub nuw X, Y` is not the same as `add nuw X, -Y`.  This patch
fixes the issue, and adds two test cases demonstrating the bug.

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

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

8 years agoExplicitly describe '///' versus '//' comment delimiters.
Paul Robinson [Thu, 22 Jan 2015 00:19:56 +0000 (00:19 +0000)]
Explicitly describe '///' versus '//' comment delimiters.

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

8 years agoMake DwarfExpression use the new DIExpressionIterator. NFC.
Adrian Prantl [Thu, 22 Jan 2015 00:00:59 +0000 (00:00 +0000)]
Make DwarfExpression use the new DIExpressionIterator. NFC.

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

8 years agoRewrite DIExpression::Verify() using an iterator. NFC.
Adrian Prantl [Thu, 22 Jan 2015 00:00:52 +0000 (00:00 +0000)]
Rewrite DIExpression::Verify() using an iterator. NFC.

Addresses review comments for r226627.

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

8 years ago[canonicalization] Refactor how we create new stores into a helper
Chandler Carruth [Wed, 21 Jan 2015 23:45:01 +0000 (23:45 +0000)]
[canonicalization] Refactor how we create new stores into a helper
function. This is a bit tidier anyways and will make a subsquent patch
simpler as I want to add another case to this combine.

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

8 years ago[X86][SSE] Missing SSE/AVX1 memory folding integer instructions
Simon Pilgrim [Wed, 21 Jan 2015 23:43:30 +0000 (23:43 +0000)]
[X86][SSE] Missing SSE/AVX1 memory folding integer instructions

Added most of the missing integer vector folding patterns for SSE (to SSE42) and AVX1.

The most useful of these are probably the i32/i64 extraction, i8/i16/i32/i64 insertions, zero/sign extension, unsigned saturation subtractions, i64 subtractions and the variable mask blends (pblendvb) - others include CLMUL, SSE42 string comparisons and bit tests.

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

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

8 years agoDAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))
Tim Northover [Wed, 21 Jan 2015 23:17:19 +0000 (23:17 +0000)]
DAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))

It can help with argument juggling on some targets, and is generally a good

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

8 years agoDebugInfo: Use distinct inlinedAt MDLocations to avoid separate inlined calls being...
David Blaikie [Wed, 21 Jan 2015 22:57:29 +0000 (22:57 +0000)]
DebugInfo: Use distinct inlinedAt MDLocations to avoid separate inlined calls being coalesced

When two calls from the same MDLocation are inlined they currently get
treated as one inlined function call (creating difficulty debugging,
duplicate variables, etc).

Clang worked around this by including column information on inline calls
which doesn't address LTO inlining or calls to the same function from
the same line and column (such as through a macro). It also didn't
address ctor and member function calls.

By making the inlinedAt locations distinct, every call site has an
explicitly distinct location that cannot be coalesced with any other

This can produce linearly (2x in the worst case where every call is
inlined and the call instruction has a non-call instruction at the same
location) more debug locations. Any increase beyond that are in cases
where the Clang workaround was insufficient and the new scheme is
creating necessary distinct nodes that were being erroneously coalesced

After this change to LLVM the incomplete workarounds in Clang. That
should reduce the number of debug locations (in a build without column
info, the default on Darwin, not the default on Linux) by not creating
pseudo-distinct locations for every call to an inline function.

(oh, and I made the inlined-at chain rebuilding iterative instead of
recursive because I was having trouble wrapping my head around it the
way it was - open to discussion on the right design for that function
(including going back to a recursive solution))

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

8 years agoR600: Add checks for urem/srem by a constant
Matt Arsenault [Wed, 21 Jan 2015 22:56:15 +0000 (22:56 +0000)]
R600: Add checks for urem/srem by a constant

Make sure this uses the faster expansion using magic constants
to avoid the full division path.

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

8 years agoLiveIntervalAnalysis: Mark subregister defs as undef when we determined they are...
Matthias Braun [Wed, 21 Jan 2015 22:55:13 +0000 (22:55 +0000)]
LiveIntervalAnalysis: Mark subregister defs as undef when we determined they are only reading a dead superregister value

This was not necessary before as this case can only be detected when the
liveness analysis is at subregister level.

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

8 years agoAdding a new cl::HideUnrelatedOptions API to allow clang to migrate off cl::getRegist...
Chris Bieneman [Wed, 21 Jan 2015 22:45:52 +0000 (22:45 +0000)]
Adding a new cl::HideUnrelatedOptions API to allow clang to migrate off cl::getRegisteredOptions.

Summary: cl::getRegisteredOptions really exposes some of the innards of how command line parsing is implemented. Exposing new APIs that allow us to disentangle client code from implementation details will allow us to make more extensive changes to command line parsing.

Reviewers: chandlerc, dexonsmith, beanz

Reviewed By: dexonsmith

Subscribers: llvm-commits

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

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

8 years ago[X86][SSE] Added support for SSE3 lane duplication shuffle instructions
Simon Pilgrim [Wed, 21 Jan 2015 22:44:35 +0000 (22:44 +0000)]
[X86][SSE] Added support for SSE3 lane duplication shuffle instructions

This patch adds shuffle matching for the SSE3 MOVDDUP, MOVSLDUP and MOVSHDUP instructions. The big use of these being that they avoid many single source shuffles from needing to use (pre-AVX) dual source instructions such as SHUFPD/SHUFPS: causing extra moves and preventing load folds.

Adding these instructions uncovered an issue in XFormVExtractWithShuffleIntoLoad which crashed on single operand shuffle instructions (now fixed). It also involved fixing getTargetShuffleMask to correctly identify theses instructions as unary shuffles.

Also adds a missing tablegen pattern for MOVDDUP.

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

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

8 years agoR600: Add missing tests for i64 srem
Matt Arsenault [Wed, 21 Jan 2015 22:43:19 +0000 (22:43 +0000)]
R600: Add missing tests for i64 srem

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

8 years agoFix load-store optimizer on thumbv4t
Jonathan Roelofs [Wed, 21 Jan 2015 22:39:43 +0000 (22:39 +0000)]
Fix load-store optimizer on thumbv4t

Thumbv4t does not have lo->lo copies other than MOVS,
and that can't be predicated. So emit MOVS when needed
and bail if there's a predicate.


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

8 years agoAdded test to cover the CFLAA bitset indexing bug.
George Burgess IV [Wed, 21 Jan 2015 22:39:35 +0000 (22:39 +0000)]
Added test to cover the CFLAA bitset indexing bug.

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

8 years agoInstCombine: Don't strip bitcasts off of callsites marked 'thunk'
David Majnemer [Wed, 21 Jan 2015 22:32:04 +0000 (22:32 +0000)]
InstCombine: Don't strip bitcasts off of callsites marked 'thunk'

The return type of a thunk is meaningless, we just want the arguments
and return value to be forwarded.

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

8 years ago[X86][SSE] movddup shuffle mask decodes
Simon Pilgrim [Wed, 21 Jan 2015 22:02:30 +0000 (22:02 +0000)]
[X86][SSE] movddup shuffle mask decodes

Patch to provide shuffle decodes and asm comments for the SSE3/AVX1 movddup double duplication instructions.

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

8 years agosimplify expression
Adrian Prantl [Wed, 21 Jan 2015 21:23:35 +0000 (21:23 +0000)]
simplify expression

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

8 years agoFix a compile issue on MSVC and call finalize().
Adrian Prantl [Wed, 21 Jan 2015 19:25:35 +0000 (19:25 +0000)]
Fix a compile issue on MSVC and call finalize().

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

8 years agoLiveIntervalAnalysis: Factor out code to update liveness on vreg def removal
Matthias Braun [Wed, 21 Jan 2015 19:02:30 +0000 (19:02 +0000)]
LiveIntervalAnalysis: Factor out code to update liveness on vreg def removal

This cleans up code and is more in line with the general philosophy of
modifying LiveIntervals through LiveIntervalAnalysis instead of changing
them directly.

This also fixes a case where SplitEditor::removeBackCopies() would miss
the subregister ranges.

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

8 years agoLiveIntervalAnalysis: document removePhysRegDefAt() function.
Matthias Braun [Wed, 21 Jan 2015 19:02:26 +0000 (19:02 +0000)]
LiveIntervalAnalysis: document removePhysRegDefAt() function.

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

8 years agoLiveIntervalAnalysis: Factor out code to update liveness on physreg def removal
Matthias Braun [Wed, 21 Jan 2015 18:50:21 +0000 (18:50 +0000)]
LiveIntervalAnalysis: Factor out code to update liveness on physreg def removal

This cleans up code and is more in line with the general philosophy of
modifying LiveIntervals through LiveIntervalAnalysis instead of changing
them directly.

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

8 years agoLiveIntervalAnalysis: Remove unused pruneValue() variant.
Matthias Braun [Wed, 21 Jan 2015 18:45:57 +0000 (18:45 +0000)]
LiveIntervalAnalysis: Remove unused pruneValue() variant.

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

8 years agoLet subprograms with instructions without parent scopes fail the
Adrian Prantl [Wed, 21 Jan 2015 18:32:56 +0000 (18:32 +0000)]
Let subprograms with instructions without parent scopes fail the
verification. Tested via a unit test.

Follow-up to r226616.

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

8 years agoR600/SI: Custom lower fround
Matt Arsenault [Wed, 21 Jan 2015 18:18:25 +0000 (18:18 +0000)]
R600/SI: Custom lower fround

This fixes it for SI. It also removes the pattern
used previously for Evergreen for f32. I'm not sure
if the the new R600 output is better or not, but it uses
1 fewer instructions if BFI is available.

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

8 years ago[Hexagon] Converting multiply and accumulate with immediate intrinsics to patterns.
Colin LeMahieu [Wed, 21 Jan 2015 18:13:15 +0000 (18:13 +0000)]
[Hexagon] Converting multiply and accumulate with immediate intrinsics to patterns.

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

8 years ago[X86] Declare SSE4.1/AVX2 vector extloads covered by PMOV[SZ]X legal.
Ahmed Bougacha [Wed, 21 Jan 2015 17:07:06 +0000 (17:07 +0000)]
[X86] Declare SSE4.1/AVX2 vector extloads covered by PMOV[SZ]X legal.

Now that we can fully specify extload legality, we can declare them
legal for the PMOVSX/PMOVZX instructions.  This for instance enables
a DAGCombine to fire on code such as
  (and (<zextload-equivalent> ...), <redundant mask>)
to turn it into:
  (zextload ...)
as seen in the testcase changes.

There is one regression, in widen_load-2.ll: we're no longer able
to do store-to-load forwarding with illegal extload memory types.
This will be addressed separately.

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

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

8 years ago[lit] Format JSONMetricValue strings better.
Eric Fiselier [Wed, 21 Jan 2015 16:38:31 +0000 (16:38 +0000)]
[lit] Format JSONMetricValue strings better.

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

8 years agoFixed a bug with how we determine bitset indices.
George Burgess IV [Wed, 21 Jan 2015 16:37:21 +0000 (16:37 +0000)]
Fixed a bug with how we determine bitset indices.

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

8 years agoAdd missing include guards to WindowsSupport.h.
Yaron Keren [Wed, 21 Jan 2015 16:20:38 +0000 (16:20 +0000)]
Add missing include guards to WindowsSupport.h.

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

8 years agoRevert "DAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))"
Tim Northover [Wed, 21 Jan 2015 15:48:52 +0000 (15:48 +0000)]
Revert "DAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))"

It hadn't gone through review yet, but was still on my local copy.

This reverts commit r226663

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

8 years agoAArch64: add backend option to reserve x18 (platform register)
Tim Northover [Wed, 21 Jan 2015 15:43:31 +0000 (15:43 +0000)]
AArch64: add backend option to reserve x18 (platform register)

AAPCS64 says that it's up to the platform to specify whether x18 is
reserved, and a first step on that way is to add a flag controlling

From: Andrew Turner <andrew@fubar.geek.nz>

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

8 years agoDAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))
Tim Northover [Wed, 21 Jan 2015 15:43:28 +0000 (15:43 +0000)]
DAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))

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

8 years ago[x32] Fast ISel should use LEA64_32r instead of LEA32r to adjust addresses in x32...
Michael Kuperstein [Wed, 21 Jan 2015 14:44:05 +0000 (14:44 +0000)]
[x32] Fast ISel should use LEA64_32r instead of LEA32r to adjust addresses in x32 mode.

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

8 years agoUse a smaller pragma unroll threshold to reduce test execution time.
Alexander Potapenko [Wed, 21 Jan 2015 13:52:02 +0000 (13:52 +0000)]
Use a smaller pragma unroll threshold to reduce test execution time.
When opt is compiled with AddressSanitizer it takes more than 30 seconds
to unroll the loop in unroll_1M().

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

8 years ago[msan] Update origin for the entire destination range on memory store.
Evgeniy Stepanov [Wed, 21 Jan 2015 13:21:31 +0000 (13:21 +0000)]
[msan] Update origin for the entire destination range on memory store.

Previously we always stored 4 bytes of origin at the destination address
even for 8-byte (and longer) stores.

This should fix rare missing, or incorrect, origin stacks in MSan reports.

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

8 years ago[mips][microMIPS] MicroMIPS 16-bit unconditional branch instruction B
Jozef Kolek [Wed, 21 Jan 2015 12:39:30 +0000 (12:39 +0000)]
[mips][microMIPS] MicroMIPS 16-bit unconditional branch instruction B

Implement microMIPS 16-bit unconditional branch instruction B.

Implemented 16-bit microMIPS unconditional instruction has real name B16, and
B is an alias which expands to either B16 or BEQ according to the rules:
b 256 --> b16 256 # R_MICROMIPS_PC10_S1
b 12256 --> beq $zero, $zero, 12256 # R_MICROMIPS_PC16_S1
b label --> beq $zero, $zero, label # R_MICROMIPS_PC16_S1

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

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

8 years ago[mips][microMIPS] Implement ADDIUPC instruction
Jozef Kolek [Wed, 21 Jan 2015 12:10:11 +0000 (12:10 +0000)]
[mips][microMIPS] Implement ADDIUPC instruction

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

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

8 years ago[PM] Refactor the InstCombiner interface to use an external worklist.
Chandler Carruth [Wed, 21 Jan 2015 11:38:17 +0000 (11:38 +0000)]
[PM] Refactor the InstCombiner interface to use an external worklist.

Because in its primary function pass the combiner is run repeatedly over
the same function until doing so produces no changes, it is essentially
to not re-allocate the worklist. However, as a utility, the more common
pattern would be to put a limited set of instructions in the worklist
rather than the entire function body. That is also the more likely
pattern when used by the new pass manager.

The result is a very light weight combiner that does the visiting with
a separable worklist. This can then be wrapped up in a helper function
for users that want a combiner utility, or as I have here it can be
wrapped up in a pass which manages the iterations used when combining an
entire function's instructions.

Hopefully this removes some of the worst of the interface warts that
became apparant with the last patch here. However, there is clearly more
work. I've again left some FIXMEs for the most egregious. The ones that
stick out to me are the exposure of the worklist and IR builder as
public members, and the use of pointers rather than references. However,
fixing these is likely to be much more mechanical and less interesting
so I didn't want to touch them in this patch.

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

8 years ago[PM] Simplify (ha! ha!) the way that instcombine calls the
Chandler Carruth [Wed, 21 Jan 2015 11:23:40 +0000 (11:23 +0000)]
[PM] Simplify (ha! ha!) the way that instcombine calls the
SimplifyLibCalls utility by sinking it into the specific call part of
the combiner.

This will avoid us needing to do any contortions to build this object in
a subsequent refactoring I'm doing and seems generally better factored.
We don't need this utility everywhere and it carries no interesting
state so we might as well build it on demand.

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

8 years ago[Mips][Disassembler]When disassembler meets load/store from coprocessor 2 instruction...
Vladimir Medic [Wed, 21 Jan 2015 10:47:36 +0000 (10:47 +0000)]
[Mips][Disassembler]When disassembler meets load/store from coprocessor 2 instructions for mips r6 it crashes as the access to operands array is out of range. This patch adds dedicated decoder method that properly handles decoding of these instructions.

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

8 years ago[x86] Remove some unnecessary and slightly confusing typecasts from some patterns...
Craig Topper [Wed, 21 Jan 2015 08:43:57 +0000 (08:43 +0000)]
[x86] Remove some unnecessary and slightly confusing typecasts from some patterns. I think it actually went i32->iPtr->i32 in some of these cases.

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

8 years ago[X86] Convert all the i8imm used by AVX512 and MMX instructions to u8imm.
Craig Topper [Wed, 21 Jan 2015 08:43:49 +0000 (08:43 +0000)]
[X86] Convert all the i8imm used by AVX512 and MMX instructions to u8imm.

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

8 years ago[X86] Convert all the i8imm used by SSE and AVX instructions to u8imm.
Craig Topper [Wed, 21 Jan 2015 08:15:54 +0000 (08:15 +0000)]
[X86] Convert all the i8imm used by SSE and AVX instructions to u8imm.

This makes the assembler check their size and removes a hack from the disassembler to avoid sign extending the immediate.

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

8 years ago[x86] Add assembly parser bounds checking to the immediate value for cmpss/cmpsd...
Craig Topper [Wed, 21 Jan 2015 06:07:53 +0000 (06:07 +0000)]
[x86] Add assembly parser bounds checking to the immediate value for cmpss/cmpsd/cmpps/cmppd.

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

8 years ago[PM] Replace an abuse of inheritance to override a single function with
Chandler Carruth [Wed, 21 Jan 2015 02:11:59 +0000 (02:11 +0000)]
[PM] Replace an abuse of inheritance to override a single function with
a more direct approach: a type-erased glorified function pointer. Now we
can pass a function pointer into this for the easy case and we can even
pass a lambda into it in the interesting case in the instruction

I'll be using this shortly to simplify the interfaces to InstCombiner,
but this helps pave the way and seems like a better design for the
libcall simplifier utility.

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

8 years agoMake DIExpression::Verify() stricter by checking that the number of
Adrian Prantl [Wed, 21 Jan 2015 00:59:20 +0000 (00:59 +0000)]
Make DIExpression::Verify() stricter by checking that the number of
elements and the ordering is sane and cleanup the accessors.

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

8 years ago[X86][AVX] Simplified diff between AVX1 and SSE42 fp stack folding tests. NFC.
Simon Pilgrim [Wed, 21 Jan 2015 00:02:13 +0000 (00:02 +0000)]
[X86][AVX] Simplified diff between AVX1 and SSE42 fp stack folding tests. NFC.

Changed the AVX1 tests register spill tail call to return a xmm like the SSE42 version - makes doing diffs between them a lot easier without affecting the spills themselves.

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

8 years ago[X86][SSE] Added SSE/AVX1 integer stack folding tests.
Simon Pilgrim [Tue, 20 Jan 2015 23:54:17 +0000 (23:54 +0000)]
[X86][SSE] Added SSE/AVX1 integer stack folding tests.

Some folding patterns + tests are missing (marked as TODO) - these will be added in a future patch for review.

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

8 years ago[X86][SSE] Added SSE fp stack folding tests.
Simon Pilgrim [Tue, 20 Jan 2015 23:50:18 +0000 (23:50 +0000)]
[X86][SSE] Added SSE fp stack folding tests.

Some folding patterns + tests are missing (marked as TODO) - these will be added in a future patch for review.

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

8 years ago[X86][AVX] Renamed AVX1 fp stack folding tests. NFC.
Simon Pilgrim [Tue, 20 Jan 2015 23:45:50 +0000 (23:45 +0000)]
[X86][AVX] Renamed AVX1 fp stack folding tests. NFC.

The SSE42 version of the AVX1 float stack folding tests will be added shortly, this renames the AVX1 file so that the files will be near each other in a directory listing to help ensure they are kept in sync.

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

8 years ago[PM] Separate the InstCombiner from its pass.
Chandler Carruth [Tue, 20 Jan 2015 22:44:35 +0000 (22:44 +0000)]
[PM] Separate the InstCombiner from its pass.

This creates a small internal pass which runs the InstCombiner over
a function. This is the hard part of porting InstCombine to the new pass
manager, as at this point none of the code in InstCombine has access to
a Pass object any longer.

The resulting interface for the InstCombiner is pretty terrible. I'm not
planning on leaving it that way. The key thing missing is that we need
to separate the worklist from the combiner a touch more. Once that's
done, it should be possible for *any* part of LLVM to just create
a worklist with instructions, populate it, and then combine it until
empty. The pass will just be the (obvious and important) special case of
doing that for an entire function body.

For now, this is the first increment of factoring to make all of this

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

8 years agoDebugLocs without a scope should fail the verification.
Adrian Prantl [Tue, 20 Jan 2015 22:37:25 +0000 (22:37 +0000)]
DebugLocs without a scope should fail the verification.
Follow-up to r226588.

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

8 years agoDon't pass -Wl,z,defs for now.
Rafael Espindola [Tue, 20 Jan 2015 22:08:20 +0000 (22:08 +0000)]
Don't pass -Wl,z,defs for now.

It broke the msan build.

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

8 years agoFor llvm-objdump, hook up existing options to work when using -macho (the Mach-O...
Kevin Enderby [Tue, 20 Jan 2015 21:47:46 +0000 (21:47 +0000)]
For llvm-objdump, hook up existing options to work when using -macho (the Mach-O parser).

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

8 years agoUse -Wl,defs when linking.
Rafael Espindola [Tue, 20 Jan 2015 21:23:15 +0000 (21:23 +0000)]
Use -Wl,defs when linking.

ELF linkers by default allow shared libraries to contain undefined references
and it is up to the dynamic linker to look for them.

On COFF and MachO, that is not the case.

This creates a situation where a .so might build on an ELF system, but the build
of the corresponding .dylib or .dll will fail.

This patch changes the cmake build to use -Wl,-z,defs when linking and updates
the dependencies so that -DBUILD_SHARED_LIBS=ON build still works.

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

8 years ago[PM] Reformat this code with clang-format so that subsequent changes
Chandler Carruth [Tue, 20 Jan 2015 21:10:35 +0000 (21:10 +0000)]
[PM] Reformat this code with clang-format so that subsequent changes
don't get muddied up by formatting changes.

Some of these don't really seem like improvements to me, but they also
don't seem any worse and I care much more about not formatting them
manually than I do about the particular formatting. =]

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

8 years ago[Hexagon] Adding intrinsics for doubleword ALU operations.
Colin LeMahieu [Tue, 20 Jan 2015 20:45:05 +0000 (20:45 +0000)]
[Hexagon] Adding intrinsics for doubleword ALU operations.

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

8 years ago[Hexagon] Removing unnecessary clutter in intrinsic tests.
Colin LeMahieu [Tue, 20 Jan 2015 19:46:07 +0000 (19:46 +0000)]
[Hexagon] Removing unnecessary clutter in intrinsic tests.

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

8 years agoPrevent binary-tree deterioration in sparse switch statements.
Daniel Jasper [Tue, 20 Jan 2015 19:43:33 +0000 (19:43 +0000)]
Prevent binary-tree deterioration in sparse switch statements.

This addresses part of llvm.org/PR22262. Specifically, it prevents
considering the densities of sub-ranges that have fewer than
TLI.getMinimumJumpTableEntries() elements. Those densities won't help
jump tables.

This is not a complete solution but works around the most pressing

Review: http://reviews.llvm.org/D7070

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

8 years ago[GC] Verify-pass void vararg functions in gc.statepoint
Ramkumar Ramachandra [Tue, 20 Jan 2015 19:42:46 +0000 (19:42 +0000)]
[GC] Verify-pass void vararg functions in gc.statepoint

With the appropriate Verifier changes, exactracting the result out of a
statepoint wrapping a vararg function crashes. However, a void vararg
function works fine: commit this first step.

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

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

8 years agoReapply: Teach SROA how to update debug info for fragmented variables.
Adrian Prantl [Tue, 20 Jan 2015 19:42:22 +0000 (19:42 +0000)]
Reapply: Teach SROA how to update debug info for fragmented variables.
This reapplies r225379.

- The assertion that this commit previously ran into about the inability
  to handle indirect variables has since been removed and the backend
  can handle this now.
- Testcases were upgrade to the new MDLocation format.
- Instead of keeping a DebugDeclares map, we now use

Original commit message follows.

Debug info: Teach SROA how to update debug info for fragmented variables.
This allows us to generate debug info for extremely advanced code such as

 typedef struct { long int a; int b;} S;

 int foo(S s) {
   return s.b;

which at -O1 on x86_64 is codegen'd into

 define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 {
   ret i32 %s.coerce1, !dbg !24

with this patch we emit the following debug info for this

 TAG_formal_parameter [3]
   AT_location( 0x00000000
                0x0000000000000000 - 0x0000000000000006: rdi, piece 0x00000008, rsi, piece 0x00000004
                0x0000000000000006 - 0x0000000000000008: rdi, piece 0x00000008, rax, piece 0x00000004 )
                AT_name( "s" )
                AT_decl_file( "/Volumes/Data/llvm/_build.ninja.release/test.c" )

Thanks to chandlerc, dblaikie, and echristo for their feedback on all
previous iterations of this patch!

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

8 years agoR600/SI: Add subtarget feature to enable VGPR spilling for all shader types
Tom Stellard [Tue, 20 Jan 2015 19:33:04 +0000 (19:33 +0000)]
R600/SI: Add subtarget feature to enable VGPR spilling for all shader types

This is disabled by default, but can be enabled with the subtarget
feature: 'vgpr-spilling'

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

8 years agoR600/SI: Fix simple-loop.ll test
Tom Stellard [Tue, 20 Jan 2015 19:33:02 +0000 (19:33 +0000)]
R600/SI: Fix simple-loop.ll test

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

8 years agoReverted revision 226577.
Jozef Kolek [Tue, 20 Jan 2015 19:29:28 +0000 (19:29 +0000)]
Reverted revision 226577.

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

8 years ago[PM] Clean up a bunch of the doxygen / API docs on the InstCombiner pass
Chandler Carruth [Tue, 20 Jan 2015 19:27:58 +0000 (19:27 +0000)]
[PM] Clean up a bunch of the doxygen / API docs on the InstCombiner pass
prior to refactoring it.

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

8 years ago[llvm link] Destroy ConstantArrays in LLVMContext if they are not used.
Manman Ren [Tue, 20 Jan 2015 19:24:59 +0000 (19:24 +0000)]
[llvm link] Destroy ConstantArrays in LLVMContext if they are not used.

ConstantArrays constructed during linking can cause quadratic memory
explosion. An example is the ConstantArrays constructed when linking in
GlobalVariables with appending linkage.

Releasing all unused constants can cause a 20% LTO compile-time
slowdown for a large application. So this commit releases unused ConstantArrays

rdar://19040716. It reduces memory footprint from 20+G to 6+G.

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

8 years agoR600/SI: Remove stray debugging code from r226586
Tom Stellard [Tue, 20 Jan 2015 19:24:31 +0000 (19:24 +0000)]
R600/SI: Remove stray debugging code from r226586

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

8 years ago[PM] Don't spend time making self moves no-ops. They're allowed to leave
Chandler Carruth [Tue, 20 Jan 2015 18:54:16 +0000 (18:54 +0000)]
[PM] Don't spend time making self moves no-ops. They're allowed to leave
the object in a moved-from state, and its simpler to write the code that

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

8 years agoAdd an assertion and prefer a crash over an infinite loop.
Adrian Prantl [Tue, 20 Jan 2015 18:03:37 +0000 (18:03 +0000)]
Add an assertion and prefer a crash over an infinite loop.

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

8 years agoR600/SI: Use external symbols for scratch buffer
Tom Stellard [Tue, 20 Jan 2015 17:49:47 +0000 (17:49 +0000)]
R600/SI: Use external symbols for scratch buffer

We were passing the scratch buffer address to the shaders via user sgprs,
but now we use external symbols and have the driver patch the shader
using reloc information.

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

8 years agoR600/SI: Add kill flag when copying scratch offset to a register
Tom Stellard [Tue, 20 Jan 2015 17:49:45 +0000 (17:49 +0000)]
R600/SI: Add kill flag when copying scratch offset to a register

This allows us to re-use the same register for the scratch offset
when accessing large private arrays.

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

8 years agoR600/SI: Don't store scratch buffer frame index in MUBUF offset field
Tom Stellard [Tue, 20 Jan 2015 17:49:43 +0000 (17:49 +0000)]
R600/SI: Don't store scratch buffer frame index in MUBUF offset field

We don't have a good way of legalizing this if the frame index offset
is more than the 12-bits, which is size of MUBUF's offset field, so
now we store the frame index in the vaddr field.

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

8 years agoR600/SI: Update SIInstrInfo:verifyInstruction() after r225662
Tom Stellard [Tue, 20 Jan 2015 17:49:41 +0000 (17:49 +0000)]
R600/SI: Update SIInstrInfo:verifyInstruction() after r225662

Now that we have our own custom register operand types, we need
to handle them in the verifiier.

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

8 years agoSilencing a -Wunused-variable warning in non-asserts builds; NFC.
Aaron Ballman [Tue, 20 Jan 2015 17:10:45 +0000 (17:10 +0000)]
Silencing a -Wunused-variable warning in non-asserts builds; NFC.

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

8 years agoRevert "IR: Specify underlying type instead of r226570, NFC"
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 17:04:56 +0000 (17:04 +0000)]
Revert "IR: Specify underlying type instead of r226570, NFC"

This reverts commit r226571.  GCC really doesn't like it [1].

[1]: http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/20260

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

8 years ago[mips][microMIPS] MicroMIPS 16-bit unconditional branch instruction B
Jozef Kolek [Tue, 20 Jan 2015 16:45:27 +0000 (16:45 +0000)]
[mips][microMIPS] MicroMIPS 16-bit unconditional branch instruction B

Implement microMIPS 16-bit unconditional branch instruction B.

Implemented 16-bit microMIPS unconditional instruction has real name B16, and
B is an alias which expands to either B16 or BEQ according to the rules:
b 256 --> b16 256 # R_MICROMIPS_PC10_S1
b 12256 --> beq $zero, $zero, 12256 # R_MICROMIPS_PC16_S1
b label --> beq $zero, $zero, label # R_MICROMIPS_PC16_S1

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

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

8 years ago[mips] Add registers and ALL check prefix to octeon test case.
Kai Nacke [Tue, 20 Jan 2015 16:14:02 +0000 (16:14 +0000)]
[mips] Add registers and ALL check prefix to octeon test case.

No functional change.

Reviewed by D. Sanders

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

8 years ago[mips] Add octeon branch instructions bbit0/bbit032/bbit1/bbit132
Kai Nacke [Tue, 20 Jan 2015 16:10:51 +0000 (16:10 +0000)]
[mips] Add octeon branch instructions bbit0/bbit032/bbit1/bbit132

This commits adds the octeon branch instructions bbit0/bbit032/bbit1/bbit132.
It also includes patterns for instruction selection and test cases.

Reviewed by D. Sanders

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

8 years agoIR: Specify underlying type instead of r226570, NFC
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 16:03:09 +0000 (16:03 +0000)]
IR: Specify underlying type instead of r226570, NFC

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

8 years agoIR: Store StorageType as an unsigned bitfield
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 15:51:14 +0000 (15:51 +0000)]
IR: Store StorageType as an unsigned bitfield

Use `unsigned` instead of `StorageType` for the bitfield to prevent MSVC
from treating the top bit of the bitfield as a sign bit.

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

8 years ago[msan] Optimize -msan-check-constant-shadow.
Evgeniy Stepanov [Tue, 20 Jan 2015 15:21:35 +0000 (15:21 +0000)]
[msan] Optimize -msan-check-constant-shadow.

The new code does not create new basic blocks in the case when shadow is a
compile-time constant; it generates either an unconditional __msan_warning
call or nothing instead.

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

8 years ago[MSan][LLVM][MIPS] Shadow and Origin offsets for MIPS
Mohit K. Bhakkad [Tue, 20 Jan 2015 13:05:42 +0000 (13:05 +0000)]
[MSan][LLVM][MIPS] Shadow and Origin offsets for MIPS

Reviewers: kcc, samsonov, petarj, eugenis

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

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

8 years ago[x86] Add some mayLoad/hasSideEffects flags. Remove one that was already covered...
Craig Topper [Tue, 20 Jan 2015 12:15:30 +0000 (12:15 +0000)]
[x86] Add some mayLoad/hasSideEffects flags. Remove one that was already covered by a pattern.

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

8 years ago[PM] Port LoopInfo to the new pass manager, adding both a LoopAnalysis
Chandler Carruth [Tue, 20 Jan 2015 10:58:50 +0000 (10:58 +0000)]
[PM] Port LoopInfo to the new pass manager, adding both a LoopAnalysis
pass and a LoopPrinterPass with the expected associated wiring.

I've added a RUN line to the only test case (!!!) we have that actually
prints loops. Everything seems to be working.

This is somewhat exciting as this is the first analysis using another
analysis to go in for the new pass manager. =D I also believe it is the
last analysis necessary for porting instcombine, but of course I may yet
discover more.

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

8 years ago[PM] Make the LoopInfoBase and LoopInfo objects movable so that they can
Chandler Carruth [Tue, 20 Jan 2015 10:58:38 +0000 (10:58 +0000)]
[PM] Make the LoopInfoBase and LoopInfo objects movable so that they can
be used as results in the new pass manager.

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

8 years ago[PM] Fix a moderately scary typo in the deleted copy constructor
Chandler Carruth [Tue, 20 Jan 2015 10:20:52 +0000 (10:20 +0000)]
[PM] Fix a moderately scary typo in the deleted copy constructor
I noticed when adding move semantics to LoopInfo.

Hopefully not relevant, but still scary. =]

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

8 years ago[PM] Use range-based for and auto to clean up some of the LoopInfo code.
Chandler Carruth [Tue, 20 Jan 2015 10:02:49 +0000 (10:02 +0000)]
[PM] Use range-based for and auto to clean up some of the LoopInfo code.

No functionality changed.

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