oota-llvm.git
19 years agoTell tblgen exactly where to find the include file.
John Criswell [Mon, 9 May 2005 19:32:08 +0000 (19:32 +0000)]
Tell tblgen exactly where to find the include file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21822 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agorestore some non-dead code I removed last night breaking double casts to
Chris Lattner [Mon, 9 May 2005 18:37:02 +0000 (18:37 +0000)]
restore some non-dead code I removed last night breaking double casts to
uint

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21821 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agofold and (shl X, C1), C2 -> rlwinm when possible. Many other cases are possible,
Chris Lattner [Mon, 9 May 2005 17:39:48 +0000 (17:39 +0000)]
fold and (shl X, C1), C2 -> rlwinm when possible.  Many other cases are possible,
include and (srl)    and the inverses (shl and) etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21820 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcase
Chris Lattner [Mon, 9 May 2005 17:09:31 +0000 (17:09 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21819 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFold shifts into subsequent SHL's. These shifts often arise due to addrses
Chris Lattner [Mon, 9 May 2005 17:06:45 +0000 (17:06 +0000)]
Fold shifts into subsequent SHL's.  These shifts often arise due to addrses
arithmetic lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21818 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoUpdated the list of code generators for LLVM 1.5.
John Criswell [Mon, 9 May 2005 16:49:59 +0000 (16:49 +0000)]
Updated the list of code generators for LLVM 1.5.
Added information on getting LLVM 1.5 from CVS (hopefully readers will
understand that the label will work *after* LLVM 1.5 is released).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21817 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoLittle corrections.
John Criswell [Mon, 9 May 2005 16:39:27 +0000 (16:39 +0000)]
Little corrections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21816 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix bug noticed by Tzu-Chien Chiu, thanks!
Chris Lattner [Mon, 9 May 2005 15:41:03 +0000 (15:41 +0000)]
Fix bug noticed by Tzu-Chien Chiu, thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21815 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agofix and cleanup constmul code a bit, this fixes mediabench/toast and
Duraid Madina [Mon, 9 May 2005 13:18:34 +0000 (13:18 +0000)]
fix and cleanup constmul code a bit, this fixes mediabench/toast and
probably a couple of other tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21814 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agotweak test to accept the (good) code emitted by the pattern isel
Chris Lattner [Mon, 9 May 2005 05:54:27 +0000 (05:54 +0000)]
tweak test to accept the (good) code emitted by the pattern isel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21812 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoWrap long lines, remove dead code that is now handled by legalize
Chris Lattner [Mon, 9 May 2005 05:40:26 +0000 (05:40 +0000)]
Wrap long lines, remove dead code that is now handled by legalize

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21811 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix FP -> bool casts
Chris Lattner [Mon, 9 May 2005 05:33:18 +0000 (05:33 +0000)]
Fix FP -> bool casts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21810 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoimplement and.ll:test33
Chris Lattner [Mon, 9 May 2005 04:58:36 +0000 (04:58 +0000)]
implement and.ll:test33

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21809 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNew testcase
Chris Lattner [Mon, 9 May 2005 04:54:18 +0000 (04:54 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21808 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd note to self to complete the testing of all intrinsic functions as
Reid Spencer [Mon, 9 May 2005 04:47:32 +0000 (04:47 +0000)]
Add note to self to complete the testing of all intrinsic functions as
specified in the LangRef document.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21807 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDon't use the load/store instruction as the source pointer, use the pointer
Chris Lattner [Mon, 9 May 2005 04:28:51 +0000 (04:28 +0000)]
Don't use the load/store instruction as the source pointer, use the pointer
being stored/loaded through!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21806 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agomemoize all nodes, even null Value* nodes. Do not add two token chain outputs
Chris Lattner [Mon, 9 May 2005 04:14:13 +0000 (04:14 +0000)]
memoize all nodes, even null Value* nodes.  Do not add two token chain outputs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21805 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agowrap long lines
Chris Lattner [Mon, 9 May 2005 04:08:33 +0000 (04:08 +0000)]
wrap long lines

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21804 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoPrint SrcValue nodes correctly
Chris Lattner [Mon, 9 May 2005 04:08:27 +0000 (04:08 +0000)]
Print SrcValue nodes correctly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21803 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix X86/2005-05-08-FPStackifierPHI.ll: ugly gross hack.
Chris Lattner [Mon, 9 May 2005 03:36:39 +0000 (03:36 +0000)]
Fix X86/2005-05-08-FPStackifierPHI.ll: ugly gross hack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21801 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNew testcase that crashes the pattern isel
Chris Lattner [Mon, 9 May 2005 03:36:11 +0000 (03:36 +0000)]
New testcase that crashes the pattern isel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21800 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoPreserve CC's when linking modules
Chris Lattner [Mon, 9 May 2005 01:09:39 +0000 (01:09 +0000)]
Preserve CC's when linking modules

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21799 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoPreserve calling conventions when doing IPO
Chris Lattner [Mon, 9 May 2005 01:05:50 +0000 (01:05 +0000)]
Preserve calling conventions when doing IPO

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21798 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agowrap long lines, preserve calling conventions when cloning functions and
Chris Lattner [Mon, 9 May 2005 01:04:34 +0000 (01:04 +0000)]
wrap long lines, preserve calling conventions when cloning functions and
turning calls into invokes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21797 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoBy definition, 'tail' calls cannot access the stack frame of their caller.
Chris Lattner [Sun, 8 May 2005 23:58:12 +0000 (23:58 +0000)]
By definition, 'tail' calls cannot access the stack frame of their caller.
Expose this as a simple form of mod/ref information.  This implements
BasicAA/tailcall-modref.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21796 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNew testacse for information exposed by the 'tail' call marker.
Chris Lattner [Sun, 8 May 2005 23:57:34 +0000 (23:57 +0000)]
New testacse for information exposed by the 'tail' call marker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21795 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoVerify that varargs functions all have ccc
Chris Lattner [Sun, 8 May 2005 22:27:09 +0000 (22:27 +0000)]
Verify that varargs functions all have ccc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21792 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoConvert non-address taken functions with C calling conventions to fastcc.
Chris Lattner [Sun, 8 May 2005 22:18:06 +0000 (22:18 +0000)]
Convert non-address taken functions with C calling conventions to fastcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21791 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoIf loopextract breaks the program provide output so that we can repro the
Chris Lattner [Sun, 8 May 2005 21:54:56 +0000 (21:54 +0000)]
If loopextract breaks the program provide output so that we can repro the
problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21790 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd a testcase for a case we do not handle yet
Chris Lattner [Sun, 8 May 2005 21:47:42 +0000 (21:47 +0000)]
add a testcase for a case we do not handle yet

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21789 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement Reassociate/mul-neg-add.ll
Chris Lattner [Sun, 8 May 2005 21:41:35 +0000 (21:41 +0000)]
Implement Reassociate/mul-neg-add.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21788 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcase
Chris Lattner [Sun, 8 May 2005 21:41:18 +0000 (21:41 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21787 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoBail out earlier
Chris Lattner [Sun, 8 May 2005 21:33:47 +0000 (21:33 +0000)]
Bail out earlier

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21786 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoTeach reassociate that 0-X === X*-1
Chris Lattner [Sun, 8 May 2005 21:28:52 +0000 (21:28 +0000)]
Teach reassociate that 0-X === X*-1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21785 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcase
Chris Lattner [Sun, 8 May 2005 21:28:33 +0000 (21:28 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21784 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix PR557 and basictest[34].ll.
Chris Lattner [Sun, 8 May 2005 20:57:04 +0000 (20:57 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21783 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcases for PR557
Chris Lattner [Sun, 8 May 2005 20:56:02 +0000 (20:56 +0000)]
new testcases for PR557

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21782 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd debugging information
Chris Lattner [Sun, 8 May 2005 20:09:57 +0000 (20:09 +0000)]
Add debugging information

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21781 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoeliminate gotos
Chris Lattner [Sun, 8 May 2005 19:48:43 +0000 (19:48 +0000)]
eliminate gotos

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21780 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoWrap long lines. Fix "warning: conflicting types for built-in function 'memset'"
Chris Lattner [Sun, 8 May 2005 19:46:29 +0000 (19:46 +0000)]
Wrap long lines.  Fix "warning: conflicting types for built-in function 'memset'"
warning from the CBE+GCC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21779 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImprove reassociation handling of inverses, implementing inverses.ll.
Chris Lattner [Sun, 8 May 2005 18:59:37 +0000 (18:59 +0000)]
Improve reassociation handling of inverses, implementing inverses.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21778 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcase
Chris Lattner [Sun, 8 May 2005 18:54:40 +0000 (18:54 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21777 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoclean up and modernize this pass.
Chris Lattner [Sun, 8 May 2005 18:45:26 +0000 (18:45 +0000)]
clean up and modernize this pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21776 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoStrength reduce SAR into SHR if there is no way sign bits could be shifted
Chris Lattner [Sun, 8 May 2005 17:34:56 +0000 (17:34 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21775 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcase
Chris Lattner [Sun, 8 May 2005 17:31:24 +0000 (17:31 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21774 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoUpdate my info
Jeff Cohen [Sun, 8 May 2005 01:07:48 +0000 (01:07 +0000)]
Update my info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21773 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRefactor some code
Chris Lattner [Sun, 8 May 2005 00:19:31 +0000 (00:19 +0000)]
Refactor some code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21772 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoHandle some simple cases where we can see that values get annihilated.
Chris Lattner [Sun, 8 May 2005 00:08:33 +0000 (00:08 +0000)]
Handle some simple cases where we can see that values get annihilated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21771 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix a miscompilation of crafty by clobbering the "A" variable.
Chris Lattner [Sat, 7 May 2005 23:49:08 +0000 (23:49 +0000)]
Fix a miscompilation of crafty by clobbering the "A" variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21770 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMove licm after reassociate, add some cond-propagate passes
Chris Lattner [Sat, 7 May 2005 22:45:35 +0000 (22:45 +0000)]
Move licm after reassociate, add some cond-propagate passes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21769 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRewrite the guts of the reassociate pass to be more efficient and logical. Instead
Chris Lattner [Sat, 7 May 2005 21:59:39 +0000 (21:59 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21768 91177308-0d34-0410-b5e6-96231b3b80d8

19 years ago* Break tests into individual cases so its easier to see what's going on.
Reid Spencer [Sat, 7 May 2005 20:21:04 +0000 (20:21 +0000)]
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21767 91177308-0d34-0410-b5e6-96231b3b80d8

19 years ago* Add two strlen optimizations:
Reid Spencer [Sat, 7 May 2005 20:15:59 +0000 (20:15 +0000)]
* 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21766 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDon't increment the counter unless the debug flag is set.
Reid Spencer [Sat, 7 May 2005 04:59:45 +0000 (04:59 +0000)]
Don't increment the counter unless the debug flag is set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21762 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoConvert shifts to muls to assist reassociation. This implements
Chris Lattner [Sat, 7 May 2005 04:24:13 +0000 (04:24 +0000)]
Convert shifts to muls to assist reassociation.  This implements
Reassociate/shifttest.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21761 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agotest that reassociate can handle shifts
Chris Lattner [Sat, 7 May 2005 04:23:29 +0000 (04:23 +0000)]
test that reassociate can handle shifts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21760 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoSimplify the code and rearrange it. No major functionality changes here.
Chris Lattner [Sat, 7 May 2005 04:08:02 +0000 (04:08 +0000)]
Simplify the code and rearrange it.  No major functionality changes here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21759 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoSilence VC++ warnings about unsafe mixing of ints and bools with the | operator.
Jeff Cohen [Sat, 7 May 2005 02:44:04 +0000 (02:44 +0000)]
Silence VC++ warnings about unsafe mixing of ints and bools with the | operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21758 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd note about bit builtins newly supported
Chris Lattner [Sat, 7 May 2005 02:21:21 +0000 (02:21 +0000)]
add note about bit builtins newly supported

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21757 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcase
Chris Lattner [Sat, 7 May 2005 02:16:08 +0000 (02:16 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21756 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agofix bugs in my previous commit clarify the return type of the bit ops
Chris Lattner [Sat, 7 May 2005 01:46:40 +0000 (01:46 +0000)]
fix bugs in my previous commit clarify the return type of the bit ops

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21755 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd a couple of notes
Chris Lattner [Fri, 6 May 2005 23:08:23 +0000 (23:08 +0000)]
add a couple of notes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21754 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agodocument calling convention extensions
Chris Lattner [Fri, 6 May 2005 22:57:40 +0000 (22:57 +0000)]
document calling convention extensions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21753 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoremove some dead (always dynamically false) flags
Chris Lattner [Fri, 6 May 2005 22:35:09 +0000 (22:35 +0000)]
remove some dead (always dynamically false) flags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21752 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoencode calling conventions for call/invoke instructions.
Chris Lattner [Fri, 6 May 2005 22:34:01 +0000 (22:34 +0000)]
encode calling conventions for call/invoke instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21751 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcase
Chris Lattner [Fri, 6 May 2005 22:33:44 +0000 (22:33 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21750 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoencode function calling convs in the bytecode file. invoke and call are
Chris Lattner [Fri, 6 May 2005 20:42:57 +0000 (20:42 +0000)]
encode function calling convs in the bytecode file.  invoke and call are
still to come.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21749 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoparse new calling conv specifiers
Chris Lattner [Fri, 6 May 2005 20:27:19 +0000 (20:27 +0000)]
parse new calling conv specifiers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21748 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agowrap a longline
Chris Lattner [Fri, 6 May 2005 20:27:03 +0000 (20:27 +0000)]
wrap a longline

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21747 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd support for explicit calling conventions
Chris Lattner [Fri, 6 May 2005 20:26:43 +0000 (20:26 +0000)]
add support for explicit calling conventions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21746 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd support for explicit calling conventions
Chris Lattner [Fri, 6 May 2005 20:26:26 +0000 (20:26 +0000)]
Add support for explicit calling conventions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21745 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNew file
Chris Lattner [Fri, 6 May 2005 19:59:08 +0000 (19:59 +0000)]
New file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21744 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agouse splice instead of remove/insert for a minor speedup
Chris Lattner [Fri, 6 May 2005 19:58:35 +0000 (19:58 +0000)]
use splice instead of remove/insert for a minor speedup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21743 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoremove some ugly hacks that are no longer needed since andrew removed the
Chris Lattner [Fri, 6 May 2005 19:49:51 +0000 (19:49 +0000)]
remove some ugly hacks that are no longer needed since andrew removed the
varargs munging code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21742 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoBAD typeo which caused many testsuite failures last night. Note to self, do
Chris Lattner [Fri, 6 May 2005 17:13:16 +0000 (17:13 +0000)]
BAD typeo which caused many testsuite failures last night.  Note to self, do
not change code after testing it without retesting!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21741 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoclean up the CBE output a bit
Chris Lattner [Fri, 6 May 2005 06:58:42 +0000 (06:58 +0000)]
clean up the CBE output a bit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21740 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd tail marker as a comment
Chris Lattner [Fri, 6 May 2005 06:53:07 +0000 (06:53 +0000)]
add tail marker as a comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21739 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMake the stub functions be tail calls
Chris Lattner [Fri, 6 May 2005 06:48:54 +0000 (06:48 +0000)]
Make the stub functions be tail calls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21738 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoPreserve tail marker
Chris Lattner [Fri, 6 May 2005 06:48:21 +0000 (06:48 +0000)]
Preserve tail marker

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21737 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement Transforms/Inline/inline-tail.ll
Chris Lattner [Fri, 6 May 2005 06:47:52 +0000 (06:47 +0000)]
Implement Transforms/Inline/inline-tail.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21736 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMake sure to not accidentally get a bogus tail marker
Chris Lattner [Fri, 6 May 2005 06:47:37 +0000 (06:47 +0000)]
Make sure to not accidentally get a bogus tail marker

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21735 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agopreserve the tail marker
Chris Lattner [Fri, 6 May 2005 06:46:58 +0000 (06:46 +0000)]
preserve the tail marker

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21734 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd a default arg
Chris Lattner [Fri, 6 May 2005 06:22:10 +0000 (06:22 +0000)]
add a default arg

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21733 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDon't forget these are calls
Chris Lattner [Fri, 6 May 2005 06:21:59 +0000 (06:21 +0000)]
Don't forget these are calls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21730 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agolex tail
Chris Lattner [Fri, 6 May 2005 06:20:33 +0000 (06:20 +0000)]
lex tail

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21729 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agotest that tail call survives bytecodification
Chris Lattner [Fri, 6 May 2005 06:18:33 +0000 (06:18 +0000)]
test that tail call survives bytecodification

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21728 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd bytecode reader support for tail calls
Chris Lattner [Fri, 6 May 2005 06:13:34 +0000 (06:13 +0000)]
add bytecode reader support for tail calls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21727 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoHilight tail
Chris Lattner [Fri, 6 May 2005 06:07:34 +0000 (06:07 +0000)]
Hilight tail

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21726 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoThese are legal for tail calls
Chris Lattner [Fri, 6 May 2005 05:59:50 +0000 (05:59 +0000)]
These are legal for tail calls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21723 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd a 'tail' marker for call instructions, patch contributed by
Chris Lattner [Fri, 6 May 2005 05:51:46 +0000 (05:51 +0000)]
Add a 'tail' marker for call instructions, patch contributed by
Alexander Friedman.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21722 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd info on new 'tail' marker
Chris Lattner [Fri, 6 May 2005 05:47:36 +0000 (05:47 +0000)]
Add info on new 'tail' marker

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21721 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoWrap long lines
Chris Lattner [Fri, 6 May 2005 05:34:40 +0000 (05:34 +0000)]
Wrap long lines

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21720 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDCE intrinsic instructions without side effects.
Chris Lattner [Fri, 6 May 2005 05:27:34 +0000 (05:27 +0000)]
DCE intrinsic instructions without side effects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21719 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoThese intrinsics do not access memory
Chris Lattner [Fri, 6 May 2005 05:21:04 +0000 (05:21 +0000)]
These intrinsics do not access memory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21718 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoTeach instcombine propagate zeroness through shl instructions, implementing
Chris Lattner [Fri, 6 May 2005 04:53:20 +0000 (04:53 +0000)]
Teach instcombine propagate zeroness through shl instructions, implementing
and.ll:test31

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21717 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcases
Chris Lattner [Fri, 6 May 2005 04:52:46 +0000 (04:52 +0000)]
new testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21716 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement shift.ll:test23. If we are shifting right then immediately truncating
Chris Lattner [Fri, 6 May 2005 04:18:52 +0000 (04:18 +0000)]
Implement shift.ll:test23.  If we are shifting right then immediately truncating
the result, turn signed shift rights into unsigned shift rights if possible.

This leads to later simplification and happens *often* in 176.gcc.  For example,
this testcase:

struct xxx { unsigned int code : 8; };
enum codes { A, B, C, D, E, F };
int foo(struct xxx *P) {
  if ((enum codes)P->code == A)
     bar();
}

used to be compiled to:

int %foo(%struct.xxx* %P) {
        %tmp.1 = getelementptr %struct.xxx* %P, int 0, uint 0           ; <uint*> [#uses=1]
        %tmp.2 = load uint* %tmp.1              ; <uint> [#uses=1]
        %tmp.3 = cast uint %tmp.2 to int                ; <int> [#uses=1]
        %tmp.4 = shl int %tmp.3, ubyte 24               ; <int> [#uses=1]
        %tmp.5 = shr int %tmp.4, ubyte 24               ; <int> [#uses=1]
        %tmp.6 = cast int %tmp.5 to sbyte               ; <sbyte> [#uses=1]
        %tmp.8 = seteq sbyte %tmp.6, 0          ; <bool> [#uses=1]
        br bool %tmp.8, label %then, label %UnifiedReturnBlock

Now it is compiled to:

        %tmp.1 = getelementptr %struct.xxx* %P, int 0, uint 0           ; <uint*> [#uses=1]
        %tmp.2 = load uint* %tmp.1              ; <uint> [#uses=1]
        %tmp.2 = cast uint %tmp.2 to sbyte              ; <sbyte> [#uses=1]
        %tmp.8 = seteq sbyte %tmp.2, 0          ; <bool> [#uses=1]
        br bool %tmp.8, label %then, label %UnifiedReturnBlock

which is the difference between this:

foo:
        subl $4, %esp
        movl 8(%esp), %eax
        movl (%eax), %eax
        shll $24, %eax
        sarl $24, %eax
        testb %al, %al
        jne .LBBfoo_2

and this:

foo:
        subl $4, %esp
        movl 8(%esp), %eax
        movl (%eax), %eax
        testb %al, %al
        jne .LBBfoo_2

This occurs 3243 times total in the External tests, 215x in povray,
6x in each f2c'd program, 1451x in 176.gcc, 7x in crafty, 20x in perl,
25x in gap, 3x in m88ksim, 25x in ijpeg.

Maybe this will cause a little jump on gcc tommorow :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21715 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcase
Chris Lattner [Fri, 6 May 2005 04:11:32 +0000 (04:11 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21714 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement xor.ll:test22
Chris Lattner [Fri, 6 May 2005 02:07:39 +0000 (02:07 +0000)]
Implement xor.ll:test22

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21713 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoimplement and.ll:test30 and set.ll:test21
Chris Lattner [Fri, 6 May 2005 01:53:19 +0000 (01:53 +0000)]
implement and.ll:test30 and set.ll:test21

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21712 91177308-0d34-0410-b5e6-96231b3b80d8