Reid Spencer
ba222e3e99
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
...
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.
llvm-svn: 22057
2005-05-15 16:13:11 +00:00
Chris Lattner
45a64e1020
add a sparcv8 section, make this validate
...
llvm-svn: 22056
2005-05-15 16:01:20 +00:00
Chris Lattner
5ce43325f4
more edits, add anchors
...
llvm-svn: 22055
2005-05-15 15:33:21 +00:00
Duraid Madina
03a7327d63
make angry compilers happy again
...
llvm-svn: 22054
2005-05-15 14:44:13 +00:00
Duraid Madina
f4ca48c89e
aCC and STLport complained about this, because they're like that
...
llvm-svn: 22053
2005-05-15 13:05:48 +00:00
Chris Lattner
5d60e7dc29
edits to the simplify-libcalls element, move it higher in the list.
...
llvm-svn: 22052
2005-05-15 06:09:55 +00:00
Chris Lattner
27648bb242
add generated code
...
llvm-svn: 22051
2005-05-15 06:07:40 +00:00
Chris Lattner
95650a26b2
don't reserve space for tailcall arg areas. It explicitly managed.
...
llvm-svn: 22050
2005-05-15 06:07:10 +00:00
Reid Spencer
90b3a2968f
Make note of the -simplify-libcalls pass.
...
llvm-svn: 22049
2005-05-15 06:05:11 +00:00
Chris Lattner
4b72dca53e
add test to check for tail calls
...
llvm-svn: 22048
2005-05-15 05:52:51 +00:00
Chris Lattner
2fd2e53f6a
Teach reginfo how to deal with ADJSTACKPTRri, allowing us to generate:
...
add %ESP, 20
jmp %EDX # TAIL CALL
instead of:
add %ESP, -8
add %ESP, 28
jmp %EDX # TAIL CALL
llvm-svn: 22047
2005-05-15 05:49:58 +00:00
Chris Lattner
77f8c2cece
Implement proper tail calls in the X86 backend for all fastcc->fastcc
...
tail calls.
llvm-svn: 22046
2005-05-15 05:46:45 +00:00
Chris Lattner
32c523794d
Substantial edits for the release notes.
...
llvm-svn: 22045
2005-05-15 05:44:51 +00:00
Chris Lattner
811dc49f55
Add some simplifications for MULH[SU]. This allows us to compile this:
...
long %bar(long %X) {
%Y = mul long %X, 4294967297
ret long %Y
}
to this:
l1_bar:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, %EAX
add %EDX, DWORD PTR [%ESP + 8]
ret
instead of:
l1_bar:
mov %ECX, DWORD PTR [%ESP + 4]
mov %EDX, 1
mov %EAX, %ECX
mul %EDX
add %EDX, %ECX
add %EDX, DWORD PTR [%ESP + 8]
mov %EAX, %ECX
ret
llvm-svn: 22044
2005-05-15 05:39:08 +00:00
Chris Lattner
7327c042b4
Add markers in the asm file for tail calls, add a new ADJSTACKPTRri
...
sorta-pseudo-instruction
llvm-svn: 22042
2005-05-15 03:10:37 +00:00
Chris Lattner
54bf1cc313
When inserting callee-save register reloads, make sure to skip over any
...
terminator instructions before the 'ret' in case the target has a
multi-instruction return sequence.
llvm-svn: 22041
2005-05-15 03:09:58 +00:00
Chris Lattner
64232a8480
Yes, calltarget is the operand of the day.
...
llvm-svn: 22040
2005-05-15 01:10:30 +00:00
Chris Lattner
b7c5669c14
Make sure this is not eligible for tail-call-elimination so that we test
...
the correct thing.
llvm-svn: 22039
2005-05-14 23:54:55 +00:00
Chris Lattner
adb31a99fa
When emitting the function epilog, check to see if there already a stack
...
adjustment. If so, we merge the adjustment into the existing one. This
allows us to generate:
caller2:
sub %ESP, 12
mov DWORD PTR [%ESP], 0
mov %EAX, 1234567890
mov %EDX, 0
call func2
add %ESP, 8
ret 4
intead of:
caller2:
sub %ESP, 12
mov DWORD PTR [%ESP], 0
mov %EAX, 1234567890
mov %EDX, 0
call func2
sub %ESP, 4
add %ESP, 12
ret 4
for X86/fast-cc-merge-stack-adj.ll
llvm-svn: 22038
2005-05-14 23:53:43 +00:00
Chris Lattner
b87c89a574
new testcase
...
llvm-svn: 22037
2005-05-14 23:52:09 +00:00
Chris Lattner
37e226fa9b
Add some new instructions
...
llvm-svn: 22036
2005-05-14 23:35:21 +00:00
Chris Lattner
e0e8f7a3b4
add x86-64 abi
...
llvm-svn: 22035
2005-05-14 22:06:42 +00:00
Reid Spencer
bc4d4c20bb
* Truncate a long line.
...
* By default, doxygen output formatted for printing on letter size paper
not A4.
llvm-svn: 22034
2005-05-14 20:06:31 +00:00
Reid Spencer
9c7bfc232e
Forgot to commit this earlier. Its part of the simplify-libcalls
...
enhancement for ffs, ffsl, and ffsll optimizations. We can't do the opt
unless we also have the at least ffsll function. Notably SVR4 doesn't.
llvm-svn: 22033
2005-05-14 20:04:19 +00:00
Andrew Lenharth
126bbd2bdc
mention the C++ exception problems on alpha
...
llvm-svn: 22029
2005-05-14 17:43:00 +00:00
Reid Spencer
52c1813108
Add a test case for testing ffs libcall conversion to constant
...
llvm-svn: 22028
2005-05-14 16:44:43 +00:00
Reid Spencer
9cd1000c52
Changes for ffs lib call simplification:
...
* Check for availability of ffsll call in configure script
* Support ffs, ffsl, and ffsll conversion to constant value if the argument
is constant.
llvm-svn: 22027
2005-05-14 16:42:52 +00:00
Chris Lattner
46de5c99bd
Fix construction of ioport intrinsics, fixing X86/io.llx and io-port.llx
...
llvm-svn: 22026
2005-05-14 13:56:55 +00:00
Chris Lattner
bcd4c17bfd
Preserve calling conv when hacking on calls
...
llvm-svn: 22025
2005-05-14 12:28:32 +00:00
Chris Lattner
7771ae3fcc
preserve calling conventions when hacking on code
...
llvm-svn: 22024
2005-05-14 12:25:32 +00:00
Chris Lattner
214f1a8cf9
Make sure to preserve the calling convention when changing an invoke into
...
a call. This fixes Prolangs-C++/deriv2, kimwitu++, and Misc-C++/bigfib
on X86 with -enable-x86-fastcc.
llvm-svn: 22023
2005-05-14 12:21:56 +00:00
Chris Lattner
9d106c705d
Pass i64 values correctly split in reg/mem to fastcc calls.
...
This fixes fourinarow with -enable-x86-fastcc.
llvm-svn: 22022
2005-05-14 12:03:10 +00:00
Chris Lattner
adde8b1a71
Use target-specific nodes for calls. This allows the fastcc code to not have
...
to do ugly hackery to avoid emitting code like this:
call foo
mov vreg, EAX
adjcallstackup ...
If foo is a fastcc call and if vreg gets spilled, we might end up with this:
call foo
mov [ESP+offset], EAX ;; Offset doesn't consider the 12!
sub ESP, 12
Which is bad. The previous hacky code to deal with this was A) gross B) not
good enough. In particular, it could miss cases and emit the bad code above.
Now we always emit this:
call foo
adjcallstackup ...
mov vreg, EAX
directly.
This makes fastcc with callees poping the stack work much better. Next
stop (finally!) really is tail calls.
llvm-svn: 22021
2005-05-14 08:48:15 +00:00
Chris Lattner
052759b78c
allow token chain at start or end of node
...
llvm-svn: 22020
2005-05-14 08:34:53 +00:00
Chris Lattner
d9e36f94bb
remove special case hacks for readport/readio from the binary operator
...
codepath
llvm-svn: 22019
2005-05-14 07:45:46 +00:00
Chris Lattner
d1d8fbee2d
Implement fixme's by memoizing nodes.
...
llvm-svn: 22018
2005-05-14 07:42:29 +00:00
Chris Lattner
b9ccf966b8
add a new map
...
llvm-svn: 22017
2005-05-14 07:36:02 +00:00
Chris Lattner
ac7d55f114
Turn this into a wrapper for a simpler version of getNode.
...
llvm-svn: 22016
2005-05-14 07:32:14 +00:00
Chris Lattner
a035798c4b
Eliminate special purpose hacks for dynamic_stack_alloc.
...
llvm-svn: 22015
2005-05-14 07:29:57 +00:00
Chris Lattner
b94e243d14
Use the general mechanism for creating multi-value nodes instead of using
...
special case hacks.
llvm-svn: 22014
2005-05-14 07:25:05 +00:00
Chris Lattner
918a411976
Ensure these casts are done with the hardware fildll instruction
...
llvm-svn: 22013
2005-05-14 07:09:25 +00:00
Chris Lattner
c0c6680744
use a target-specific node and custom expander to lower long->FP to FILD64m.
...
This should fix some missing symbols problems on BSD and improve performance
of programs that use that operation.
llvm-svn: 22012
2005-05-14 06:52:07 +00:00
Chris Lattner
ad411081fb
Wrap long line, actually add node to the graph.
...
llvm-svn: 22011
2005-05-14 06:42:57 +00:00
Chris Lattner
6f7b63c7d7
legalize target-specific operations
...
llvm-svn: 22010
2005-05-14 06:34:48 +00:00
Chris Lattner
1afb5ae575
add a getNode() version that allows construction of any node type.
...
llvm-svn: 22009
2005-05-14 06:20:26 +00:00
Chris Lattner
1032d777e6
Add a way to construct an arbitrary node, cleanly.
...
llvm-svn: 22008
2005-05-14 06:20:08 +00:00
Chris Lattner
3afe2d8d83
add accessors
...
llvm-svn: 22007
2005-05-14 06:19:11 +00:00
Reid Spencer
a684a28474
Some minor adjustments for the 1.5 release.
...
llvm-svn: 22006
2005-05-14 05:52:07 +00:00
Chris Lattner
ae59fdbd99
Pass the dag into LowerOperation
...
llvm-svn: 22005
2005-05-14 05:51:05 +00:00
Chris Lattner
6e81a4090f
LowerOperation takes a dag
...
llvm-svn: 22004
2005-05-14 05:50:48 +00:00