Devang Patel [Tue, 10 Jan 2012 21:49:42 +0000 (21:49 +0000)]
Let asm parser query asm syntax dialect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147880
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 10 Jan 2012 21:12:34 +0000 (21:12 +0000)]
This is the matching change for the data structure name changes for the
functional change in r147860 to use DW_TAG_label's instead TAG_subprogram's.
This only changes names and updates comments. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147877
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 10 Jan 2012 21:11:12 +0000 (21:11 +0000)]
ARM updating VST2 pseudo-lowering fixed vs. register update.
rdar://
10663487
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147876
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 10 Jan 2012 20:47:20 +0000 (20:47 +0000)]
Fix some leftover control reaches end of non-void function warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147874
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 10 Jan 2012 19:46:00 +0000 (19:46 +0000)]
Teach the triple library about the androideabi environment.
Patch by Evgeniy Stepanov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147871
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 10 Jan 2012 19:43:09 +0000 (19:43 +0000)]
Move default case for covered enum outside of switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147870
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 10 Jan 2012 19:41:30 +0000 (19:41 +0000)]
For i386, don't use the generic code.
As the comment around 7746 says, it's better to use the x87 extended precision
here than SSE. And the generic code doesn't know how to do that. It also regains
the speed lost for the uint64_to_float.c testcase.
<rdar://problem/
10669858>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147869
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 10 Jan 2012 19:10:22 +0000 (19:10 +0000)]
Fix a -Wreturn-type warning in g++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147867
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 10 Jan 2012 18:18:52 +0000 (18:18 +0000)]
Cleanup these asserts to follow common LLVM style and coding
conventions. Also, clarify the grouping of one of the asserts to silence
-Wparentheses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147863
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 10 Jan 2012 18:08:01 +0000 (18:08 +0000)]
Add 'llvm_unreachable' to passify GCC's understanding of the constraints
of several newly un-defaulted switches. This also helps optimizers
(including LLVM's) recognize that every case is covered, and we should
assume as much.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147861
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 10 Jan 2012 17:52:29 +0000 (17:52 +0000)]
Various crash reporting tools have a problem with the dwarf generated for
assembly source when it generates the TAG_subprogram dwarf debug info for
the labels that have nothing between them as in this bit of assembly source:
% cat ZeroLength.s
_func1:
_func2:
nop
One solution would be to not emit the subsequent labels with the same address
and use the next label with a different address or the end of the section for
the AT_high_pc value of the TAG_subprogram.
Turns out in llvm-mc it is not possible in all cases to determine of two
symbols have the same value at the point we put out the TAG_subprogram dwarf
debug info.
So we will have llvm-mc instead of putting out TAG_subprogram's put out
DW_TAG_label's. And the DW_TAG_label does not have a AT_high_pc value which
avoids the problem.
This commit is only the functional change to make the diffs clear as to what is
really being changed. The next commit will be to clean up the names of such
things like MCGenDwarfSubprogramEntry to something like MCGenDwarfLabelEntry.
rdar://
10666925
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147860
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Jan 2012 17:51:54 +0000 (17:51 +0000)]
Add definition for intel asm variant.
Right now, this just adds additional entries in match table. The parser does not use them yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147859
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Jan 2012 17:50:43 +0000 (17:50 +0000)]
Record asm variant id in MatchEntry and check it while matching instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147858
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 10 Jan 2012 16:47:17 +0000 (16:47 +0000)]
Remove unnecessary default cases in switches that cover all enum values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147855
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 10 Jan 2012 14:28:46 +0000 (14:28 +0000)]
Fix a bug in the legalization of shuffle vectors. When we emulate shuffles using BUILD_VECTORS we may be using a BV of different type. Make sure to cast it back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147851
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 10 Jan 2012 11:50:02 +0000 (11:50 +0000)]
Add definitions for AMD's bobcat (aka btver1)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147846
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2012 08:23:59 +0000 (08:23 +0000)]
Fix a crash in AVX2 when trying to broadcast a double into a 128-bit vector. There is no vbroadcastsd xmm, but we do need to support 64-bit integers broadcasted into xmm. Also factor the AVX check into the isVectorBroadcast function. This makes more sense since the AVX2 check was already inside.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147844
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2012 06:54:16 +0000 (06:54 +0000)]
Remove hasXMM/hasXMMInt functions. Move callers to hasSSE1/hasSSE2. This is the final piece to remove the AVX hack that disabled SSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147843
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2012 06:37:29 +0000 (06:37 +0000)]
Remove hasSSE*orAVX functions and change all callers to use just hasSSE*. AVX is now an SSE level and no longer disables SSE checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147842
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jan 2012 06:30:56 +0000 (06:30 +0000)]
Instruction selection priority fixes to remove the XMM/XMMInt/orAVX predicates. Another commit will remove orAVX functions from X86SubTarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147841
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Jan 2012 02:02:58 +0000 (02:02 +0000)]
Allow machine-cse to look across MBB boundary when cse'ing instructions that
define physical registers. It's currently very restrictive, only catching
cases where the CE is in an immediate (and only) predecessor. But it catches
a surprising large number of cases.
rdar://
10660865
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147827
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 10 Jan 2012 01:45:08 +0000 (01:45 +0000)]
Enable LSR IV Chains with sufficient heuristics.
These heuristics are sufficient for enabling IV chains by
default. Performance analysis has been done for i386, x86_64, and
thumbv7. The optimization is rarely important, but can significantly
speed up certain cases by eliminating spill code within the
loop. Unrolled loops are prime candidates for IV chains. In many
cases, the final code could still be improved with more target
specific optimization following LSR. The goal of this feature is for
LSR to make the best choice of induction variables.
Instruction selection may not completely take advantage of this
feature yet. As a result, there could be cases of slight code size
increase.
Code size can be worse on x86 because it doesn't support postincrement
addressing. In fact, when chains are formed, you may see redundant
address plus stride addition in the addressing mode. GenerateIVChains
tries to compensate for the common cases.
On ARM, code size increase can be mitigated by using postincrement
addressing, but downstream codegen currently misses some opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147826
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 10 Jan 2012 01:34:59 +0000 (01:34 +0000)]
Accurately model hardware alignment rounding.
On Thumb, the displacement computation hardware uses the address of the
current instruction rouned down to a multiple of 4. Include this
rounding in the UserOffset we compute for each instruction.
When inline asm is present, the instruction alignment may not be known.
Constrain the maximum displacement instead in that case.
This makes it possible for CreateNewWater() and OffsetIsInRange() to
agree about the valid displacements. When they disagree, infinite
looping happens.
As always, test cases for this stuff are insane.
<rdar://problem/
10660175>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147825
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 10 Jan 2012 00:40:39 +0000 (00:40 +0000)]
Remove the logging streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147820
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 9 Jan 2012 22:16:24 +0000 (22:16 +0000)]
Catch runaway ARMConstantIslandPass even in -Asserts builds.
The pass is prone to looping, and it is better to crash than loop
forever, even in a -Asserts build.
<rdar://problem/
10660175>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147806
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Jan 2012 21:32:02 +0000 (21:32 +0000)]
Fix asm string wrt variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147805
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Jan 2012 21:30:46 +0000 (21:30 +0000)]
Use descriptive variable name and remove incorrect operand number check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147802
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 9 Jan 2012 21:18:52 +0000 (21:18 +0000)]
Adding IV chain generation to LSR.
After collecting chains, check if any should be materialized. If so,
hide the chained IV users from the LSR solver. LSR will only solve for
the head of the chain. GenerateIVChains will then materialize the
chained IV users by computing the IV relative to its previous value in
the chain.
In theory, chained IV users could be exposed to LSR's solver. This
would be considerably complicated to implement and I'm not aware of a
case where we need it. In practice it's more important to
intelligently prune the search space of nontrivial loops before
running the solver, otherwise the solver is often forced to prune the
most optimal solutions. Hiding the chained users does this well, so
that LSR is more likely to find the best IV for the chain as a whole.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147801
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 9 Jan 2012 19:50:34 +0000 (19:50 +0000)]
Adding collection of IV chains to LSR.
This collects a set of IV uses within the loop whose values can be
computed relative to each other in a sequence. Following checkins will
make use of this information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147797
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Jan 2012 19:13:28 +0000 (19:13 +0000)]
Split AsmParser into two components - AsmParser and AsmParserVariant
AsmParser holds info specific to target parser.
AsmParserVariant holds info specific to asm variants supported by the target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147787
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 9 Jan 2012 18:58:16 +0000 (18:58 +0000)]
"Minor LSR debugging stuff"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147785
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Jan 2012 17:49:47 +0000 (17:49 +0000)]
Update language check. Do not ignore DW_LANG_Python.
Patch by Joe Groff!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147781
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 9 Jan 2012 17:36:29 +0000 (17:36 +0000)]
Move assert to the right place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147779
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 9 Jan 2012 17:23:27 +0000 (17:23 +0000)]
InstCombine: Teach foldLogOpOfMaskedICmpsHelper that sign bit tests are bit tests.
This subsumes several other transforms while enabling us to catch more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147777
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 9 Jan 2012 09:47:25 +0000 (09:47 +0000)]
Don't rely on the fact that shift values are never very large, and thus
this substraction will result in small negative numbers at worst which
become very large positive numbers on assignment and are thus caught by
the <=4 check on the next line. The >0 check clearly intended to catch
these as negative numbers.
Spotted by inspection, and impossible to trigger given the shift widths
that can be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147773
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 9 Jan 2012 09:44:26 +0000 (09:44 +0000)]
Cleanup and FileCheck-ize a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147772
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Jan 2012 09:02:13 +0000 (09:02 +0000)]
Remove AVX hack in X86Subtarget. AVX/AVX2 are now treated as an SSE level. Predicate functions have been altered to maintain previous names and behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147770
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Jan 2012 08:34:00 +0000 (08:34 +0000)]
Add HasAVX predicate to some of the AVX patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147769
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Jan 2012 08:10:38 +0000 (08:10 +0000)]
Reorder a bunch of patterns to put the AVX version first thus giving it priority over the SSE version. Another step towards trying to remove the AVX hack that disables SSE from X86Subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147768
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Jan 2012 06:52:46 +0000 (06:52 +0000)]
Clean up patterns for MOVNT*. Not sure why there were floating point types on MOVNTPS and MOVNTDQ. And v4i64 was completely missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147767
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Jan 2012 06:38:55 +0000 (06:38 +0000)]
Mark MOVNTI as being supported in SSE2 OR AVX mode. This instruction has no AVX equivalent so we should use the SSE version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147766
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Jan 2012 05:07:01 +0000 (05:07 +0000)]
Move SSE2 logical operations PAND/POR/PXOR/PANDN above SSE1 logical operations ANDPS/ORPS/XORPS/ANDNPS. This fixes a pattern ordering issue that meant that the SSE2 instructions could never be directly selected since the SSE1 patterns would always match first. This is largely moot with the ExeDepsFix pass, but I'm trying to audit for all such ordering issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147765
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Jan 2012 02:28:15 +0000 (02:28 +0000)]
Change some places that were checking for AVX OR SSE1/2 to use hasXMM/hasXMMInt instead. Also fix one place that checked SSE3, but accidentally excluded AVX to use hasSSE3orAVX. This is a step towards removing the AVX hack from the X86Subtarget.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147764
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 9 Jan 2012 00:17:29 +0000 (00:17 +0000)]
Don't print an unused label before .cfi_endproc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147763
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Jan 2012 00:11:29 +0000 (00:11 +0000)]
Don't disable MMX support when AVX is enabled. Fix predicates for MMX instructions that were added along with SSE instructions to check for AVX in addition to SSE level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147762
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 8 Jan 2012 23:04:21 +0000 (23:04 +0000)]
Enable FISTTP* instructions when AVX is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147758
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 8 Jan 2012 21:12:51 +0000 (21:12 +0000)]
Tweak my last commit to be less conservative about uses.
We still save an instruction when just the "and" part is replaced.
Also change the code to match comments more closely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147753
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 8 Jan 2012 20:41:16 +0000 (20:41 +0000)]
Don't forget to transfer implicit uses of return instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147752
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 8 Jan 2012 19:52:28 +0000 (19:52 +0000)]
Avoid eraseing copies from a reserved register unless the definition can be
safely proven not to have been clobbered. No small test case possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147751
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 8 Jan 2012 18:32:24 +0000 (18:32 +0000)]
InstCombine: If we have a bit test and a sign test anded/ored together, merge the sign bit into the bit test.
This is common in bit field code, e.g. checking if the first or the last bit of a bit field is set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147749
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Umansky [Sun, 8 Jan 2012 17:20:33 +0000 (17:20 +0000)]
Reverted commit #147601 upon Evan's request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147748
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 7 Jan 2012 23:18:39 +0000 (23:18 +0000)]
Remove MCELFStreamer.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147745
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 7 Jan 2012 22:42:19 +0000 (22:42 +0000)]
Don't print a label before .cfi_startproc when we don't need to. This makes
the produce assembly when using CFI just a bit more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147743
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 7 Jan 2012 21:17:16 +0000 (21:17 +0000)]
Make clever use of alignment and padding to shrink GlobalValue.
-8 bytes on x86_64, no change on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147742
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 7 Jan 2012 20:49:15 +0000 (20:49 +0000)]
Match SelectionDAG logic for enabling movt.
Darwin doesn't do static, and ELF targets only support static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147740
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 7 Jan 2012 20:35:21 +0000 (20:35 +0000)]
Fix typo in the X86 backend readme. Patch from Jaeden Amero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147739
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 7 Jan 2012 19:42:13 +0000 (19:42 +0000)]
Remove VectorExtras. This unused helper was written for a type of API that is discouraged now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147738
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 7 Jan 2012 18:48:43 +0000 (18:48 +0000)]
Remove unnecessary check of hasAVX(). It's already included in hasXMM().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147734
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 7 Jan 2012 18:31:09 +0000 (18:31 +0000)]
Replace some uses of hasNUsesOfValue(0, X) with !hasAnyUseOfValue(X)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147733
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 7 Jan 2012 13:12:07 +0000 (13:12 +0000)]
Port the trick to skip the check for empty buckets from StringMap to DenseMap.
This should fix the odd behavior that find() is slower than lookup().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147731
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 7 Jan 2012 09:06:39 +0000 (09:06 +0000)]
Add some DAG combines for SUBC/SUBE. If nothing uses the carry/borrow out of subc, turn it into a sub. Turn (subc x, x) into 0 with no borrow. Turn (subc x, 0) into x with no borrow. Turn (subc -1, x) into (xor x, -1) with no borrow. Turn sube with no borrow in into subc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147728
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sat, 7 Jan 2012 08:18:37 +0000 (08:18 +0000)]
Fix TableGen so that it will emit the correct signature for FastEmit_f:
/// FastEmit_f - This method is called by target-independent code
/// to request that an instruction with the given type, opcode, and
/// floating-point immediate operand be emitted.
virtual unsigned FastEmit_f(MVT VT,
MVT RetVT,
unsigned Opcode,
const ConstantFP *FPImm);
Currently, it emits an accidentally overloaded version without the const on the
ConstantFP*. This doesn't affect anything in the tree, since nothing causes that
method to be autogenerated, but I have been playing with some ARM TableGen
refactorings that hit this problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147727
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 7 Jan 2012 07:39:50 +0000 (07:39 +0000)]
Optimize reserved register coalescing.
Reserved registers don't have proper live ranges, their LiveInterval
simply has a snippet of liveness for each def. Virtual registers with a
single value that is a copy of a reserved register (typically %esp) can
be coalesced with the reserved register if the live range doesn't
overlap any reserved register defs.
When coalescing with a reserved register, don't modify the reserved
register live range. Just leave it as a bunch of dead defs. This
eliminates quadratic coalescer behavior in i386 functions with many
function calls.
PR11699
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147726
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 7 Jan 2012 07:39:47 +0000 (07:39 +0000)]
Use the 'regalloc' debug tag for most register allocator tracing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147725
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jan 2012 07:08:17 +0000 (07:08 +0000)]
Enable redundant phi elimination after LSR.
This will be more important as we extend the LSR pass in ways that don't rely on the formula solver. In particular, we need it for constructing IV chains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147724
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Sat, 7 Jan 2012 04:11:27 +0000 (04:11 +0000)]
Fix dead link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147721
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 7 Jan 2012 04:07:22 +0000 (04:07 +0000)]
Use getRegForValue() to materialize the address of ARM globals.
This enables basic local CSE, giving us 20% smaller code for
consumer-typeset in -O0 builds.
<rdar://problem/
10658692>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147720
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 7 Jan 2012 03:35:48 +0000 (03:35 +0000)]
Revert part of r147716. Looks like x87 instructions kill markers are all messed
up so branch folding pass can't use the scavenger. :-( This doesn't breaks
anything currently. It just means targets which do not carefully update kill
markers cannot run post-ra scheduler (not new, it has always been the case).
We should fix this at some point since it's really hacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147719
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jan 2012 03:16:50 +0000 (03:16 +0000)]
LSR: Don't optimize loops if an outer loop has no preheader.
LoopSimplify may not run on some outer loops, e.g. because of indirect
branches. SCEVExpander simply cannot handle outer loops with no preheaders.
Fixes rdar://
10655343 SCEVExpander segfault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147718
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 7 Jan 2012 03:13:18 +0000 (03:13 +0000)]
Split Finish into Finish and FinishImpl to have a common place to do end of
file error checking. Use that to error on an unfinished cfi_startproc.
The error is not nice, but is already better than a segmentation fault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147717
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 7 Jan 2012 03:02:36 +0000 (03:02 +0000)]
Added a late machine instruction copy propagation pass. This catches
opportunities that only present themselves after late optimizations
such as tail duplication .e.g.
## BB#1:
movl %eax, %ecx
movl %ecx, %eax
ret
The register allocator also leaves some of them around (due to false
dep between copies from phi-elimination, etc.)
This required some changes in codegen passes. Post-ra scheduler and the
pseudo-instruction expansion passes have been moved after branch folding
and tail merging. They were before branch folding before because it did
not always update block livein's. That's fixed now. The pass change makes
independently since we want to properly schedule instructions after
branch folding / tail duplication.
rdar://
10428165
rdar://
10640363
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147716
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 7 Jan 2012 02:55:54 +0000 (02:55 +0000)]
Copy implicit defs (e.g. r0) when changing tBX_RET to tPOP_RET. This bug is
exposed with an upcoming change will would delete the copy to return register
because there is no use! It's amazing anything works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147715
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 7 Jan 2012 01:47:05 +0000 (01:47 +0000)]
Use movw+movt in ARMFastISel::ARMMaterializeGV.
This eliminates a lot of constant pool entries for -O0 builds of code
with many global variable accesses.
This speeds up -O0 codegen of consumer-typeset by 2x because the
constant island pass no longer has to look at thousands of constant pool
entries.
<rdar://problem/
10629774>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147712
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jan 2012 01:36:44 +0000 (01:36 +0000)]
LSR: run DeleteDeadPhis before replaceCongruentPhis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147711
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 7 Jan 2012 01:33:34 +0000 (01:33 +0000)]
Refactor.
Store AsmParser info locally. A small step towards emitting match entries for multiple asm variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147710
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jan 2012 01:29:21 +0000 (01:29 +0000)]
Cleanup comments and argument types related to my previous replaceCongruentPhis checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147709
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 7 Jan 2012 01:22:23 +0000 (01:22 +0000)]
Eliminate an error check that may not work with all asm syntax variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147708
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jan 2012 01:12:09 +0000 (01:12 +0000)]
Extended replaceCongruentPhis to handle mixed phi types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147707
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 7 Jan 2012 01:02:09 +0000 (01:02 +0000)]
Make the 'x' constraint work for AVX registers as well.
Fixes rdar://
10614894
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147704
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jan 2012 00:54:28 +0000 (00:54 +0000)]
Missing raw_ostream.h breaks MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147703
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jan 2012 00:29:20 +0000 (00:29 +0000)]
comment typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147701
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jan 2012 00:27:31 +0000 (00:27 +0000)]
Expose isNonConstantNegative to users of ScalarEvolution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147700
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 Jan 2012 23:45:47 +0000 (23:45 +0000)]
Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147696
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 6 Jan 2012 23:03:37 +0000 (23:03 +0000)]
Add a comment and ensure that anyone else looking at this code doesn't start
to bleed from the eyes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147695
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 6 Jan 2012 23:03:34 +0000 (23:03 +0000)]
Use const vector references instead of a vector copy. Spotted by Devang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147694
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 6 Jan 2012 23:03:27 +0000 (23:03 +0000)]
Use -> instead of (*iter).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147693
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 6 Jan 2012 22:19:37 +0000 (22:19 +0000)]
Enable aligned NEON spilling by default.
Experiments show this to be a small speedup for modern ARM cores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147689
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 6 Jan 2012 21:41:55 +0000 (21:41 +0000)]
Put all IVUsers in the processed set. Allow querying IVUsers with isIVUserOrOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147686
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 6 Jan 2012 21:40:15 +0000 (21:40 +0000)]
Abort AdjustBBOffsetsAfter early when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147685
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 6 Jan 2012 21:39:06 +0000 (21:39 +0000)]
lit/lit.TestRunner: Add an extra_substitutions argument for executeShTest --
useful for test suites which want to piggyback onto the "shtest" format style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147684
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 6 Jan 2012 21:23:43 +0000 (21:23 +0000)]
SCEVExpander: hoistStep should check strict dominance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147683
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 6 Jan 2012 21:16:27 +0000 (21:16 +0000)]
Tracing to help investigate issues with SjLj spill code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147682
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 Jan 2012 20:11:59 +0000 (20:11 +0000)]
Initializing to false makes better sense. Thanks, David.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147679
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 Jan 2012 20:02:49 +0000 (20:02 +0000)]
Fix uninitialized variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147676
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 Jan 2012 19:59:58 +0000 (19:59 +0000)]
Fix uninitialized variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147675
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 6 Jan 2012 19:35:04 +0000 (19:35 +0000)]
Fix a leak I noticed while reviewing the accelerator table changes. Passes
lldb testsuite.
rdar://
10652330
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147673
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 6 Jan 2012 18:09:21 +0000 (18:09 +0000)]
[asan] cleanup: remove the SIGILL-related code (compiler part)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147667
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 6 Jan 2012 07:49:17 +0000 (07:49 +0000)]
Fix typo in string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147654
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 6 Jan 2012 04:35:23 +0000 (04:35 +0000)]
As part of the ongoing work in finalizing the accelerator tables, extend
the debug type accelerator tables to contain the tag and a flag
stating whether or not a compound type is a complete type.
rdar://
10652330
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147651
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 5 Jan 2012 23:58:56 +0000 (23:58 +0000)]
Fix SpeculativelyExecuteBB to either speculate all or none of the phis
present in the bottom of the CFG triangle, as the transformation isn't
ever valuable if the branch can't be eliminated.
Also, unify some heuristics between SimplifyCFG's multiple
if-converters, for consistency.
This fixes rdar://
10627242.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147630
91177308-0d34-0410-b5e6-
96231b3b80d8