Chris Lattner
c4e03b7ac7
remove redundant foward declaration. This function is already in
...
Analysis/Passes.h
llvm-svn: 86765
2009-11-11 00:21:21 +00:00
Devang Patel
4450f26621
While creating DbgScopes, do not forget parent scope.
...
llvm-svn: 86763
2009-11-11 00:18:40 +00:00
Evan Cheng
12f146d8f7
Block terminator may be a switch.
...
llvm-svn: 86761
2009-11-11 00:00:21 +00:00
Chris Lattner
3835610902
jump threading does everything that condprop does any more. This passes
...
bootstrap on darwin i386.
llvm-svn: 86758
2009-11-10 23:54:10 +00:00
Chris Lattner
0169fd7c62
add a note
...
llvm-svn: 86756
2009-11-10 23:47:45 +00:00
Chris Lattner
8ff26038ef
I did this a week or two ago
...
llvm-svn: 86754
2009-11-10 23:40:49 +00:00
Devang Patel
cdb7d44d6d
Ignore variable if scope info is not available.
...
llvm-svn: 86753
2009-11-10 23:20:04 +00:00
Bill Wendling
47739b20fd
Test this on Darwin only.
...
llvm-svn: 86752
2009-11-10 23:18:33 +00:00
Dale Johannesen
6f7d5b22bb
Emit correct code when making a ConstantPool entry for a vector
...
constant whose component type is not a legal type for the target.
(If the target ConstantPool cannot handle this type either, it has
an opportunity to merge elements. In practice any target with
8-bit bytes must support i8 *as data*). 7320806 (partial).
llvm-svn: 86751
2009-11-10 23:16:41 +00:00
Devang Patel
f6eeaebd76
Implement support to debug inlined functions.
...
llvm-svn: 86748
2009-11-10 23:06:00 +00:00
Chris Lattner
a5056f5b2b
in -dot-cfg and -dot-cfg-only, when rendering switch instructions,
...
put the switch value in the successor boxes like we put T/F for branches.
llvm-svn: 86747
2009-11-10 22:56:15 +00:00
Chris Lattner
9518fbb54e
implement a TODO by teaching jump threading about "xor x, 1".
...
llvm-svn: 86739
2009-11-10 22:39:16 +00:00
Chris Lattner
852d6d64ff
move some generally useful functions out of jump threading
...
into libanalysis and transformutils.
llvm-svn: 86735
2009-11-10 22:26:15 +00:00
Dan Gohman
de8d418ac3
Don't mark conditional branch instructions as control barriers.
...
llvm-svn: 86732
2009-11-10 22:16:57 +00:00
Bill Wendling
fc9469f311
Modify how the prologue encoded the "move" information for the FDE. GCC
...
generates a sequence similar to this:
__Z4funci:
LFB2:
mflr r0
LCFI0:
stmw r30,-8(r1)
LCFI1:
stw r0,8(r1)
LCFI2:
stwu r1,-80(r1)
LCFI3:
mr r30,r1
LCFI4:
where LCFI3 and LCFI4 are used by the FDE to indicate what the FP, LR, and other
things are. We generated something more like this:
Leh_func_begin1:
mflr r0
stw r31, 20(r1)
stw r0, 8(r1)
Llabel1:
stwu r1, -80(r1)
Llabel2:
mr r31, r1
Note that we are missing the "mr" instruction. This patch makes it more like the
GCC output.
llvm-svn: 86729
2009-11-10 22:14:04 +00:00
Devang Patel
42c1d17dd1
Process InlinedAt location info.
...
Update InsertDeclare to return newly inserted llvm.dbg.declare intrinsic.
llvm-svn: 86727
2009-11-10 22:05:35 +00:00
Chris Lattner
02e2cee7dc
fix a crash in SCCP handling extractvalue of an array, pointed out and
...
tracked down by Stephan Reiter!
llvm-svn: 86726
2009-11-10 22:02:09 +00:00
Jakob Stoklund Olesen
4453dc976b
Teach PHIElimination to split critical edges when -split-phi-edges is enabled.
...
Critical edges leading to a PHI node are split when the PHI source variable is
live out from the predecessor block. This help the coalescer eliminate more
PHI joins.
llvm-svn: 86725
2009-11-10 22:01:05 +00:00
Jakob Stoklund Olesen
19f235e455
Refactoring: Extract method PHIElimination::isLiveOut().
...
Clean up some whitespace.
No functional changes.
llvm-svn: 86724
2009-11-10 22:00:56 +00:00
Chris Lattner
40b15f220d
improve comment.
...
llvm-svn: 86723
2009-11-10 21:45:09 +00:00
Chris Lattner
80e7e5a429
Make jump threading eliminate blocks that just contain phi nodes,
...
debug intrinsics, and an unconditional branch when possible. This
reuses the TryToSimplifyUncondBranchFromEmptyBlock function split
out of simplifycfg.
llvm-svn: 86722
2009-11-10 21:40:01 +00:00
Evan Cheng
87fe40b32d
Generalize lsr code that optimize loop to count down towards zero.
...
llvm-svn: 86715
2009-11-10 21:14:05 +00:00
Dan Gohman
1f31f6e265
Optimize test more.
...
llvm-svn: 86714
2009-11-10 21:02:18 +00:00
Victor Hernandez
bb336a1987
make this handle redefinition of malloc function with different prototype correctly
...
llvm-svn: 86712
2009-11-10 19:53:28 +00:00
Evan Cheng
e034867587
Change Thumb1 address mode printing, instead of
...
[r0, #2 * 4]
Now
[r0, #8 ]
This makes Thumb2 assembly more uniform and frankly the scale doesn't add much.
llvm-svn: 86707
2009-11-10 19:48:13 +00:00
Evan Cheng
e6548f4106
Add a comment.
...
llvm-svn: 86706
2009-11-10 19:44:56 +00:00
Duncan Sands
23344095de
Add defensive break.
...
llvm-svn: 86705
2009-11-10 19:36:40 +00:00
Daniel Dunbar
b9415c7d9a
Add a monstrous hack to improve X86ISelDAGToDAG compile time.
...
- Force NDEBUG on in any Release build. This drops the compile time to ~100s
from ~600s, in Release mode.
- This may just be a temporary workaround, I don't know the true nature of the
gcc-4.2 compile time performance problem.
llvm-svn: 86695
2009-11-10 18:24:37 +00:00
Duncan Sands
8d4cde2b55
Fix obvious typo.
...
llvm-svn: 86694
2009-11-10 18:21:37 +00:00
Chris Lattner
b8f79ba10e
clarify logic.
...
llvm-svn: 86689
2009-11-10 17:00:47 +00:00
Douglas Gregor
66df54f92c
CMake: Add Darwin-specific linker flags for building loadable modules
...
llvm-svn: 86684
2009-11-10 15:30:33 +00:00
Duncan Sands
1925d3a1d1
Teach DSE to eliminate useless trampolines.
...
llvm-svn: 86683
2009-11-10 13:49:50 +00:00
Duncan Sands
04e0c95248
Add brackets to make gcc-4.4 happy.
...
llvm-svn: 86681
2009-11-10 09:32:10 +00:00
Duncan Sands
dca0c28452
Codegen support for the llvm.invariant/lifetime.start/end intrinsics:
...
just throw them away.
llvm-svn: 86678
2009-11-10 09:08:09 +00:00
Victor Hernandez
fcc77b1c02
Update computeArraySize() to use ComputeMultiple() to determine the array size associated with a malloc; also extend PerformHeapAllocSRoA() to check if the optimized malloc's arg had its highest bit set, so that it is safe for ComputeMultiple() to look through sext instructions while determining the optimized malloc's array size
...
llvm-svn: 86676
2009-11-10 08:32:25 +00:00
Victor Hernandez
4744488e8d
Add ComputeMultiple() analysis function that recursively determines if a Value V is a multiple of unsigned Base
...
llvm-svn: 86675
2009-11-10 08:28:35 +00:00
Chris Lattner
17529ac0c5
optimize test
...
llvm-svn: 86672
2009-11-10 07:44:36 +00:00
Chris Lattner
1559bedcc7
unify the code that determines whether it is a good idea to change the type
...
of a computation. This fixes some infinite loops when dealing with TD that
has no native types.
llvm-svn: 86670
2009-11-10 07:23:37 +00:00
Nick Lewycky
5b3def9b86
Simplify.
...
llvm-svn: 86668
2009-11-10 07:00:43 +00:00
Nick Lewycky
9027147fb1
Reapply r86359, "Teach dead store elimination that certain intrinsics write to
...
memory just like a store" with bug fixed (partial-overwrite.ll is the
regression test).
llvm-svn: 86667
2009-11-10 06:46:40 +00:00
Chris Lattner
cbd18fc93d
refactor TryToSimplifyUncondBranchFromEmptyBlock out of SimplifyCFG.
...
llvm-svn: 86666
2009-11-10 05:59:26 +00:00
Oscar Fuentes
bbc1067001
CMake: Support for building llvm loadable modules.
...
llvm-svn: 86656
2009-11-10 02:45:37 +00:00
Daniel Dunbar
5a5b223c04
lit: Start documentation testing architecture.
...
llvm-svn: 86655
2009-11-10 02:41:27 +00:00
Daniel Dunbar
8acffa7dd5
lit: Add ExampleTests, for testing lit and demonstrating test suite features.
...
llvm-svn: 86654
2009-11-10 02:41:17 +00:00
Daniel Dunbar
4010a04034
lit: Fix bug in --show-suites which accidentally override the list of tests.
...
llvm-svn: 86653
2009-11-10 02:40:21 +00:00
Bruno Cardoso Lopes
05671ea10a
Fix PR5445
...
llvm-svn: 86651
2009-11-10 02:35:13 +00:00
Chris Lattner
ab799110c6
I misread the parens, not so redundant after all.
...
llvm-svn: 86648
2009-11-10 02:04:54 +00:00
Chris Lattner
38c44ea6b0
make jump threading recursively simplify expressions instead of doing it
...
just one level deep. On the testcase we go from getting this:
F1: ; preds = %T2
%F = and i1 true, %cond ; <i1> [#uses=1]
br i1 %F, label %X, label %Y
to a fully threaded:
F1: ; preds = %T2
br label %Y
This changes gets us to the point where we're forming (too many) switch
instructions on doug's strswitch testcase.
llvm-svn: 86646
2009-11-10 01:57:31 +00:00
Chris Lattner
ee89d5a4d0
remove some redundant parens.
...
llvm-svn: 86645
2009-11-10 01:56:04 +00:00
Oscar Fuentes
b8d7793628
CMake: Remove unnecessary `unset' which was not supported by old cmake
...
releases.
llvm-svn: 86644
2009-11-10 01:45:05 +00:00
Dan Gohman
42cc1806d8
Remove an unused variable.
...
llvm-svn: 86642
2009-11-10 01:37:57 +00:00
Dan Gohman
48079d4bf5
Minor code simplification.
...
llvm-svn: 86641
2009-11-10 01:36:20 +00:00
Dan Gohman
0d401124d1
Trim a bunch of unneeded code from this testcase.
...
llvm-svn: 86640
2009-11-10 01:33:08 +00:00
Chris Lattner
be11db6894
don't invalidate PN, rewrite of this code is in progress anyway.
...
llvm-svn: 86639
2009-11-10 01:19:06 +00:00
Chris Lattner
fb7f87d5a3
add a new SimplifyInstruction API, which is like ConstantFoldInstruction,
...
except that the result may not be a constant. Switch jump threading to
use it so that it gets things like (X & 0) -> 0, which occur when phi preds
are deleted and the remaining phi pred was a zero.
llvm-svn: 86637
2009-11-10 01:08:51 +00:00
Jeffrey Yasskin
b40d3f76a0
Fix DenseMap iterator constness.
...
This patch forbids implicit conversion of DenseMap::const_iterator to
DenseMap::iterator which was possible because DenseMapIterator inherited
(publicly) from DenseMapConstIterator. Conversion the other way around is now
allowed as one may expect.
The template DenseMapConstIterator is removed and the template parameter
IsConst which specifies whether the iterator is constant is added to
DenseMapIterator.
Actually IsConst parameter is not necessary since the constness can be
determined from KeyT but this is not relevant to the fix and can be addressed
later.
Patch by Victor Zverovich!
llvm-svn: 86636
2009-11-10 01:02:17 +00:00
Chris Lattner
a71e9d61be
factor simplification logic for AND and OR out to InstSimplify from instcombine.
...
llvm-svn: 86635
2009-11-10 00:55:12 +00:00
David Goodwin
0d412c2528
Fixed to address code review. No functional changes.
...
llvm-svn: 86634
2009-11-10 00:48:55 +00:00
Daniel Dunbar
124fc5e252
Fix MemoryBuffer::getSTDIN to *not* return null if stdin is empty, this is a lame API.
...
Also, Stringrefify some more MemoryBuffer functions, and add two performance FIXMEs.
llvm-svn: 86630
2009-11-10 00:43:58 +00:00
David Goodwin
cf89db135e
Allow targets to specify register classes whose member registers should not be renamed to break anti-dependencies.
...
llvm-svn: 86628
2009-11-10 00:15:47 +00:00
Chris Lattner
ccfdceb22c
pull a bunch of logic out of instcombine into instsimplify for compare
...
simplification, this handles the foldable fcmp x,x cases among many others.
llvm-svn: 86627
2009-11-09 23:55:12 +00:00
Dan Gohman
2ac504729b
Pass the (optional) TargetData object to ConstantFoldInstOperands
...
and ConstantFoldCompareInstOperands.
llvm-svn: 86626
2009-11-09 23:34:17 +00:00
Chris Lattner
beadc6e8c7
inline a simple function.
...
llvm-svn: 86625
2009-11-09 23:31:49 +00:00
Chris Lattner
c1f19071f8
rename SimplifyCompare -> SimplifyCmpInst and split it into
...
Simplify[IF]Cmp pieces. Add some predicates to CmpInst to
determine whether a predicate is fp or int.
llvm-svn: 86624
2009-11-09 23:28:39 +00:00
Jim Grosbach
2524b04d0e
Now that the default is 'enabled,' a separate command line option for ARM is
...
not necessary.
llvm-svn: 86621
2009-11-09 23:11:45 +00:00
Mike Stump
f8a74fc4a5
Add testcase for recent checkin.
...
llvm-svn: 86620
2009-11-09 23:10:49 +00:00
Chris Lattner
cdfb80de16
fix ConstantFoldCompareInstOperands to take the LHS/RHS as
...
individual operands instead of taking a temporary array
llvm-svn: 86619
2009-11-09 23:06:58 +00:00
Daniel Dunbar
3f94a132dd
Add StringSwitch::Cases overloads, for matching multiple strings to a single
...
value.
llvm-svn: 86618
2009-11-09 23:05:44 +00:00
Chris Lattner
800aad3dda
use instructionsimplify instead of a weak clone of ad-hoc folding stuff.
...
llvm-svn: 86616
2009-11-09 23:00:14 +00:00
Jim Grosbach
47e3bcf180
Update test
...
llvm-svn: 86614
2009-11-09 22:59:01 +00:00
Chris Lattner
084a1b5581
stub out a new libanalysis "instruction simplify" interface that
...
takes decimated instructions and applies identities to them. This
is pretty minimal at this point, but I plan to pull some instcombine
logic out into these and similar routines.
llvm-svn: 86613
2009-11-09 22:57:59 +00:00
Jeffrey Yasskin
8483f12ac5
Remove dlsym stubs, with Nate Begeman's permission.
...
llvm-svn: 86606
2009-11-09 22:34:19 +00:00
Jim Grosbach
1218b804fb
Enable dynamic stack realignment by default.
...
llvm-svn: 86604
2009-11-09 22:32:40 +00:00
Chris Lattner
2978ca7b79
stub out a new form of BasicBlock::RemovePredecessorAndSimplify which
...
simplifies instruction users of PHIs when the phi is eliminated. This
will be moved to transforms/utils after some other refactoring.
llvm-svn: 86603
2009-11-09 22:32:36 +00:00
Jim Grosbach
55d3480769
Set dynamic stack realignment to real values.
...
llvm-svn: 86602
2009-11-09 22:32:03 +00:00
Dan Gohman
a951526510
Remove an unneeded #include.
...
llvm-svn: 86601
2009-11-09 22:28:30 +00:00
Mike Stump
f04c4cdb27
Fix for 64-bit builds.
...
llvm-svn: 86600
2009-11-09 22:28:21 +00:00
Bill Wendling
787997f77e
Similar to r86588, but for Darwin this time.
...
llvm-svn: 86592
2009-11-09 21:45:26 +00:00
Bill Wendling
7307bff420
The jump table was being generated before the end label for exception handling
...
was generated. This caused code like this:
## The asm code for the function
.section __TEXT,__const
.align 2
lJTI11_0:
LJTI11_0:
.long LBB11_16
.long LBB11_4
.long LBB11_5
.long LBB11_6
.long LBB11_7
.long LBB11_8
.long LBB11_9
.long LBB11_10
.long LBB11_11
.long LBB11_12
.long LBB11_13
.long LBB11_14
Leh_func_end11: ## <---now in the wrong section!
The `Leh_func_end11' would then end up in the wrong section, causing the
resulting EH frame information to be wrong:
__ZL11CheckRightsjPKcbRbRP6NSData.eh:
.set Lset500eh,Leh_frame_end11-Leh_frame_begin11
.long Lset500eh ; Length of Frame Information Entry
Leh_frame_begin11:
.long Leh_frame_begin11-Leh_frame_common
.long Leh_func_begin11-.
.set Lset501eh,Leh_func_end11-Leh_func_begin11
.long Lset501eh ; FDE address range
`Lset501eh' is now something huge instead of the real value.
The X86 back-end generates the jump table after the EH information is
emitted. Do the same here.
llvm-svn: 86588
2009-11-09 21:20:14 +00:00
Dan Gohman
2745d19287
Print "..." instead of all the uninteresting register clobbers on call
...
instructions. This makes CodeGen dumps significantly less noisy.
Example before:
BL <ga:@bar>, %R0<imp-def>, %R1<imp-def,dead>, %R2<imp-def,dead>, %R3<imp-def,dead>, %R12<imp-def,dead>, %LR<imp-def,dead>, %D0<imp-def,dead>, %D1<imp-def,dead>, %D2<imp-def,dead>, %D3<imp-def,dead>, %D4<imp-def,dead>, %D5<imp-def,dead>, %D6<imp-def,dead>, %D7<imp-def,dead>, %D16<imp-def,dead>, %D17<imp-def,dead>, %D18<imp-def,dead>, %D19<imp-def,dead>, %D20<imp-def,dead>, %D21<imp-def,dead>, %D22<imp-def,dead>, %D23<imp-def,dead>, %D24<imp-def,dead>, %D25<imp-def,dead>, %D26<imp-def,dead>, %D27<imp-def,dead>, %D28<imp-def,dead>, %D29<imp-def,dead>, %D30<imp-def,dead>, %D31<imp-def,dead>, %CPSR<imp-def,dead>, %FPSCR<imp-def,dead>
Same example after:
BL <ga:@bar>, %R0<imp-def>, %R1<imp-def,dead>, %LR<imp-def,dead>, %CPSR<imp-def,dead>, ...
llvm-svn: 86583
2009-11-09 19:38:45 +00:00
Dan Gohman
ccb4584edd
Default-addressspace null pointers don't alias anything. This allows
...
GVN to be more aggressive. Patch by Hans Wennborg! (with a comment added by me)
llvm-svn: 86582
2009-11-09 19:29:11 +00:00
David Goodwin
d2f9c044c0
Fix dependencies added to model memory aliasing for post-RA scheduling. The dependencies were overly conservative for memory access that are known not to alias.
...
llvm-svn: 86580
2009-11-09 19:22:17 +00:00
Dan Gohman
c74bc28297
The inbounds keyword isn't relevant to overindexing of
...
static array types. Thanks to Duncan for pointing this out!
llvm-svn: 86576
2009-11-09 19:01:53 +00:00
Dan Gohman
f324dd65f8
Fix a comment in a typo that Duncan noticed.
...
llvm-svn: 86575
2009-11-09 18:59:22 +00:00
Dan Gohman
66c4d61010
Remove the "special case" for zero-length arrays, and rephrase this
...
paragraph to be more precise.
llvm-svn: 86572
2009-11-09 18:40:39 +00:00
Dan Gohman
c146c78060
Generalize LCSSA to handle loops with exits with predecessors outside
...
the loop. This is needed because with indirectbr it may not be possible
for LoopSimplify to guarantee that all loop exit predecessors are
inside the loop. This fixes PR5437.
LCCSA no longer actually requires LoopSimplify form, but for now it
must still have the dependency because the PassManager doesn't know
how to schedule LoopSimplify otherwise.
llvm-svn: 86569
2009-11-09 18:28:24 +00:00
Dan Gohman
85b5bf833e
Fix an 80-column violation.
...
llvm-svn: 86567
2009-11-09 18:20:38 +00:00
Dan Gohman
5196e415ad
Minor tidiness fixes.
...
llvm-svn: 86565
2009-11-09 18:19:43 +00:00
Dan Gohman
6f67f8902a
Constify MachineFunctionAnalysis' TargetMachine reference.
...
llvm-svn: 86564
2009-11-09 18:18:49 +00:00
Dan Gohman
968ecd9888
Fix a comment.
...
llvm-svn: 86558
2009-11-09 17:06:51 +00:00
Dan Gohman
1c311a8cd7
Suppress implicit copy ctor and copy assignment for MachineFunction.
...
llvm-svn: 86557
2009-11-09 17:06:23 +00:00
Daniel Dunbar
3488819495
Use ',' separation in XFAILs, lit doesn't evaluate them as regexs (easy to add,
...
but might as well use the more standard syntax).
llvm-svn: 86553
2009-11-09 16:38:15 +00:00
Nuno Lopes
640eb70bee
add zextOrTrunc and sextOrTrunc methods, that are similar to the ones in APInt
...
llvm-svn: 86549
2009-11-09 15:36:28 +00:00
Jim Grosbach
ad95414c26
Work around assembler not recognizing #0.0 form immediate for vmcp
...
llvm-svn: 86548
2009-11-09 15:27:51 +00:00
Oscar Fuentes
de8f431edf
CMake: Detect gv, circo, twopi, neato, fdo, dot and dotty.
...
Patch by Arnaud Allard de Grandmaison!
llvm-svn: 86547
2009-11-09 15:26:40 +00:00
Xerxes Ranby
7c16a89ebf
Make lib/Support/Debug.cpp SetCurrentDebugType implementation part of llvm namespace to match function declaration in Debug.h.
...
llvm-svn: 86544
2009-11-09 14:50:34 +00:00
Bruno Cardoso Lopes
8dd7c54a42
Fix PR5149.
...
http://llvm.org/bugs/show_bug.cgi?id=5149
llvm-svn: 86543
2009-11-09 14:27:49 +00:00
Chris Lattner
2156c22b3c
make this handle redefinition of malloc with different prototype correctly.
...
llvm-svn: 86525
2009-11-09 07:12:01 +00:00
Chris Lattner
39c07b2eef
if a 'with overflow' intrinsic just has the normal result used, simplify
...
it to a normal binop. Patch by Alastair Lynn, testcase by me.
llvm-svn: 86524
2009-11-09 07:07:56 +00:00
Evan Cheng
ad7c6124e7
Hide a couple of options.
...
llvm-svn: 86522
2009-11-09 06:49:37 +00:00
Evan Cheng
ce29331e10
80 col.
...
llvm-svn: 86521
2009-11-09 06:49:22 +00:00
Chris Lattner
feeabde753
fix PR5104: when printing a single character, return the result of
...
putchar in case there is an error.
llvm-svn: 86515
2009-11-09 04:57:04 +00:00
Chris Lattner
077166e3fa
fix some bogus asserts, PR5049
...
llvm-svn: 86514
2009-11-09 04:47:27 +00:00
Chris Lattner
d1c4e75750
random tidy
...
llvm-svn: 86511
2009-11-09 04:18:23 +00:00
Chris Lattner
275dd8b0af
remove a redundant printout, LinkInArchive prints this as well.
...
llvm-svn: 86510
2009-11-09 04:15:28 +00:00
Chris Lattner
0685be3441
enhance PHI slicing to handle the case when a slicable PHI is begin
...
used by a chain of other PHIs.
llvm-svn: 86503
2009-11-09 01:38:00 +00:00
Owen Anderson
939ea35244
Small cleanups.
...
llvm-svn: 86499
2009-11-09 00:48:15 +00:00
Owen Anderson
73fc616838
Revert my previous patch to ABCD and fix things the right way. There are two problems addressed
...
here:
1) We need to avoid processing sigma nodes as phi nodes for constraint generation.
2) We need to generate constraints for comparisons against constants properly.
This includes our first working ABCD test!
llvm-svn: 86498
2009-11-09 00:44:44 +00:00
Chris Lattner
ea465e221e
comment typos pointed out by Duncan
...
llvm-svn: 86497
2009-11-09 00:41:49 +00:00
Jim Grosbach
d7cf55cd0e
Use Unified Assembly Syntax for the ARM backend.
...
llvm-svn: 86494
2009-11-09 00:11:35 +00:00
Owen Anderson
058088f219
Fix an issue where the ordering of blocks within a function could lead to different constraint
...
graphs being produced. The cause was that we were incorrectly marking sigma instructions as
processed after handling the sigma-specific constraints for them, potentially neglecting to
process them as normal instructions as well.
Unfortunately, the testcase that inspired this still doesn't work because of a bug in the solver,
which is next on the list to debug.
llvm-svn: 86486
2009-11-08 22:36:55 +00:00
Daniel Dunbar
2edf3a4896
Add a 'zkill' script, which is more-or-less a fancy (although not necessarily
...
very robust) version of killall. Because I like making shiny new wheels out of
spare parts.
For use by buildbots when people insist on making cc1 infinite loop. :)
llvm-svn: 86484
2009-11-08 21:51:53 +00:00
Chris Lattner
2299d4b6d8
Teach an instcombine to not pull trunc instructions through PHI nodes
...
when both the source and dest are illegal types, since it would cause
the phi to grow (for example, we shouldn't transform test14b's phi to
a phi on i320). This fixes an infinite loop on i686 bootstrap with
phi slicing turned on, so turn it back on.
llvm-svn: 86483
2009-11-08 21:20:06 +00:00
Duncan Sands
fec62f0ef5
Revert commit 81144, and add a comment. It caused bugpoint timeouts
...
not to work any more on linux.
llvm-svn: 86481
2009-11-08 20:55:48 +00:00
Chris Lattner
a837e4db6b
reapply r8644[3-5] with only the scary part
...
(SliceUpIllegalIntegerPHI) disabled.
llvm-svn: 86480
2009-11-08 19:23:30 +00:00
Daniel Dunbar
4c41373c56
Speculatively revert r8644[3-5], they seem to be leading to infinite loops in
...
llvm-gcc bootstrap.
llvm-svn: 86478
2009-11-08 17:52:47 +00:00
Anton Korobeynikov
700c4ab3f9
Add and-not (bic) patterns. Based heavily on patch by Brian Lucas!
...
llvm-svn: 86471
2009-11-08 15:33:12 +00:00
Anton Korobeynikov
e92c508764
Move OR patterns upper to all logical stuff. No functionality change.
...
llvm-svn: 86470
2009-11-08 15:32:44 +00:00
Anton Korobeynikov
a404d61c8e
Some nice peephole patterns. Based on patch by Brian Lucas!
...
llvm-svn: 86469
2009-11-08 15:32:28 +00:00
Anton Korobeynikov
fd9a893cab
Print tab before operand of jcc
...
llvm-svn: 86468
2009-11-08 15:32:11 +00:00
Anton Korobeynikov
4ca8d3a6a6
Fix invalid operand updates & implement post-inc memory operands
...
llvm-svn: 86466
2009-11-08 14:27:38 +00:00
Anton Korobeynikov
eb8692cff9
Throw an error when stack realignment stuff fails instead of silent
...
code miscompilation
llvm-svn: 86463
2009-11-08 12:58:40 +00:00
Anton Korobeynikov
dc2beaa05e
It is invalid to infer the value type from the result #0 of the node
...
since the instruction might use the other result of different type.
llvm-svn: 86462
2009-11-08 12:14:54 +00:00
Daniel Dunbar
dc3fcfc0d0
Remove ByteswapSCANFResults, it is dead.
...
llvm-svn: 86458
2009-11-08 09:46:57 +00:00
Daniel Dunbar
e34c1d8b44
NNT: Remove DejaGNU test from NewNightlyTest reports, this aspect of testing is
...
handled by buildbots now.
llvm-svn: 86454
2009-11-08 09:34:14 +00:00
Daniel Dunbar
e9bbafe1eb
Two small fixes for site.exp for cmake.
...
llvm-svn: 86453
2009-11-08 09:29:52 +00:00
Daniel Dunbar
84bc8c3058
Derive the right paths to use during testing instead of passing it in via make.
...
Also, fix a few other details of the cmake test target and rename it to
'check'. CMake tests now work for the most part, but there are a handful of
failures left due to missing site.exp bits.
llvm-svn: 86452
2009-11-08 09:08:00 +00:00
Daniel Dunbar
0ab04bc27e
Switch to using 'lit.site.cfg.in' for the site config template for Unit tests,
...
and generate it for CMake builds as well.
llvm-svn: 86451
2009-11-08 09:07:51 +00:00
Daniel Dunbar
bf7afbaaaf
Cleanup some unused RUN lines.
...
llvm-svn: 86450
2009-11-08 09:07:42 +00:00
Daniel Dunbar
42c19ee140
lit: Hardcode whence seek value, os.SEEK_END isn't always available.
...
llvm-svn: 86449
2009-11-08 09:07:33 +00:00
Daniel Dunbar
3d861af58a
lit: Warn when a test suite contains no tests.
...
llvm-svn: 86448
2009-11-08 09:07:26 +00:00
Daniel Dunbar
6ff773bd21
lit: Drop require_and_and support.
...
llvm-svn: 86447
2009-11-08 09:07:13 +00:00
Lang Hames
09eeeaf08b
Moved some ManagedStatics out of the SlotIndexes header.
...
llvm-svn: 86446
2009-11-08 08:49:59 +00:00
Chris Lattner
99db7963b4
another more interesting test.
...
llvm-svn: 86445
2009-11-08 08:36:40 +00:00
Chris Lattner
7c8b29ef61
feature test for the new transformation in r86443
...
llvm-svn: 86444
2009-11-08 08:30:58 +00:00
Chris Lattner
c7a450b5b2
teach a couple of instcombine transformations involving PHIs to
...
not turn a PHI in a legal type into a PHI of an illegal type, and
add a new optimization that breaks up insane integer PHI nodes into
small pieces (PR3451).
llvm-svn: 86443
2009-11-08 08:21:13 +00:00
Nick Lewycky
e0e20c2b90
We don't need to byteswap, the interpreter assumes the program is running
...
native anyways. This fixes a crash using %d and similar in a scanf statement.
llvm-svn: 86440
2009-11-08 05:45:04 +00:00
Daniel Dunbar
80ec848944
lit: Workaround a Win32/subprocess bug when appending.
...
llvm-svn: 86437
2009-11-08 03:43:06 +00:00
Daniel Dunbar
107a38dafc
lit: Preserve the PATHEXT variable when running subcommands, this is important on Win32
...
llvm-svn: 86436
2009-11-08 03:35:19 +00:00
Chris Lattner
295f266370
Make TargetData::getStringRepresentation spit out native integer types,
...
this gives llvm-gcc generated modules the right data.
llvm-svn: 86435
2009-11-08 02:32:01 +00:00
Nick Lewycky
1866ee143d
Remove test. Execution tests are slow and generally not worth it.
...
llvm-svn: 86434
2009-11-08 02:23:15 +00:00
Nick Lewycky
fcd45392ad
Fix run line.
...
llvm-svn: 86429
2009-11-08 01:04:45 +00:00
Nick Lewycky
439fb6fb0e
Fix the interpreter to not crash due to zeroext/signext
...
llvm-svn: 86428
2009-11-08 00:45:29 +00:00
Daniel Dunbar
3908a4047e
Prevent warning spew about -fPIC when using CMake generated Xcode project files.
...
llvm-svn: 86427
2009-11-08 00:34:22 +00:00
Jim Grosbach
a15c3b7124
Use aligned load/store instructions for spilling Q registers when we know the stack slot is 128 bit aligned
...
llvm-svn: 86425
2009-11-08 00:27:19 +00:00
Evan Cheng
fe864425cb
Refactor code.
...
llvm-svn: 86423
2009-11-08 00:15:23 +00:00
Daniel Dunbar
39a6c62b9d
Fix CMake reporting of target triple.
...
llvm-svn: 86419
2009-11-07 23:52:27 +00:00
Daniel Dunbar
c0fd8a4360
Stop running get_target_triple more than we need to.
...
llvm-svn: 86418
2009-11-07 23:52:20 +00:00
Daniel Dunbar
ec9491bda3
Fix MSVC warning ( | with bool and unsigned int).
...
llvm-svn: 86417
2009-11-07 23:51:55 +00:00
Daniel Dunbar
cdfb315f16
Fix class -> struct tag.
...
llvm-svn: 86416
2009-11-07 23:21:30 +00:00
Nate Begeman
3a313df69b
x86 vector shuffle cleanup/fixes:
...
1. rename the movhp patfrag to movlhps, since thats what it actually matches
2. eliminate the bogus movhps load and store patterns, they were incorrect. The load transforms are already handled (correctly) by shufps/unpack.
3. revert a recent test change to its correct form.
llvm-svn: 86415
2009-11-07 23:17:15 +00:00
Jim Grosbach
4e9f379554
80-column cleanup of file header comments
...
llvm-svn: 86408
2009-11-07 22:00:39 +00:00
Jim Grosbach
d1d002a6fe
Support alignment specifier for NEON vld/vst instructions
...
llvm-svn: 86404
2009-11-07 21:25:39 +00:00
Nick Lewycky
b9397262b7
Improve tail call elimination to handle the switch statement.
...
llvm-svn: 86403
2009-11-07 21:10:15 +00:00
Evan Cheng
8b5278a466
t2ldrpci_pic can be used for blockaddress as well.
...
llvm-svn: 86400
2009-11-07 19:40:04 +00:00
Chris Lattner
63ffdc748a
temporarily remove these tests, as they are breaking in the buildbot,
...
Eric, please investigate.
llvm-svn: 86399
2009-11-07 19:13:17 +00:00
Chris Lattner
c77d24b792
make instcombine only rewrite a chain of computation
...
(eliminating some extends) if the new type of the
computation is legal or if both the source and dest
are illegal. This prevents instcombine from changing big
chains of computation into i64 on 32-bit targets for
example.
llvm-svn: 86398
2009-11-07 19:11:46 +00:00
Chris Lattner
8714348afd
indicate what the native integer types for the target are.
...
Please verify.
llvm-svn: 86397
2009-11-07 19:07:32 +00:00
Chris Lattner
6fafd70c1e
all targets should be required to declare legal integer types. My plan to
...
make it optional doesn't work out. If you don't want to specify this, don't
specify a TD string at all.
llvm-svn: 86394
2009-11-07 18:53:00 +00:00
Chris Lattner
acc83d10bd
remove empty files.
...
llvm-svn: 86392
2009-11-07 18:03:32 +00:00
Chris Lattner
431000da21
Revert r86359, it is breaking the self host on the
...
llvm-gcc-i386-darwin9 build bot.
llvm-svn: 86391
2009-11-07 17:59:32 +00:00
Anton Korobeynikov
cf84ab5043
First try of the post-inc operands handling... Not fully worked, though :(
...
llvm-svn: 86386
2009-11-07 17:15:25 +00:00
Anton Korobeynikov
d3c8319f48
Add some dummy support for post-incremented loads
...
llvm-svn: 86385
2009-11-07 17:15:06 +00:00
Anton Korobeynikov
f93bb39b03
Add 8 bit libcalls and make use of them for msp430
...
llvm-svn: 86384
2009-11-07 17:14:39 +00:00
Anton Korobeynikov
e61e0b9a74
Add few pseudo-source-values
...
llvm-svn: 86383
2009-11-07 17:13:57 +00:00
Anton Korobeynikov
2a88785685
Initial support for addrmode handling. Tests by Brian Lucas!
...
llvm-svn: 86382
2009-11-07 17:13:35 +00:00
Anton Korobeynikov
1bbc8d2a86
Some preliminary variable asmprinting
...
llvm-svn: 86381
2009-11-07 17:12:58 +00:00
Anton Korobeynikov
3b7c712e9e
Use '.L' for global private prefix (as mspgcc)
...
llvm-svn: 86380
2009-11-07 17:12:38 +00:00
Anton Korobeynikov
e04fa15cb3
Drop old asmprinter stuff
...
llvm-svn: 86379
2009-11-07 17:12:21 +00:00
Anton Korobeynikov
226467d6a6
It turns out that the testcase in question uncovered subreg-handling bug.
...
Add assert in asmprinter to catch such cases and xfail the tests.
PR is to be filled.
llvm-svn: 86375
2009-11-07 15:20:32 +00:00
Chris Lattner
a381effe72
add the ability for TargetData to return information about legal integer
...
datatypes on a given CPU. This is intended to allow instcombine and other
transformations to avoid converting big sequences of operations to an
inconvenient width, and will help clean up after SRoA. See also "Adding
legal integer sizes to TargetData" on Feb 1, 2009 on llvmdev, and PR3451.
Comments welcome.
llvm-svn: 86370
2009-11-07 09:35:34 +00:00
Chris Lattner
91f9582fe1
more cleanup.
...
llvm-svn: 86369
2009-11-07 09:23:04 +00:00
Chris Lattner
d82510e109
add some missing #includes
...
llvm-svn: 86367
2009-11-07 09:20:54 +00:00
Chris Lattner
f819398067
rewrite TargetData to use StringRef/raw_ostream instead of thrashing std::strings.
...
llvm-svn: 86366
2009-11-07 09:13:23 +00:00
Chris Lattner
6b22952b03
prune #include / layering violation
...
llvm-svn: 86365
2009-11-07 09:07:01 +00:00
Jeffrey Yasskin
db5f24ce77
Make the need-stub variables accurate and consistent. In the case of
...
MachineRelocations, "stub" always refers to a far-call stub or a
load-a-faraway-global stub, so this patch adds "Far" to the term. (Other stubs
are used for lazy compilation and dlsym address replacement.) The variable was
also inconsistent between the positive and negative sense, and the positive
sense ("NeedStub") was more demanding than is accurate (since a nearby-enough
function can be called directly even if the platform often requires a stub).
Since the negative sense causes double-negatives, I switched to
"MayNeedFarStub" globally.
llvm-svn: 86363
2009-11-07 08:51:52 +00:00
Eric Christopher
bd05185ef1
Fix a couple of shuffle patterns to use movhlps instead
...
of movhps as the constraint. Changes optimizations so
update testcases as appropriate as well.
llvm-svn: 86360
2009-11-07 08:45:53 +00:00
Nick Lewycky
b6a3dd48f4
Teach dead store elimination that certain intrinsics write to memory just like
...
a store.
llvm-svn: 86359
2009-11-07 08:34:40 +00:00
Chris Lattner
c76ce9f208
remove the win32 tree, it's stale and confusing.
...
llvm-svn: 86358
2009-11-07 08:31:52 +00:00
Chris Lattner
5ff7f5672e
reapply 86289, 86278, 86270, 86267, 86266 & 86264 plus a fix
...
(making pred factoring only happen if threading is guaranteed
to be successful).
This now survives an X86-64 bootstrap of llvm-gcc.
llvm-svn: 86355
2009-11-07 08:05:03 +00:00
Chris Lattner
8e1d7222a7
Fix PR5421 by APInt'izing switch lowering.
...
llvm-svn: 86354
2009-11-07 07:50:34 +00:00
Nick Lewycky
9b669b3c4f
Oops, FunctionContainsEscapingAllocas is really used to mean two different
...
things. Back out part of r86349 for a moment.
llvm-svn: 86353
2009-11-07 07:42:38 +00:00
Nick Lewycky
5091272fdf
Dust off tail recursion elimination. Fix a fixme by applying CaptureTracking
...
and add a .ll to demo the new capability.
llvm-svn: 86349
2009-11-07 07:10:01 +00:00
Mikhail Glushenkov
0fa9474836
llvmc: Add a '-time' option.
...
llvm-svn: 86348
2009-11-07 06:33:58 +00:00
Mikhail Glushenkov
358607dfa3
Trailing whitespace.
...
llvm-svn: 86347
2009-11-07 06:33:12 +00:00
Mikhail Glushenkov
b53593d320
80-col violation.
...
llvm-svn: 86346
2009-11-07 06:33:01 +00:00
Chris Lattner
74ab6efbe8
merge cmp1 into cmp0 and filecheckize.
...
llvm-svn: 86345
2009-11-07 06:19:20 +00:00
Lang Hames
bc247dce4d
Update some globals to use ManagedStatic.
...
llvm-svn: 86342
2009-11-07 05:50:28 +00:00
Mon P Wang
fc032ced22
Fix memoizing of CvtRndSatSDNode
...
llvm-svn: 86340
2009-11-07 04:46:25 +00:00
Mon P Wang
5321dd8823
Fixed Overload table bug noticed by Jakob
...
llvm-svn: 86332
2009-11-07 04:07:33 +00:00
Evan Cheng
16e1c31da2
Missed this.
...
llvm-svn: 86331
2009-11-07 04:07:30 +00:00
Evan Cheng
a8e8a7c976
Refactor code. Fix a potential missing check. Teach isIdentical() about tLDRpci_pic.
...
llvm-svn: 86330
2009-11-07 04:04:34 +00:00
Evan Cheng
7ff831962a
- Add TargetInstrInfo::isIdentical(). It's similar to MachineInstr::isIdentical
...
except it doesn't care if the definitions' virtual registers differ. This is
used by machine LICM and other MI passes to perform CSE.
- Teach Thumb2InstrInfo::isIdentical() to check two t2LDRpci_pic are identical.
Since pc relative constantpool entries are always different, this requires it
it check if the values can actually the same.
llvm-svn: 86328
2009-11-07 03:52:02 +00:00
Ted Kremenek
50dddc8b07
Update CMake file.
...
llvm-svn: 86325
2009-11-07 03:26:59 +00:00
Kenneth Uildriks
07119737aa
Add code to check at SelectionDAGISel::LowerArguments time to see if return values can be lowered to registers. Coming soon, code to perform sret-demotion if return values cannot be lowered to registers
...
llvm-svn: 86324
2009-11-07 02:11:54 +00:00
Jakob Stoklund Olesen
4141d8ee92
Fix inverted conflict test in -early-coalesce.
...
A non-identity copy cannot be coalesced when the phi join destination register
is live at the copy site.
Also verify the condition that the PHI join source register is only used in
the PHI join. Otherwise the coalescing is invalid.
llvm-svn: 86322
2009-11-07 01:58:40 +00:00
Devang Patel
3a42e7ac65
Revert following patches to fix llvmgcc bootstrap.
...
86289, 86278, 86270, 86267, 86266 & 86264
Chris, please take a look.
llvm-svn: 86321
2009-11-07 01:32:59 +00:00
Johnny Chen
3467dcb12d
My previous patch (r84124) for setting the encoding bits 4 and 7 of DPSoRegFrm
...
was wrong and too aggressive in the sense that DPSoRegFrm includes both constant
shifts (with Inst{4} = 0) and register controlled shifts (with Inst{4} = 1 and
Inst{7} = 0). The 'rr' fragment of the multiclass definitions actually means
register/register with no shift, see A8-11.
llvm-svn: 86319
2009-11-07 00:54:36 +00:00
Victor Hernandez
bde558c536
- new SROA mallocs should have the mallocs running-or'ed, not the malloc's bitcast
...
- fix ProcessInternalGlobal() debug output
llvm-svn: 86317
2009-11-07 00:41:19 +00:00
Victor Hernandez
e04ed0c68f
Fit in 80 columns
...
llvm-svn: 86316
2009-11-07 00:36:50 +00:00