Reid Spencer
65d553cd03
Don't increment the counter unless the debug flag is set.
...
llvm-svn: 21762
2005-05-07 04:59:45 +00:00
Chris Lattner
3edf09a5eb
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
e265bf6fe5
test that reassociate can handle shifts
...
llvm-svn: 21760
2005-05-07 04:23:29 +00:00
Chris Lattner
b1ea71fbcd
Simplify the code and rearrange it. No major functionality changes here.
...
llvm-svn: 21759
2005-05-07 04:08:02 +00:00
Jeff Cohen
eafa15885e
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
fc887cc3da
add note about bit builtins newly supported
...
llvm-svn: 21757
2005-05-07 02:21:21 +00:00
Chris Lattner
d6906dc6af
new testcase
...
llvm-svn: 21756
2005-05-07 02:16:08 +00:00
Chris Lattner
b25579d09b
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
069d6762aa
add a couple of notes
...
llvm-svn: 21754
2005-05-06 23:08:23 +00:00
Chris Lattner
5ba10fa79c
document calling convention extensions
...
llvm-svn: 21753
2005-05-06 22:57:40 +00:00
Chris Lattner
f6775e16bf
remove some dead (always dynamically false) flags
...
llvm-svn: 21752
2005-05-06 22:35:09 +00:00
Chris Lattner
1f6d3b2344
encode calling conventions for call/invoke instructions.
...
llvm-svn: 21751
2005-05-06 22:34:01 +00:00
Chris Lattner
d1e76535b2
new testcase
...
llvm-svn: 21750
2005-05-06 22:33:44 +00:00
Chris Lattner
494f3da7b3
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
562734e130
parse new calling conv specifiers
...
llvm-svn: 21748
2005-05-06 20:27:19 +00:00
Chris Lattner
de5b492521
wrap a longline
...
llvm-svn: 21747
2005-05-06 20:27:03 +00:00
Chris Lattner
26a44493ef
add support for explicit calling conventions
...
llvm-svn: 21746
2005-05-06 20:26:43 +00:00
Chris Lattner
d2dfcb3c0e
Add support for explicit calling conventions
...
llvm-svn: 21745
2005-05-06 20:26:26 +00:00
Chris Lattner
b1952fe785
New file
...
llvm-svn: 21744
2005-05-06 19:59:08 +00:00
Chris Lattner
0995b3da02
use splice instead of remove/insert for a minor speedup
...
llvm-svn: 21743
2005-05-06 19:58:35 +00:00
Chris Lattner
146014b748
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
c9be572154
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
1bc2753d69
clean up the CBE output a bit
...
llvm-svn: 21740
2005-05-06 06:58:42 +00:00
Chris Lattner
f70b2785b7
add tail marker as a comment
...
llvm-svn: 21739
2005-05-06 06:53:07 +00:00
Chris Lattner
4e9d804f1d
Make the stub functions be tail calls
...
llvm-svn: 21738
2005-05-06 06:48:54 +00:00
Chris Lattner
146447f57a
Preserve tail marker
...
llvm-svn: 21737
2005-05-06 06:48:21 +00:00
Chris Lattner
0187977904
Implement Transforms/Inline/inline-tail.ll
...
llvm-svn: 21736
2005-05-06 06:47:52 +00:00
Chris Lattner
170a0f7d6b
Make sure to not accidentally get a bogus tail marker
...
llvm-svn: 21735
2005-05-06 06:47:37 +00:00
Chris Lattner
3d4098b1e0
preserve the tail marker
...
llvm-svn: 21734
2005-05-06 06:46:58 +00:00
Chris Lattner
027639a16c
add a default arg
...
llvm-svn: 21733
2005-05-06 06:22:10 +00:00
Chris Lattner
0080700e0c
Don't forget these are calls
...
llvm-svn: 21730
2005-05-06 06:21:59 +00:00
Chris Lattner
47c5cd63f6
lex tail
...
llvm-svn: 21729
2005-05-06 06:20:33 +00:00
Chris Lattner
e43f733387
test that tail call survives bytecodification
...
llvm-svn: 21728
2005-05-06 06:18:33 +00:00
Chris Lattner
59d23baab1
add bytecode reader support for tail calls
...
llvm-svn: 21727
2005-05-06 06:13:34 +00:00
Chris Lattner
f68bbda9d4
Hilight tail
...
llvm-svn: 21726
2005-05-06 06:07:34 +00:00
Chris Lattner
a667732618
These are legal for tail calls
...
llvm-svn: 21723
2005-05-06 05:59:50 +00:00
Chris Lattner
72ffd7e7d5
Add a 'tail' marker for call instructions, patch contributed by
...
Alexander Friedman.
llvm-svn: 21722
2005-05-06 05:51:46 +00:00
Chris Lattner
3cbfbba4f7
Add info on new 'tail' marker
...
llvm-svn: 21721
2005-05-06 05:47:36 +00:00
Chris Lattner
99db0ab3df
Wrap long lines
...
llvm-svn: 21720
2005-05-06 05:34:40 +00:00
Chris Lattner
b953e27f85
DCE intrinsic instructions without side effects.
...
llvm-svn: 21719
2005-05-06 05:27:34 +00:00
Chris Lattner
4f7bba1106
These intrinsics do not access memory
...
llvm-svn: 21718
2005-05-06 05:21:04 +00:00
Chris Lattner
2b4c801d10
Teach instcombine propagate zeroness through shl instructions, implementing
...
and.ll:test31
llvm-svn: 21717
2005-05-06 04:53:20 +00:00
Chris Lattner
d3797164f9
new testcases
...
llvm-svn: 21716
2005-05-06 04:52:46 +00:00
Chris Lattner
ead76729cc
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 :)
llvm-svn: 21715
2005-05-06 04:18:52 +00:00
Chris Lattner
8f567bbc2a
new testcase
...
llvm-svn: 21714
2005-05-06 04:11:32 +00:00
Chris Lattner
20b5bce229
Implement xor.ll:test22
...
llvm-svn: 21713
2005-05-06 02:07:39 +00:00
Chris Lattner
27f6e62cac
implement and.ll:test30 and set.ll:test21
...
llvm-svn: 21712
2005-05-06 01:53:19 +00:00
Chris Lattner
88ef664af0
new testcase for unneeded and
...
llvm-svn: 21711
2005-05-06 01:52:52 +00:00
Chris Lattner
a2b995acae
new testcase
...
llvm-svn: 21710
2005-05-06 01:51:05 +00:00
Chris Lattner
d38c600c9d
implement or.ll:test20
...
llvm-svn: 21709
2005-05-06 00:58:50 +00:00