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
Chris Lattner
1f2cdab20f
new testcase
...
llvm-svn: 21708
2005-05-06 00:58:09 +00:00
Misha Brukman
1996bf6ea5
* Order #includes alphabetically
...
* Remove commented-out debug printouts
llvm-svn: 21707
2005-05-05 23:45:17 +00:00
Misha Brukman
d29b27d73b
Remove extra blank line
...
llvm-svn: 21706
2005-05-05 23:43:47 +00:00
Misha Brukman
3ae7b6af05
* Use consistent spacing for function arguments
...
* Output single-character strings as chars
llvm-svn: 21705
2005-05-05 22:38:21 +00:00
Misha Brukman
f52511fcc6
Remove vim settings from source code; people should use llvm/utils/vim/vimrc
...
llvm-svn: 21704
2005-05-05 22:33:09 +00:00
Misha Brukman
e2e8059814
Convert tabs to spaces
...
llvm-svn: 21703
2005-05-05 22:30:40 +00:00
Chris Lattner
3e946df29b
new testcase for PR541
...
llvm-svn: 21702
2005-05-05 22:23:10 +00:00
Chris Lattner
64134a43a1
add support for undef values of opaque type, addressing PR541
...
llvm-svn: 21701
2005-05-05 22:21:19 +00:00
Chris Lattner
c390fbea0d
Add some extra checks. Opaque types don't have a null marker.
...
llvm-svn: 21700
2005-05-05 20:57:00 +00:00
Chris Lattner
f83598edd5
new testcase
...
llvm-svn: 21699
2005-05-05 17:57:24 +00:00