Evan Cheng
97b5dc63d7
Fold prologue esp update when possible.
...
llvm-svn: 39984
2007-07-17 21:26:42 +00:00
Evan Cheng
f9ef70560e
Dead code.
...
llvm-svn: 39979
2007-07-17 20:01:19 +00:00
Evan Cheng
b2bb4b4040
Make sure not to break eh_return.
...
llvm-svn: 39978
2007-07-17 18:40:47 +00:00
Evan Cheng
27ba94bf3b
Update.
...
llvm-svn: 39977
2007-07-17 18:39:45 +00:00
Evan Cheng
67e2e22e97
Missed the case where alloca is used but the stack size (not including callee-saved portion) is zero. Thanks Dan.
...
llvm-svn: 39974
2007-07-17 18:03:34 +00:00
Rafael Espindola
6389ef9854
detect invalid combination of sret and byval
...
llvm-svn: 39971
2007-07-17 13:34:23 +00:00
Evan Cheng
9ae2eb43d8
Use push / pop for prologues and epilogues.
...
llvm-svn: 39967
2007-07-17 07:59:08 +00:00
Chris Lattner
396156e00b
no email addrs in file headers
...
llvm-svn: 39962
2007-07-17 05:56:43 +00:00
Reid Spencer
5060fd0fa3
Unbreak the build by putting calls to free into the implementation file and
...
having that implementation file #include <cstdlib>.
llvm-svn: 39952
2007-07-17 02:16:12 +00:00
Owen Anderson
09f86993bd
Take advantage of undefined behavior if the source program tries to GEP
...
beyond the end of an alloca to make FastDSE faster and more aggressive.
llvm-svn: 39945
2007-07-16 23:34:39 +00:00
Owen Anderson
7fcaaadf1c
Add support for walking up memory def chains, which enables finding many more
...
dead stores on 400.perlbench.
llvm-svn: 39929
2007-07-16 21:52:50 +00:00
Owen Anderson
81990a3fc3
Use realloc() to (potentially) resize the contents of SmallPtrSet in place.
...
llvm-svn: 39926
2007-07-16 21:27:44 +00:00
Reid Spencer
3363f4ad96
Return Undef if the block has no dominator. This was required to allow
...
llvm-gcc build to succeed. Without this change it fails in libstdc++
compilation. This causes no regressions in dejagnu tests. However,
someone who knows this code better might want to review it.
llvm-svn: 39924
2007-07-16 21:03:44 +00:00
Dan Gohman
72efc04d8e
Use ConstantFoldFP for folding all unary floating-point operations which may
...
have an error, and refector out the code for binary operators into
ConstantFoldBinaryFP and use it for all binary floating-point operations
which may have an error. These functions still rely exclusively on errno
to detect errors though.
llvm-svn: 39923
2007-07-16 15:26:22 +00:00
Dan Gohman
06c60b6032
Fix comments about vectors to use the current wording.
...
llvm-svn: 39921
2007-07-16 14:29:03 +00:00
Chris Lattner
640fd5124d
Repair a regression in Transforms/InstCombine/mul.ll that Reid noticed.
...
llvm-svn: 39896
2007-07-16 04:15:34 +00:00
Nick Lewycky
b7c0c8a350
Start adding and cleaning up comments.
...
llvm-svn: 39894
2007-07-16 02:58:37 +00:00
Nick Lewycky
5246026c8c
Handle decrementing loops properly. Fixes PR1533.
...
Always pass the constant as the second parameter to HowManyLessThans.
Remove obsolete "isSigned" parameter.
llvm-svn: 39893
2007-07-16 02:08:00 +00:00
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