Commit Graph

18643 Commits

Author SHA1 Message Date
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
Chris Lattner 6aacb0f9da Preserve tail marker
llvm-svn: 21737
2005-05-06 06:48:21 +00:00
Chris Lattner 9f3dced2c7 Implement Transforms/Inline/inline-tail.ll
llvm-svn: 21736
2005-05-06 06:47:52 +00:00
Chris Lattner 318e328fc4 Make sure to not accidentally get a bogus tail marker
llvm-svn: 21735
2005-05-06 06:47:37 +00:00
Chris Lattner 324d2eedb2 preserve the tail marker
llvm-svn: 21734
2005-05-06 06:46:58 +00:00
Chris Lattner 2db10ece5c add a default arg
llvm-svn: 21733
2005-05-06 06:22:10 +00:00
Chris Lattner 5879f9c24d Don't forget these are calls
llvm-svn: 21730
2005-05-06 06:21:59 +00:00
Chris Lattner ca4d4bd2db lex tail
llvm-svn: 21729
2005-05-06 06:20:33 +00:00
Chris Lattner 2c9a46e758 test that tail call survives bytecodification
llvm-svn: 21728
2005-05-06 06:18:33 +00:00
Chris Lattner fb6f1746f4 add bytecode reader support for tail calls
llvm-svn: 21727
2005-05-06 06:13:34 +00:00
Chris Lattner abb5bd78ca Hilight tail
llvm-svn: 21726
2005-05-06 06:07:34 +00:00
Chris Lattner eaf625dc5c These are legal for tail calls
llvm-svn: 21723
2005-05-06 05:59:50 +00:00
Chris Lattner 0603845a49 Add a 'tail' marker for call instructions, patch contributed by
Alexander Friedman.

llvm-svn: 21722
2005-05-06 05:51:46 +00:00