Chris Lattner
257008beff
If loopextract breaks the program provide output so that we can repro the
...
problem.
llvm-svn: 21790
2005-05-08 21:54:56 +00:00
Chris Lattner
2cbd1337ce
add a testcase for a case we do not handle yet
...
llvm-svn: 21789
2005-05-08 21:47:42 +00:00
Chris Lattner
df3332660f
Implement Reassociate/mul-neg-add.ll
...
llvm-svn: 21788
2005-05-08 21:41:35 +00:00
Chris Lattner
ce7d145b20
new testcase
...
llvm-svn: 21787
2005-05-08 21:41:18 +00:00
Chris Lattner
c4f8e2b0ed
Bail out earlier
...
llvm-svn: 21786
2005-05-08 21:33:47 +00:00
Chris Lattner
877b114037
Teach reassociate that 0-X === X*-1
...
llvm-svn: 21785
2005-05-08 21:28:52 +00:00
Chris Lattner
90723bacb9
new testcase
...
llvm-svn: 21784
2005-05-08 21:28:33 +00:00
Chris Lattner
9f284e0a3c
Fix PR557 and basictest[34].ll.
...
This makes reassociate realize that loads should be treated as unmovable, and
gives distinct ranks to distinct values defined in the same basic block, allowing
reassociate to do its thing.
llvm-svn: 21783
2005-05-08 20:57:04 +00:00
Chris Lattner
f9a33ede62
new testcases for PR557
...
llvm-svn: 21782
2005-05-08 20:56:02 +00:00
Chris Lattner
9187f3905e
Add debugging information
...
llvm-svn: 21781
2005-05-08 20:09:57 +00:00
Chris Lattner
08582be283
eliminate gotos
...
llvm-svn: 21780
2005-05-08 19:48:43 +00:00
Chris Lattner
9acd314ba3
Wrap long lines. Fix "warning: conflicting types for built-in function 'memset'"
...
warning from the CBE+GCC.
llvm-svn: 21779
2005-05-08 19:46:29 +00:00
Chris Lattner
5847e5e10c
Improve reassociation handling of inverses, implementing inverses.ll.
...
llvm-svn: 21778
2005-05-08 18:59:37 +00:00
Chris Lattner
2f1b13255d
new testcase
...
llvm-svn: 21777
2005-05-08 18:54:40 +00:00
Chris Lattner
4922118dc4
clean up and modernize this pass.
...
llvm-svn: 21776
2005-05-08 18:45:26 +00:00
Chris Lattner
b18dbbfff5
Strength reduce SAR into SHR if there is no way sign bits could be shifted
...
in. This tends to get cases like this:
X = cast ubyte to int
Y = shr int X, ...
Tested by: shift.ll:test24
llvm-svn: 21775
2005-05-08 17:34:56 +00:00
Chris Lattner
5140c15f08
new testcase
...
llvm-svn: 21774
2005-05-08 17:31:24 +00:00
Jeff Cohen
b127267a5a
Update my info
...
llvm-svn: 21773
2005-05-08 01:07:48 +00:00
Chris Lattner
e1850b86b6
Refactor some code
...
llvm-svn: 21772
2005-05-08 00:19:31 +00:00
Chris Lattner
6e2086d7e4
Handle some simple cases where we can see that values get annihilated.
...
llvm-svn: 21771
2005-05-08 00:08:33 +00:00
Chris Lattner
4294cec0f1
Fix a miscompilation of crafty by clobbering the "A" variable.
...
llvm-svn: 21770
2005-05-07 23:49:08 +00:00
Chris Lattner
041f8b59c1
Move licm after reassociate, add some cond-propagate passes
...
llvm-svn: 21769
2005-05-07 22:45:35 +00:00
Chris Lattner
1e5065052a
Rewrite the guts of the reassociate pass to be more efficient and logical. Instead
...
of trying to do local reassociation tweaks at each level, only process an expression
tree once (at its root). This does not improve the reassociation pass in any real way.
llvm-svn: 21768
2005-05-07 21:59:39 +00:00
Reid Spencer
f2ff439c4b
* Break tests into individual cases so its easier to see what's going on.
...
* Add four new cases to handle the new optimizations for strlen, dealing
with:
strlen(x) != 0 -> *x != 0
strlen(x) == 0 -> *x == 0
for each of two cases: strlen(x) != 0 and strlen(x) == 0
llvm-svn: 21767
2005-05-07 20:21:04 +00:00
Reid Spencer
170ae7ff70
* Add two strlen optimizations:
...
strlen(x) != 0 -> *x != 0
strlen(x) == 0 -> *x == 0
* Change nested statistics to use style of other LLVM statistics so that
only the name of the optimization (simplify-libcalls) is used as the
statistic name, and the description indicates which specific all is
optimized. Cuts down on some redundancy and saves a few bytes of space.
* Make note of stpcpy optimization that could be done.
llvm-svn: 21766
2005-05-07 20:15:59 +00:00
Reid Spencer
4f01a822b4
Don't increment the counter unless the debug flag is set.
...
llvm-svn: 21762
2005-05-07 04:59:45 +00:00
Chris Lattner
cea579932d
Convert shifts to muls to assist reassociation. This implements
...
Reassociate/shifttest.ll
llvm-svn: 21761
2005-05-07 04:24:13 +00:00
Chris Lattner
30555b0d14
test that reassociate can handle shifts
...
llvm-svn: 21760
2005-05-07 04:23:29 +00:00
Chris Lattner
f43e974abd
Simplify the code and rearrange it. No major functionality changes here.
...
llvm-svn: 21759
2005-05-07 04:08:02 +00:00
Jeff Cohen
6dc6672840
Silence VC++ warnings about unsafe mixing of ints and bools with the | operator.
...
llvm-svn: 21758
2005-05-07 02:44:04 +00:00
Chris Lattner
b34b273386
add note about bit builtins newly supported
...
llvm-svn: 21757
2005-05-07 02:21:21 +00:00
Chris Lattner
6ea3be51f8
new testcase
...
llvm-svn: 21756
2005-05-07 02:16:08 +00:00
Chris Lattner
573f64ecb5
fix bugs in my previous commit clarify the return type of the bit ops
...
llvm-svn: 21755
2005-05-07 01:46:40 +00:00
Chris Lattner
c792eb342c
add a couple of notes
...
llvm-svn: 21754
2005-05-06 23:08:23 +00:00
Chris Lattner
0132affa89
document calling convention extensions
...
llvm-svn: 21753
2005-05-06 22:57:40 +00:00
Chris Lattner
9bbe58628b
remove some dead (always dynamically false) flags
...
llvm-svn: 21752
2005-05-06 22:35:09 +00:00
Chris Lattner
129535c787
encode calling conventions for call/invoke instructions.
...
llvm-svn: 21751
2005-05-06 22:34:01 +00:00
Chris Lattner
f71853e277
new testcase
...
llvm-svn: 21750
2005-05-06 22:33:44 +00:00
Chris Lattner
f2e1c1969f
encode function calling convs in the bytecode file. invoke and call are
...
still to come.
llvm-svn: 21749
2005-05-06 20:42:57 +00:00
Chris Lattner
53bdd31211
parse new calling conv specifiers
...
llvm-svn: 21748
2005-05-06 20:27:19 +00:00
Chris Lattner
b25b6304b7
wrap a longline
...
llvm-svn: 21747
2005-05-06 20:27:03 +00:00
Chris Lattner
f7b6d3191b
add support for explicit calling conventions
...
llvm-svn: 21746
2005-05-06 20:26:43 +00:00
Chris Lattner
4147522d71
Add support for explicit calling conventions
...
llvm-svn: 21745
2005-05-06 20:26:26 +00:00
Chris Lattner
e29e1ff1e8
New file
...
llvm-svn: 21744
2005-05-06 19:59:08 +00:00
Chris Lattner
6d817c5486
use splice instead of remove/insert for a minor speedup
...
llvm-svn: 21743
2005-05-06 19:58:35 +00:00
Chris Lattner
6409f3490a
remove some ugly hacks that are no longer needed since andrew removed the
...
varargs munging code
llvm-svn: 21742
2005-05-06 19:49:51 +00:00
Chris Lattner
7effa0ed06
BAD typeo which caused many testsuite failures last night. Note to self, do
...
not change code after testing it without retesting!
llvm-svn: 21741
2005-05-06 17:13:16 +00:00
Chris Lattner
18335f8925
clean up the CBE output a bit
...
llvm-svn: 21740
2005-05-06 06:58:42 +00:00
Chris Lattner
561b7eb9e1
add tail marker as a comment
...
llvm-svn: 21739
2005-05-06 06:53:07 +00:00
Chris Lattner
ec7773e9e8
Make the stub functions be tail calls
...
llvm-svn: 21738
2005-05-06 06:48:54 +00:00