Chris Lattner
d4fef8dbca
Implement shift-simplify.ll:test[45].
...
First teach instcombine that sign bit checks only demand the
sign bit, this allows simplify demanded bits to hack on
expressions better.
Second, teach instcombine that ashr is useless if only the
sign bit is demanded.
llvm-svn: 39880
2007-07-15 20:54:51 +00:00
Chris Lattner
06205d5567
Implement shift-simplify.ll:test3, turning:
...
(X << 31) <s 0 --> (X&1) != 0
This happens dozens of times in the CFE.
llvm-svn: 39879
2007-07-15 20:42:37 +00:00
Nick Lewycky
ddc2f9ba57
Clarify the language. Pointed out by Duncan Sands.
...
llvm-svn: 39857
2007-07-14 17:41:03 +00:00
Nick Lewycky
d20f485866
Fix the build. Patch from Holger Schurig.
...
llvm-svn: 39856
2007-07-14 15:11:14 +00:00
Anton Korobeynikov
383a324735
Long live the exception handling!
...
This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.
In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.
After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be
thought as 'finished': I expect many small and not so small glitches
everywhere.
llvm-svn: 39855
2007-07-14 14:06:15 +00:00
Nick Lewycky
39519f5c41
Use maximal intersection algorithm exclusively. Fixes miscompile bug.
...
llvm-svn: 39852
2007-07-14 04:28:04 +00:00
Nick Lewycky
61b4a265ee
Add alternate ConstantRange intersection algorithm.
...
llvm-svn: 39851
2007-07-14 02:51:34 +00:00
Devang Patel
4cd1413f15
Make LCSSA a loop pass.
...
llvm-svn: 39844
2007-07-13 23:57:11 +00:00
Evan Cheng
1fae1cd3e1
Fix for PR1540: Specify F0, F1 are sub-registers of D0, etc.
...
llvm-svn: 39843
2007-07-13 23:55:50 +00:00
Owen Anderson
d975efab16
Handle GEPs with all-zero indices in the same way we handle pointer-pointer bitcasts. Also, fix a potentia infinite loop.
...
This brings FastDSE to parity with old DSE on 175.vpr.
llvm-svn: 39839
2007-07-13 22:50:48 +00:00
Devang Patel
29ccf8ba52
Disable claims to preserve analysis until open issues are resolved.
...
llvm-svn: 39834
2007-07-13 21:53:42 +00:00
Dan Gohman
ff72788863
Fix the comment for LegalizeOp to more accurately reflect what it does.
...
llvm-svn: 39827
2007-07-13 20:14:11 +00:00
Dan Gohman
80f9f077e3
Don't call SimplifyVBinOp for non-vector operations, following earlier review
...
feedback. This theoretically makes the common (scalar) case more efficient.
llvm-svn: 39823
2007-07-13 20:03:40 +00:00
Owen Anderson
9c9ef21432
Be more aggressive in removing dead stores, and in removing instructions trivially dead after DSE.
...
This drastically improves the effect of FastDSE on kimwitu++.
llvm-svn: 39819
2007-07-13 18:26:26 +00:00
Dale Johannesen
4dc35dbd3e
Modify previous patch per review comments.
...
llvm-svn: 39817
2007-07-13 17:31:29 +00:00
Dale Johannesen
2182f06f2d
Skeleton of post-RA scheduler; doesn't do anything yet.
...
Change name of -sched option and DEBUG_TYPE to
pre-RA-sched; adjust testcases.
llvm-svn: 39816
2007-07-13 17:13:54 +00:00
Chris Lattner
2b4d9b684f
Fix CodeGen/Generic/print-arith-fp.ll on sparc (PR1551)
...
llvm-svn: 39813
2007-07-13 16:24:10 +00:00
Owen Anderson
32c4a05dd4
Reimplement removing stores to allocas at the end of a function. This should be safe now.
...
llvm-svn: 39790
2007-07-12 21:41:30 +00:00
Owen Anderson
d4451dee1e
Make the condition-checking for free with non-trivial dependencies more correct.
...
llvm-svn: 39789
2007-07-12 18:08:51 +00:00
Owen Anderson
5e06995b3d
Remove the end-block handling code. It was unsafe, and making it safe would have resulted in falling back to the slow DSE case. I need to think some more about the right way to handle this.
...
llvm-svn: 39788
2007-07-12 17:52:20 +00:00
Dale Johannesen
85ee72f7ba
ARM: make branch folder remove unconditional branches
...
following jump tables that it earlier inserted. This
would be OK on other targets but is needed for correctness
only on ARM (constant islands needs to find jump tables).
llvm-svn: 39782
2007-07-12 16:45:35 +00:00
Duncan Sands
0263dd1d7f
The type ids making up a filter are unsigned, and
...
should be output as unsigned values. Checked against
gcc.
llvm-svn: 39775
2007-07-12 13:51:39 +00:00
Gabor Greif
b8bca52c7d
checked in as obvious,
...
thanks Benoit Boissinot!
llvm-svn: 39774
2007-07-12 13:31:38 +00:00
Chris Lattner
bdc69595d9
another missed SSE optimization
...
llvm-svn: 39772
2007-07-12 06:31:38 +00:00
Owen Anderson
1e1bace52b
Let MemoryDependenceAnalysis take care of updating AliasAnalysis.
...
llvm-svn: 39769
2007-07-12 00:06:21 +00:00
Devang Patel
fac4d1f014
Preserve analysis info.
...
llvm-svn: 39767
2007-07-11 23:47:28 +00:00
Bruno Cardoso Lopes
bcda5e20c9
Added support for Mips specific GAS directives
...
Fixed print immediate
Fixed Identation on MipsISelDAGToDAG.cpp
llvm-svn: 39764
2007-07-11 23:24:41 +00:00
Bruno Cardoso Lopes
6c8c748e4d
Added support for framepointer
...
Prologue/Epilogue support fp,ra save/restore and use the stack frame the right
way!
llvm-svn: 39763
2007-07-11 23:21:31 +00:00
Owen Anderson
aa07172340
Handle the case where an entire structure is freed, and its dependency is a store to a field within
...
that structure.
Also, refactor the runOnBasicBlock() function, splitting some of the special cases into separate functions.
llvm-svn: 39762
2007-07-11 23:19:17 +00:00
Bruno Cardoso Lopes
77dbdcabf2
Now that stack is represented the right way, LOA starts at 0
...
llvm-svn: 39761
2007-07-11 23:17:41 +00:00
Bruno Cardoso Lopes
4449e5dd7f
Fixed AddLiveOut issues
...
FI's created the write way to represent Mips stack
llvm-svn: 39760
2007-07-11 23:16:16 +00:00
Bruno Cardoso Lopes
c5affeccbd
Removed unused immediate PatLeaf, fixed lui instruction
...
llvm-svn: 39759
2007-07-11 22:47:02 +00:00
Bruno Cardoso Lopes
753e37027f
Added MipsMachineFunction class, to hold Mips dinamic stack info when inserting Prologue/Epilog
...
llvm-svn: 39758
2007-07-11 22:44:21 +00:00
Owen Anderson
1441470be8
Add support for eliminate stores to stack-allocated memory locations at the end
...
of a function.
llvm-svn: 39754
2007-07-11 21:06:56 +00:00
Owen Anderson
e720144837
Handle eliminating stores that occur right before a free.
...
llvm-svn: 39753
2007-07-11 20:38:34 +00:00
Lauro Ramos Venancio
3d70855dd2
Handle packed structs in the CBackend.
...
llvm-svn: 39752
2007-07-11 19:56:53 +00:00
Evan Cheng
6b6d1f685f
Missed a couple of places where new instructions are added due to spill / restore.
...
llvm-svn: 39748
2007-07-11 19:17:18 +00:00
Owen Anderson
bf971aafb6
Clean up a few things based on Chris' feedback.
...
llvm-svn: 39747
2007-07-11 19:03:09 +00:00
Tanya Lattner
ccecbcd779
Adding ability to demote phi to stack.
...
llvm-svn: 39744
2007-07-11 18:41:34 +00:00
Dale Johannesen
e59411d056
Fix hang compiling TimberWolf (allow for islands
...
of size other than 4).
llvm-svn: 39743
2007-07-11 18:32:38 +00:00
Lauro Ramos Venancio
09d73c0305
Assert when TLS is not implemented.
...
llvm-svn: 39737
2007-07-11 17:19:51 +00:00
Duncan Sands
03b274911f
Exception handling has been implemented.
...
llvm-svn: 39732
2007-07-11 16:59:20 +00:00
Chris Lattner
6e544a9cca
Fix an oversight: for modules with no other identifying target info,
...
the sparc backend should be preferred when running on sparcs.
llvm-svn: 39142
2007-07-11 16:32:10 +00:00
Duncan Sands
d5ea194b6c
If assertions are not enabled, we should return False here.
...
llvm-svn: 38535
2007-07-11 08:47:55 +00:00
Evan Cheng
74a541024f
No longer need to track last def / use.
...
llvm-svn: 38534
2007-07-11 08:47:44 +00:00
Evan Cheng
bec7a20c5e
Fix for PR1545: Revamp code that update kill information due to register reuse.
...
llvm-svn: 38525
2007-07-11 05:28:39 +00:00
Owen Anderson
5e72db3f7f
Add FastDSE, a new algorithm for doing dead store elimination. This algorithm is not as accurate
...
as the current DSE, but it only a linear scan over each block, rather than quadratic. Eventually
(once it has been improved somewhat), this will replace the current DSE.
NOTE: This has not yet been extensively tested.
llvm-svn: 38517
2007-07-11 00:46:18 +00:00
David Greene
d9034f717a
Make this work with GLIBCXX_DEBUG.
...
llvm-svn: 38516
2007-07-10 22:00:30 +00:00
Evan Cheng
94579dbd2e
Didn't mean the last commit. Revert.
...
llvm-svn: 38515
2007-07-10 22:00:16 +00:00
Dale Johannesen
68471d263f
Fix fp_constant_op failure.
...
llvm-svn: 38514
2007-07-10 21:53:30 +00:00