Eric Christopher [Mon, 4 Aug 2014 21:25:23 +0000 (21:25 +0000)]
Remove the TargetMachine forwards for TargetSubtargetInfo based
information and update all callers. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214781
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 4 Aug 2014 21:24:07 +0000 (21:24 +0000)]
Reimplement the temporary non-const getSubtargetImpl routine so
that we can avoid implementing it on every target. Thanks to Richard
Smith for the suggestions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214780
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 4 Aug 2014 21:20:25 +0000 (21:20 +0000)]
[AArch64] Extend the number of scalar instructions supported in the AdvSIMD
scalar integer instruction pass.
This is a patch I had lying around from a few months ago. The pass is
currently disabled by default, so nothing to interesting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214779
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 4 Aug 2014 21:06:00 +0000 (21:06 +0000)]
MC uses .lcomm now, so adjust.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214776
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 4 Aug 2014 21:05:27 +0000 (21:05 +0000)]
Fix failure to invoke exception handler on Win64
When the last instruction prior to a function epilogue is a call, we
need to emit a nop so that the return address is not in the epilogue IP
range. This is consistent with MSVC's behavior, and may be a workaround
for a bug in the Win64 unwinder.
Differential Revision: http://reviews.llvm.org/D4751
Patch by Vadim Chugunov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214775
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 4 Aug 2014 20:36:00 +0000 (20:36 +0000)]
Correct the emission kind constants committed in r214771
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214772
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 4 Aug 2014 20:32:48 +0000 (20:32 +0000)]
Document the "emission kind" field of the DICompileUnit in LLVM's Source Level Debugging metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214771
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 4 Aug 2014 20:28:34 +0000 (20:28 +0000)]
Recognize mftbl as alias for mftb, for symmetry with mttb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214769
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 4 Aug 2014 19:33:25 +0000 (19:33 +0000)]
Add a sentence that all entries should include an email address.
Add one for Greg Clayton, Peter Collingbourne, Tobias Grosser and
Jakob Olesen based on recent commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214762
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 4 Aug 2014 19:30:08 +0000 (19:30 +0000)]
Reapply "DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself."
Originally reverted in r213432 with flakey failures on an ASan self-host
build. After reduction it seems to be the same issue fixed in r213805
(ArgPromo + DebugInfo: Handle updating debug info over multiple
applications of argument promotion) and r213952 (by having
LiveDebugVariables strip dbg_value intrinsics in functions that are not
described by debug info). Though I cannot explain why this failure was
flakey...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214761
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 4 Aug 2014 18:49:22 +0000 (18:49 +0000)]
R600/SI: Fix definitions for ds_read2 / ds_write2 instructions.
These were just wrong, using the wrong register classes
and store2 was missing an operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214756
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 4 Aug 2014 18:46:13 +0000 (18:46 +0000)]
Rename PPCLinuxMCAsmInfo to PPCELFMCAsmInfo to better reflect the
systems it represents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214755
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 4 Aug 2014 18:45:10 +0000 (18:45 +0000)]
Allow .lcomm with alignment on ELF targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214754
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 4 Aug 2014 18:00:51 +0000 (18:00 +0000)]
Coverage: add HasCodeBefore flag to a mapping region.
This flag will be used by the coverage tool to help
compute the execution counts for each line in a source file.
Differential Revision: http://reviews.llvm.org/D4746
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214740
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 4 Aug 2014 17:37:43 +0000 (17:37 +0000)]
Move the R600 intrinsic support back to the target machine - there's
nothing subtarget dependent about the intrinsic support in any
backend as far as I can tell.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214738
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 4 Aug 2014 17:36:41 +0000 (17:36 +0000)]
Path: Stop claiming path::const_iterator is bidirectional
path::const_iterator claims that it's a bidirectional iterator, but it
doesn't satisfy all of the contracts for a bidirectional iterator.
For example, n3376 24.2.5 p6 says "If a and b are both dereferenceable,
then a == b if and only if *a and *b are bound to the same object",
but this doesn't work with how we stash and recreate Components.
This means that our use of reverse_iterator on this type is invalid
and leads to many of the valgrind errors we're hitting, as explained
by Tilmann Scheller here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20140728/228654.html
Instead, we admit that path::const_iterator is only an input_iterator,
and implement a second input_iterator for path::reverse_iterator (by
changing const_iterator::operator-- to reverse_iterator::operator++).
All of the uses of this just traverse once over the path in one
direction or the other anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214737
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 4 Aug 2014 17:26:15 +0000 (17:26 +0000)]
Refactor SPRG instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214733
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 4 Aug 2014 17:23:38 +0000 (17:23 +0000)]
[X86] Place parentheses around "isMask_32(STReturns) && N <= 2".
This corrects r214672, which was committed to silence a gcc warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214732
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 4 Aug 2014 17:07:41 +0000 (17:07 +0000)]
Add support for m[ft][di]bat[ul] instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214731
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 4 Aug 2014 16:55:35 +0000 (16:55 +0000)]
Use the known address space constant rather than checking it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214729
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 4 Aug 2014 16:55:33 +0000 (16:55 +0000)]
R600: Remove unused include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214728
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 4 Aug 2014 16:40:55 +0000 (16:40 +0000)]
Add a dummy subtarget to the CPP backend target machine. This will
allow us to forward all of the standard TargetMachine calls to the
subtarget and still return null as we were before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214727
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 4 Aug 2014 15:47:38 +0000 (15:47 +0000)]
Add features for PPC 4xx and e500/e500mc instructions.
Move the test cases for them into separate files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214724
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 4 Aug 2014 14:55:26 +0000 (14:55 +0000)]
[PowerPC] Add target triple to vec_urem_const.ll test case
This should hopefully fix build bots on other architectures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214721
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Khasanov [Mon, 4 Aug 2014 14:35:15 +0000 (14:35 +0000)]
[SKX] Enabling load/store instructions: encoding
Instructions: VMOVAPD, VMOVAPS, VMOVDQA8, VMOVDQA16, VMOVDQA32,VMOVDQA64, VMOVDQU8, VMOVDQU16, VMOVDQU32,VMOVDQU64, VMOVUPD, VMOVUPS,
Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214719
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 4 Aug 2014 13:53:40 +0000 (13:53 +0000)]
[PowerPC] Swap arguments to vpkuhum/vpkuwum on little-endian
In commit r213915, Bill fixed little-endian usage of vmrgh* and vmrgl*
by swapping the input arguments. As it turns out, the exact same fix
is also required for the vpkuhum/vpkuwum patterns.
This fixes another regression in llvmpipe when vector support is
enabled.
Reviewed by Bill Schmidt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214718
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 4 Aug 2014 13:51:27 +0000 (13:51 +0000)]
Improving the name of the function parameter, which happens to solve two likely-less-than-useful MSVC warnings: warning C4258: 'I' : definition from the for loop is ignored; the definition from the enclosing scope is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214717
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 4 Aug 2014 13:27:12 +0000 (13:27 +0000)]
[PowerPC] MULHU/MULHS are not legal for vector types
I ran into some test failures where common code changed vector division
by constant into a multiply-high operation (MULHU). But these are not
implemented by the back-end, so we failed to recognize the insn.
Fixed by marking MULHU/MULHS as Expand for vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214716
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 4 Aug 2014 13:27:03 +0000 (13:27 +0000)]
Fixed accidental use of reserved identifier in r214709.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214715
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 4 Aug 2014 13:13:57 +0000 (13:13 +0000)]
[PowerPC] Fix and improve vector comparisons
This patch refactors code generation of vector comparisons.
This fixes a wrong code-gen bug for ISD::SETGE for floating-point types,
and improves generated code for vector comparisons in general.
Specifically, the patch moves all logic deciding how to implement vector
comparisons into getVCmpInst, which gets two extra boolean outputs
indicating to its caller whether its needs to swap the input operands
and/or negate the result of the comparison. Apart from implementing
these two modifications as directed by getVCmpInst, there is no need
to ever implement vector comparisons in any other manner; in particular,
there is never a need to perform two separate comparisons (e.g. one for
equal and one for greater-than, as code used to do before this patch).
Reviewed by Bill Schmidt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214714
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 4 Aug 2014 12:20:00 +0000 (12:20 +0000)]
[mips] Add assembler support for '.set mipsX'.
Summary:
This patch also fixes an issue with the way the Mips assembler enables/disables architecture
features. Before this patch, the assembler never disabled feature bits. For example,
.set mips64
.set mips32r2
would result in the 'OR' of mips64 with mips32r2 feature bits which isn't right.
Unfortunately this isn't trivial to fix because there's not an easy way to clear
feature bits as the algorithm in MCSubtargetInfo (ToggleFeature) only clears the bits
that imply the feature being cleared and not the implied bits by the feature (there's a
better explanation to the code I added).
Patch by Matheus Almeida and updated by Toma Tabacu
Reviewers: vmedic, matheusalmeida, dsanders
Reviewed By: dsanders
Subscribers: tomatabacu, llvm-commits
Differential Revision: http://reviews.llvm.org/D4123
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214709
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 4 Aug 2014 10:23:22 +0000 (10:23 +0000)]
TargetInstrInfo::genAlternativeCodeSequence(): Fix a couple of \param(s). [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214708
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 4 Aug 2014 10:17:35 +0000 (10:17 +0000)]
[x86] Just unilaterally prefer SSSE3-style PSHUFB lowerings over clever
use of PACKUS. It's cleaner that way.
I looked at implementing clever combine-based folding of PACKUS chains
into PSHUFB but it is quite hard and doesn't seem likely to be worth it.
The most annoying part would be detecting that the correct masking had
been done to use PACKUS-style instructions as a blend operation rather
than there being any saturating as is indicated by its name. We generate
really nice code for what few test cases I've come up with that aren't
completely contrived for this by just directly prefering PSHUFB and so
let's go with that strategy for now. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214707
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 4 Aug 2014 09:40:02 +0000 (09:40 +0000)]
[x86] Implement more aggressive use of PACKUS chains for lowering common
patterns of v16i8 shuffles.
This implements one of the more important FIXMEs for the SSE2 support in
the new shuffle lowering. We now generate the optimal shuffle sequence
for truncate-derived shuffles which show up essentially everywhere.
Unfortunately, this exposes a weakness in other parts of the shuffle
logic -- we can no longer form PSHUFB here. I'll add the necessary
support for that and other things in a subsequent commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214702
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 4 Aug 2014 09:26:40 +0000 (09:26 +0000)]
Update links to the gcc and java documentation that 404'd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214700
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Mon, 4 Aug 2014 05:10:33 +0000 (05:10 +0000)]
Revert "r214669 - MachineCombiner Pass for selecting faster instruction"
This commit broke "make check" for several hours, so get it reverted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214697
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 4 Aug 2014 01:43:37 +0000 (01:43 +0000)]
MemoryBuffer: Don't use mmap when FileSize is multiple of 4k on Cygwin.
On Cygwin, getpagesize() returns 64k(AllocationGranularity).
In r214580, the size of X86GenInstrInfo.inc became
1499136.
FIXME: We should reorganize again getPageSize() on Win32.
MapFile allocates address along AllocationGranularity but view is mapped by physical page.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214681
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 4 Aug 2014 01:14:24 +0000 (01:14 +0000)]
[x86] Handle single input shuffles in the SSSE3 case more intelligently.
I spent some time looking into a better or more principled way to handle
this. For example, by detecting arbitrary "unneeded" ORs... But really,
there wasn't any point. We just shouldn't build blatantly wrong code so
late in the pipeline rather than adding more stages and logic later on
to fix it. Avoiding this is just too simple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214680
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 4 Aug 2014 00:54:28 +0000 (00:54 +0000)]
[x86] Fix the test case added in r214670 and tweaked in r214674 further.
Fundamentally, there isn't a really portable way to test the constant
pool contents. Instead, pin this test to the bare-metal triple. This
also makes it a 64-bit triple which allows us to only match a single
constant pool rather than two. It can also just hard code the '.' prefix
as the format should be stable now that it has a fixed triple. Finally,
I've switched it to use CHECK-NEXT to be more precise in the instruction
sequence expected and to use variables rather than hard coding decisions
by the register allocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214679
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 3 Aug 2014 23:54:22 +0000 (23:54 +0000)]
[OCaml] Add Llvm.{string_of_const,const_element}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214677
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 3 Aug 2014 23:54:16 +0000 (23:54 +0000)]
[LLVM-C] Add LLVM{IsConstantString,GetAsString,GetElementAsConstant}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214676
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 3 Aug 2014 23:20:16 +0000 (23:20 +0000)]
Account for possible leading '.' in label string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214674
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 3 Aug 2014 23:10:59 +0000 (23:10 +0000)]
[x86] Don't add nodes to the combined set (and prune subsequent
combines) until they are legal.
Doing it the old way could, when the stars align *just* right, cause
a node to get into the combine set prior to being legalized. Then, when
the same node showed up as an operand to another node later on (but not
so much later on that it had been deleted as dead) we would fail to add
it back to the worklist thinking it had already been combined. This
would in turn cause it to not be legalized. Fortunately, we can also
walk the operands looking for uncombined (and thus potentially
un-legalized) nodes late. It will still ensure that we walk all operands
of all nodes and send all of them through both the legalizer without
changes and the combiner at least once. (Which was the original goal of
this).
I have a test case for this bug, but it is terribly brittle. For
example, it will stop finding the bug the moment I enable the new
shuffle lowering. I don't yet have any test case that reliably exercises
this bug, and it isn't clear that it will be possible to craft one. It
is entirely possible that with the new shuffle lowering the two forms of
doing this are precisely equivalent. That doesn't mean we shouldn't take
the more conservative approach of insisting on things in the combined
set having survived the legalizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214673
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 3 Aug 2014 23:00:39 +0000 (23:00 +0000)]
X86: silence warning (-Wparentheses)
GCC 4.8.2 points out the ambiguity in evaluation of the assertion condition:
lib/Target/X86/X86FloatingPoint.cpp:949:49: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
assert(STReturns == 0 || isMask_32(STReturns) && N <= 2);
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214672
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 3 Aug 2014 23:00:38 +0000 (23:00 +0000)]
CodeGen: silence a warning
GCC 4.8.2 objects to the tautological condition in the assert as the unsigned
value is guaranteed to be >= 0. Simplify the assertion by dropping the
tautological condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214671
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 3 Aug 2014 22:48:23 +0000 (22:48 +0000)]
fix for PR20354 - Miscompile of fabs due to vectorization
This is intended to be the minimal change needed to fix PR20354 ( http://llvm.org/bugs/show_bug.cgi?id=20354 ). The check for a vector operation was wrong; we need to check that the fabs itself is not a vector operation.
This patch will not generate the optimal code. A constant pool load and 'and' op will be generated instead of just returning a value that we can calculate in advance (as we do for the scalar case). I've put a 'TODO' comment for that here and expect to have that patch ready soon.
There is a very similar optimization that we can do in visitFNEG, so I've put another 'TODO' there and expect to have another patch for that too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214670
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Sun, 3 Aug 2014 22:03:40 +0000 (22:03 +0000)]
MachineCombiner Pass for selecting faster instruction
sequence - AArch64 target support
This patch turns off madd/msub generation in the DAGCombiner and generates
them in the MachineCombiner instead. It replaces the original code sequence
with the combined sequence when it is beneficial to do so.
When there is no machine model support it always generates the madd/msub
instruction. This is true also when the objective is to optimize for code
size: when the combined sequence is shorter is always chosen and does not
get evaluated.
When there is a machine model the combined instruction sequence
is evaluated for critical path and resource length using machine
trace metrics and the original code sequence is replaced when it is
determined to be faster.
rdar://
16319955
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214669
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Sun, 3 Aug 2014 21:35:39 +0000 (21:35 +0000)]
MachineCombiner Pass for selecting faster instruction
sequence - target independent framework
When the DAGcombiner selects instruction sequences
it could increase the critical path or resource len.
For example, on arm64 there are multiply-accumulate instructions (madd,
msub). If e.g. the equivalent multiply-add sequence is not on the
crictial path it makes sense to select it instead of the combined,
single accumulate instruction (madd/msub). The reason is that the
conversion from add+mul to the madd could lengthen the critical path
by the latency of the multiply.
But the DAGCombiner would always combine and select the madd/msub
instruction.
This patch uses machine trace metrics to estimate critical path length
and resource length of an original instruction sequence vs a combined
instruction sequence and picks the faster code based on its estimates.
This patch only commits the target independent framework that evaluates
and selects code sequences. The machine instruction combiner is turned
off for all targets and expected to evolve over time by gradually
handling DAGCombiner pattern in the target specific code.
This framework lays the groundwork for fixing
rdar://
16319955
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214666
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 3 Aug 2014 18:51:26 +0000 (18:51 +0000)]
MC: virtualise EmitWindowsUnwindTables
This makes EmitWindowsUnwindTables a virtual function and lowers the
implementation of the function to the X86WinCOFFStreamer. This method is a
target specific operation. This enables making the behaviour target dependent
by isolating it entirely to the target specific streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214664
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 3 Aug 2014 18:51:17 +0000 (18:51 +0000)]
MC: rename Win64EHFrameInfo to WinEH::FrameInfo
The frame information stored in this structure is driven by the requirements for
Windows NT unwinding rather than Windows 64 specifically. As a result, this
type can be shared across multiple architectures (ARM, AXP, MIPS, PPC, SH).
Rename this class in preparation for adding support for supporting unwinding
information for Windows on ARM.
Take the opportunity to constify the members as everything except the
ChainedParent is read-only. This required some adjustment to the label
handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214663
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sun, 3 Aug 2014 05:27:14 +0000 (05:27 +0000)]
R600/SI: Fix extra whitespace in asm str
This slipped in in r214467, so something like
V_MOV_B32_e32 v0, ... is now printed with 2 spaces
between the instruction name and first operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214660
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 2 Aug 2014 23:41:54 +0000 (23:41 +0000)]
[SimplifyCFG] fix accessing deleted PHINodes in switch-to-table conversion.
When we have a covered lookup table, make sure we don't delete PHINodes that
are cached in PHIs.
rdar://
17887153
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214642
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 2 Aug 2014 20:16:29 +0000 (20:16 +0000)]
tlbia support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214640
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 2 Aug 2014 20:00:26 +0000 (20:00 +0000)]
mfdcr / mtdcr support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214639
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Sat, 2 Aug 2014 19:39:42 +0000 (19:39 +0000)]
fix bug 20513 - Crash in SLP Vectorizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214638
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Sat, 2 Aug 2014 17:15:11 +0000 (17:15 +0000)]
Update test to use a more modern AArch64 triple, as requested by Renato.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214637
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 2 Aug 2014 15:09:41 +0000 (15:09 +0000)]
Don't use additional arguments for dss and friends to satisfy DSS_Form,
when let can do the same thing. Keep the 64bit variants as codegen-only.
While they have a different register class, the encoding is the same for
32bit and 64bit mode. Having both present would otherwise confuse the
disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214636
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Sat, 2 Aug 2014 14:51:24 +0000 (14:51 +0000)]
[AArch64] Teach DAGCombiner that converting two consecutive loads into a vector load is not a good transform when paired loads are available.
The combiner was creating Q-register loads and stores, which then had to be spilled because there are no callee-save Q registers!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214634
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 11:34:23 +0000 (11:34 +0000)]
[x86] Remove the FIXME that was implemented in r214628. Managed to
forget to update the comment here... =/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214630
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 11:17:41 +0000 (11:17 +0000)]
[x86] Give this test a bare metal triple so it doesn't use the weird
Darwin x86 asm comment prefix designed to work around GAS on that
platform. That makes the comment-matching of the test much more stable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214629
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 10:39:15 +0000 (10:39 +0000)]
[x86] Largely complete the use of PSHUFB in the new vector shuffle
lowering with a small addition to it and adding PSHUFB combining.
There is one obvious place in the new vector shuffle lowering where we
should form PSHUFBs directly: when without them we will unpack a vector
of i8s across two different registers and do a potentially 4-way blend
as i16s only to re-pack them into i8s afterward. This is the crazy
expensive fallback path for i8 shuffles and we can just directly use
pshufb here as it will always be cheaper (the unpack and pack are
two instructions so even a single shuffle between them hits our
three instruction limit for forming PSHUFB).
However, this doesn't generate very good code in many cases, and it
leaves a bunch of common patterns not using PSHUFB. So this patch also
adds support for extracting a shuffle mask from PSHUFB in the X86
lowering code, and uses it to handle PSHUFBs in the recursive shuffle
combining. This allows us to combine through them, combine multiple ones
together, and generally produce sufficiently high quality code.
Extracting the PSHUFB mask is annoyingly complex because it could be
either pre-legalization or post-legalization. At least this doesn't have
to deal with re-materialized constants. =] I've added decode routines to
handle the different patterns that show up at this level and we dispatch
through them as appropriate.
The two primary test cases are updated. For the v16 test case there is
still a lot of room for improvement. Since I was going through it
systematically I left behind a bunch of FIXME lines that I'm hoping to
turn into ALL lines by the end of this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214628
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 10:29:36 +0000 (10:29 +0000)]
[x86] Switch to using the variable we extracted this operand into.
Spotted this missed refactoring by inspection when reading code, and it
doesn't changethe functionality at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214627
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 10:29:34 +0000 (10:29 +0000)]
[x86] Fix a few typos in my comments spotted in passing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214626
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 10:27:38 +0000 (10:27 +0000)]
[x86] Teach the target shuffle mask extraction to recognize unary forms
of normally binary shuffle instructions like PUNPCKL and MOVLHPS.
This detects cases where a single register is used for both operands
making the shuffle behave in a unary way. We detect this and adjust the
mask to use the unary form which allows the existing DAG combine for
shuffle instructions to actually work at all.
As a consequence, this uncovered a number of obvious bugs in the
existing DAG combine which are fixed. It also now canonicalizes several
shuffles even with the existing lowering. These typically are trying to
match the shuffle to the domain of the input where before we only really
modeled them with the floating point variants. All of the cases which
change to an integer shuffle here have something in the integer domain, so
there are no more or fewer domain crosses here AFAICT. Technically, it
might be better to go from a GPR directly to the floating point domain,
but detecting floating point *outputs* despite integer inputs is a lot
more code and seems unlikely to be worthwhile in practice. If folks are
seeing domain-crossing regressions here though, let me know and I can
hack something up to fix it.
Also as a consequence, a bunch of missed opportunities to form pshufb
now can be formed. Notably, splats of i8s now form pshufb.
Interestingly, this improves the existing splat lowering too. We go from
3 instructions to 1. Yes, we may tie up a register, but it seems very
likely to be worth it, especially if splatting the 0th byte (the
common case) as then we can use a zeroed register as the mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214625
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 10:08:17 +0000 (10:08 +0000)]
[x86] Teach my pshufb comment printer to handle VPSHUFB forms as well as
PSHUFB forms. This will be important to update some AVX tests when I add
PSHUFB combining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214624
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 10:02:07 +0000 (10:02 +0000)]
[SDAG] Refactor the code which deletes nodes in the DAG combiner to do
so using a single helper which adds operands back onto the worklist.
Several places didn't rigorously do this but a couple already did.
Factoring them together and doing it rigorously is important to delete
things recursively early on in the combiner and get a chance to see
accurate hasOneUse values. While no existing test cases change, an
upcoming patch to add DAG combining logic for PSHUFB requires this to
work correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214623
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 2 Aug 2014 08:45:33 +0000 (08:45 +0000)]
Fix issues with ISD::FNEG and ISD::FMA SDNodes where they would not be constant-folded
during DAGCombine in certain circumstances. Unfortunately, the circumstances required
to trigger the issue seem to require a pretty specific interaction of DAGCombines,
and I haven't been able to find a testcase that reproduces on X86, ARM, or AArch64.
The functionality added here is replicated in essentially every other DAG combine,
so it seems pretty obviously correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214622
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Sat, 2 Aug 2014 06:47:07 +0000 (06:47 +0000)]
CodeGen: Remove commented out code
These two lines have been commented out for over 4 years. They aren't
helping anyone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214615
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 2 Aug 2014 05:40:40 +0000 (05:40 +0000)]
[ARM] In dynamic-no-pic mode, ARM's post-RA pseudo expansion was incorrectly
expanding pseudo LOAD_STATCK_GUARD using instructions that are normally used
in pic mode. This patch fixes the bug.
<rdar://problem/
17886592>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214614
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 2 Aug 2014 03:00:49 +0000 (03:00 +0000)]
[MCJIT] Fix an overly-aggressive check in RuntimeDyldMachOARM.
This should fix the MachO_ARM_PIC_relocations.s test failures on some 32-bit
testers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214613
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 2 Aug 2014 02:26:51 +0000 (02:26 +0000)]
R600: Cleanup fneg tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214612
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 2 Aug 2014 01:39:08 +0000 (01:39 +0000)]
Add a small utility called bisect that enables commandline bisecting on a counter.
This is something that I have found to be very useful in my work and I
wanted to contribute it back to the community since several people in
the past have asked me for something along these lines. (Jakob, I know
this has been a while coming ; )]
The way you use this is you create a script that takes in as its first
argument a count. The script passes into LLVM the count via a command
line flag that disables a pass after LLVM has run after the pass has
run for count number of times. Then the script invokes a test of some
sort and indicates whether LLVM successfully compiled the test via the
scripts exit status. Then you invoke bisect as follows:
bisect --start=<start_num> --end=<end_num> ./script.sh "%(count)s"
And bisect will continually call ./script.sh with various counts using
the exit status to determine success and failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214610
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Sat, 2 Aug 2014 01:29:52 +0000 (01:29 +0000)]
[lit] Add --show-xfail flag to LIT.
Summary:
This patch add a --show-xfail flag. If this flag is specified then each xfail test will be printed to output.
When it is not given xfail tests are ignored. Ignoring xfail tests is the current behavior.
This flag is meant to mirror the --show-unsupported flag that was recently added.
Reviewers: ddunbar, EricWF
Reviewed By: EricWF
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D4750
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214609
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 2 Aug 2014 01:10:28 +0000 (01:10 +0000)]
R600/SI: Fix formatting.
Avoid weird line wrapping of BuildMI dest register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214608
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 00:50:10 +0000 (00:50 +0000)]
[x86] Make some questionable tests not spew assembly to stdout, which
makes a mess of the lit output when they ultimately fail.
The 2012-10-02-DAGCycle test is really frustrating because the *only*
explanation for what it is testing is a rdar link. I would really rather
that rdar links (which are not public or part of the open source
project) were not committed to the source code. Regardless, the actual
problem *must* be described as the rdar link is completely opaque. The
fact that this test didn't check for any particular output further
exacerbates the inability of any other developer to debug failures.
The mem-promote-integers test has nice comments and *seems* to be
a great test for our lowering... except that we don't actually check
that any of the generated code is correct or matches some pattern. We
just avoid crashing. It would be great to go back and populate this test
with the actual expectations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214605
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Sat, 2 Aug 2014 00:35:50 +0000 (00:35 +0000)]
[ASan] Use metadata to pass source-level information from Clang to ASan.
Instead of creating global variables for source locations and global names,
just create metadata nodes and strings. They will be transformed into actual
globals in the instrumentation pass (if necessary). This approach is more
flexible:
1) we don't have to ensure that our custom globals survive all the optimizations
2) if globals are discarded for some reason, we will simply ignore metadata for them
and won't have to erase corresponding globals
3) metadata for source locations can be reused for other purposes: e.g. we may
attach source location metadata to alloca instructions and provide better descriptions
for stack variables in ASan error reports.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214604
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 00:24:54 +0000 (00:24 +0000)]
[SDAG] Allow the legalizer to delete an illegally typed intermediate
introduced during legalization. This pattern is based on other patterns
in the legalizer that I changed in the same way. Now, the legalizer
eagerly collects its garbage when necessary so that we can survive
leaving such nodes around for it.
Instead, we add an assert to make sure the node will be correctly
handled by that layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214602
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 2 Aug 2014 00:19:10 +0000 (00:19 +0000)]
[SDAG] Let the DAG combiner take care of dead nodes rather than manually
deleting them. This already seems to work, as no tests fail without
this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214601
91177308-0d34-0410-b5e6-
96231b3b80d8
Tyler Nowicki [Sat, 2 Aug 2014 00:14:03 +0000 (00:14 +0000)]
Add diagnostics to the vectorizer cost model.
When the cost model determines vectorization is not possible/profitable these remarks print an analysis of that decision.
Note that in selectVectorizationFactor() we can assume that OptForSize and ForceVectorization are mutually exclusive.
Reviewed by Arnold Schwaighofer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214599
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 2 Aug 2014 00:12:54 +0000 (00:12 +0000)]
BitcodeTests: Fix LINK_COMPONENTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214598
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 1 Aug 2014 23:49:41 +0000 (23:49 +0000)]
verify-uselistorder: Reverse use-lists at every verification
Updated `verify-uselistorder` to more than double the number of use-list
orders it checks.
- Every time it verifies an order, it then reverses the order and
verifies again.
- It now verifies the initial order, before running any shuffles.
Changed the default to `-num-shuffles=1`, since this is already four
checks, and after r214584 shuffling is guaranteed to make a new order.
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214596
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 1 Aug 2014 23:31:13 +0000 (23:31 +0000)]
verify-uselistorder: Add missing `static`
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214595
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 1 Aug 2014 23:28:49 +0000 (23:28 +0000)]
IR: Add Value::reverseUseList()
I'm going to use this to improve `verify-uselistorder`. Part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214594
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 1 Aug 2014 23:21:21 +0000 (23:21 +0000)]
PartiallyInlineLibCalls: Check sqrt result type before transforming it.
Some configure scripts declare this with the wrong prototype, which can lead
to an assertion failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214593
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 1 Aug 2014 23:03:36 +0000 (23:03 +0000)]
verify-uselistorder: Move shuffleUseLists() out of lib/IR
`shuffleUseLists()` is only used in `verify-uselistorder`, so move it
there to avoid bloating other executables. As a drive-by, update some
of the header docs.
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214592
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 1 Aug 2014 23:01:32 +0000 (23:01 +0000)]
Cleanup this test some more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214591
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 1 Aug 2014 23:01:30 +0000 (23:01 +0000)]
Add the missing target triple to this testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214590
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 1 Aug 2014 22:56:10 +0000 (22:56 +0000)]
Attempt to increase the overall happiness of the MSCV-based buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214588
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 1 Aug 2014 22:52:06 +0000 (22:52 +0000)]
verify-uselistorder: Make the verification logic easier to reuse
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214587
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 1 Aug 2014 22:50:07 +0000 (22:50 +0000)]
InstrProf: Allow multiple functions with the same name
This updates the instrumentation based profiling format so that when
we have multiple functions with the same name (but different function
hashes) we keep all of them instead of rejecting the later ones.
There are a number of scenarios where this can come up where it's more
useful to keep multiple function profiles:
* Name collisions in unrelated libraries that are profiled together.
* Multiple "main" functions from multiple tools built against a common
library.
* Combining profiles from different build configurations (ie, asserts
and no-asserts)
The profile format now stores the number of counters between the hash
and the counts themselves, so that multiple sets of counts can be
stored. Since this is backwards incompatible, I've bumped the format
version and added some trivial logic to skip this when reading the old
format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214585
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 1 Aug 2014 22:50:04 +0000 (22:50 +0000)]
UseListOrder: Guarantee that shuffles change use-list order
Change shuffleUseLists() always to change use-list order by rejecting
orders that have no changes.
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214584
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 1 Aug 2014 22:27:19 +0000 (22:27 +0000)]
UseListOrder: Fix blockaddress use-list order
`parseBitcodeFile()` uses the generic `getLazyBitcodeFile()` function as
a helper. Since `parseBitcodeFile()` isn't actually lazy -- it calls
`MaterializeAllPermanently()` -- bypass the unnecessary call to
`materializeForwardReferencedFunctions()` by extracting out a common
helper function. This removes the last of the use-list churn caused by
blockaddresses.
This highlights that we can't reproduce use-list order of globals and
constants when parsing lazily -- but that's necessarily out of scope.
When we're parsing lazily, we never have all the functions in memory, so
the use-lists of globals (and constants that reference globals) are
always incomplete.
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214581
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Aug 2014 22:19:41 +0000 (22:19 +0000)]
[X86] Simplify X87 stackifier pass.
Stop using ST registers for function returns and inline-asm instructions and use
FP registers instead. This allows removing a large amount of code in the
stackifier pass that was needed to track register liveness and handle copies
between ST and FP registers and function calls returning floating point values.
It also fixes a bug which manifests when an ST register defined by an
inline-asm instruction was live across another inline-asm instruction, as shown
in the following sequence of machine instructions:
1. INLINEASM <es:frndint> $0:[regdef], %ST0<imp-def,tied5>
2. INLINEASM <es:fldcw $0>
3. %FP0<def> = COPY %ST0
<rdar://problem/
16952634>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214580
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 1 Aug 2014 22:15:38 +0000 (22:15 +0000)]
llvm/test/CodeGen/Mips/cconv/arguments-varargs.ll: Add explicit -mtriple=(mips|mipsel)-linux on 4 lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214578
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 1 Aug 2014 22:11:58 +0000 (22:11 +0000)]
Debug info: Infrastructure to support debug locations for fragmented
variables (for example, by-value struct arguments passed in registers, or
large integer values split across several smaller registers).
On the IR level, this adds a new type of complex address operation OpPiece
to DIVariable that describes size and offset of a variable fragment.
On the DWARF emitter level, all pieces describing the same variable are
collected, sorted and emitted as DWARF expressions using the DW_OP_piece
and DW_OP_bit_piece operators.
http://reviews.llvm.org/D3373
rdar://problem/
15928306
What this patch doesn't do / Future work:
- This patch only adds the backend machinery to make this work, patches
that change SROA and SelectionDAG's type legalizer to actually create
such debug info will follow. (http://reviews.llvm.org/D2680)
- Making the DIVariable complex expressions into an argument of dbg.value
will reduce the memory footprint of the debug metadata.
- The sorting/uniquing of pieces should be moved into DebugLocEntry,
to facilitate the merging of multi-piece entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214576
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 1 Aug 2014 22:09:43 +0000 (22:09 +0000)]
[SDAG] MorphNodeTo recursively deletes dead operands of the old
fromulation of the node, which isn't really the desired behavior from
within the combiner or legalizer, but is necessary within ISel. I've
added a hopefully helpful comment and fixed the only two places where
this took place.
Yet another step toward the combiner and legalizer not needing to use
update listeners with virtual calls to manage the worklists behind
legalization and combining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214574
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 1 Aug 2014 21:55:50 +0000 (21:55 +0000)]
Revert "R600: Move code for generating REGISTER_LOAD into R600ISelLowering.cpp"
This reverts commit r214566.
I did not mean to commit this yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214572
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 1 Aug 2014 21:54:37 +0000 (21:54 +0000)]
MS inline asm: Hide symbol to attempt to fix test failure on darwin
If the symbol comes from an external DSO, it apparently requires
indirection through a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214571
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 1 Aug 2014 21:51:52 +0000 (21:51 +0000)]
BitcodeReader: Change mechanics of BlockAddress forward references, NFC
Now that we can reliably handle forward references to `BlockAddress`
(r214563), change the mechanics to simplify predicting use-list order.
Previously, we created dummy `GlobalVariable`s to represent block
addresses. After every function was materialized, we'd go through any
forward references to its blocks and RAUW them with a proper
`BlockAddress` constant. This causes some (potentially a lot of)
unnecessary use-list churn, since any constant expression that it's a
part of will need to be rematerialized as well.
Instead, pre-construct a `BasicBlock` immediately -- without attaching
it to its (empty) `Function` -- and use that to construct a
`BlockAddress`. This constant will not have to be regenerated. When
the function body is parsed, hook this pre-constructed basic block up
in the right place using `BasicBlock::insertInto()`.
Both before and after this change, the IR is temporarily in an invalid
state that gets resolved when `materializeForwardReferencedFunctions()`
gets called.
This is a prep commit that's part of PR5680, but the only functionality
change is the reduction of churn in the constant pool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214570
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 1 Aug 2014 21:51:05 +0000 (21:51 +0000)]
R600/SI: Remove leftover debugging code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214569
91177308-0d34-0410-b5e6-
96231b3b80d8