Chris Lattner
a5110e854d
add stacksave/stackrestore nodes
...
llvm-svn: 25270
2006-01-13 02:39:42 +00:00
Chris Lattner
6c9c250dcd
Add "support" for stacksave/stackrestore to the dag isel
...
llvm-svn: 25268
2006-01-13 02:24:42 +00:00
Chris Lattner
3b2b0aff0c
Add "support" for the llvm.stacksave/stackrestore intrinsics, this is
...
used by the C backend.
llvm-svn: 25267
2006-01-13 02:22:08 +00:00
Chris Lattner
3470b5dee6
Add a simple missing fold to produce this:
...
subfic r3, r2, 33
instead of this:
subfic r2, r2, 32
addi r3, r2, 1
llvm-svn: 25255
2006-01-12 20:22:43 +00:00
Chris Lattner
3760e901cf
If using __main, emit global ctor/dtor list like any other global
...
llvm-svn: 25251
2006-01-12 19:17:23 +00:00
Chris Lattner
b1ee616de9
Don't create rotate instructions in unsupported types, because we don't have
...
promote/expand code yet. This fixes the 177.mesa failure on PPC.
llvm-svn: 25250
2006-01-12 18:57:33 +00:00
Evan Cheng
7f4ec8274f
Allow custom lowering of DYNAMIC_STACKALLOC.
...
llvm-svn: 25224
2006-01-11 22:14:47 +00:00
Evan Cheng
982493300e
ignore register #0
...
llvm-svn: 25223
2006-01-11 22:13:48 +00:00
Nate Begeman
1b8121b227
Add bswap, rotl, and rotr nodes
...
Add dag combiner code to recognize rotl, rotr
Add ppc code to match rotl
Targets should add rotl/rotr patterns if they have them
llvm-svn: 25222
2006-01-11 21:21:00 +00:00
Chris Lattner
fb5f46541c
silence a warning
...
llvm-svn: 25184
2006-01-10 19:43:26 +00:00
Robert Bocchino
2c966e7617
Added selection DAG support for the extractelement operation.
...
llvm-svn: 25179
2006-01-10 19:04:57 +00:00
Chris Lattner
b05fce676f
Minor cleanup, no functionality change for current targets
...
llvm-svn: 25173
2006-01-10 05:41:59 +00:00
Chris Lattner
90ba544826
Fix an exponential function in libcall insertion to not be exponential. :)
...
llvm-svn: 25165
2006-01-09 23:21:49 +00:00
Evan Cheng
870e4f8e38
* Allow custom lowering of ADD_PARTS, SUB_PARTS, SHL_PARTS, SRA_PARTS,
...
and SRL_PARTS.
* Fix a bug that caused *_PARTS to be custom lowered twice.
llvm-svn: 25157
2006-01-09 18:31:59 +00:00
Evan Cheng
53a1f57fc5
New getNode() variants.
...
llvm-svn: 25156
2006-01-09 18:29:18 +00:00
Chris Lattner
fae8afb77f
Unbreak the build :(
...
llvm-svn: 25124
2006-01-06 05:47:48 +00:00
Evan Cheng
85c973cda9
Revert the previous check-in. Leave shl x, 1 along for target to deal with.
...
llvm-svn: 25121
2006-01-06 01:56:02 +00:00
Evan Cheng
b03f9b32d2
fold (shl x, 1) -> (add x, x)
...
llvm-svn: 25120
2006-01-06 01:06:31 +00:00
Evan Cheng
f35b1c837f
Support for custom lowering of ISD::RET.
...
llvm-svn: 25116
2006-01-06 00:41:43 +00:00
Jim Laskey
762e9ec06c
Added initial support for DEBUG_LABEL allowing debug specific labels to be
...
inserted in the code.
llvm-svn: 25104
2006-01-05 01:25:28 +00:00
Jim Laskey
219d559824
Applied some recommend changes from sabre. The dominate one beginning "let the
...
pass manager do it's thing." Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.
llvm-svn: 25100
2006-01-04 22:28:25 +00:00
Jim Laskey
0da76a676a
Add unique id to debug location for debug label use (work in progress.)
...
llvm-svn: 25096
2006-01-04 15:04:11 +00:00
Jim Laskey
2741e8304c
Add check for debug presence.
...
llvm-svn: 25095
2006-01-04 14:30:12 +00:00
Jim Laskey
b0609d91c3
Tie dwarf generation to darwin assembler.
...
llvm-svn: 25093
2006-01-04 13:52:30 +00:00
Jim Laskey
57a5e0b45a
Moving MachineDebugInfo to module level location.
...
llvm-svn: 25090
2006-01-04 13:43:56 +00:00
Jim Laskey
6f9ff633a6
Change how MachineDebugInfo is fetched.
...
llvm-svn: 25089
2006-01-04 13:42:59 +00:00
Jim Laskey
44317393f8
Extending MachineDebugInfo.
...
llvm-svn: 25086
2006-01-04 13:36:38 +00:00
Chris Lattner
227e936650
Add support for targets (like Alpha) that have terminator instructions which
...
use virtual registers. We now allow the first instruction in a block of
terminators to use virtual registers, and update phi elimination to correctly
update livevar when eliminating phi's. This fixes a problem on a testcase
Andrew sent me.
llvm-svn: 25083
2006-01-04 07:12:21 +00:00
Chris Lattner
0511055276
Add an assertion, update DefInst even though no one uses it (dangling pointers
...
don't help anyone)
llvm-svn: 25081
2006-01-04 06:47:48 +00:00
Chris Lattner
be45b5e948
Add a LiveVariables::VarInfo::dump method
...
llvm-svn: 25080
2006-01-04 05:40:30 +00:00
Chris Lattner
b723c33614
Change a variable from being an iterator to a raw MachineInstr*, to make
...
GDB use tolerable
llvm-svn: 25064
2006-01-03 07:41:37 +00:00
Nate Begeman
164db3a7eb
Make sure to pass the offset into the new node, so that we don't silently
...
drop it on the floor.
llvm-svn: 25044
2005-12-30 00:10:38 +00:00
Duraid Madina
fb6a914ca7
purity++
...
llvm-svn: 25041
2005-12-29 05:59:19 +00:00
Duraid Madina
26b037e762
add these so I can be less naughty
...
llvm-svn: 25034
2005-12-28 06:29:02 +00:00
Duraid Madina
e47d9d0e92
HB is *the* code janitor.
...
llvm-svn: 25031
2005-12-28 04:55:42 +00:00
Duraid Madina
7c3dcb6892
mixed-STL programs are big and nasty :(
...
llvm-svn: 25030
2005-12-28 02:44:35 +00:00
Andrew Lenharth
30db2ec59f
allow custom lowering to return null for legal results
...
llvm-svn: 25007
2005-12-25 01:07:37 +00:00
Andrew Lenharth
7259426d88
Support Custom lowering of a few more operations.
...
Alpha needs to custom lower *DIV and *REM
llvm-svn: 25006
2005-12-24 23:42:32 +00:00
Jim Laskey
bdba3e2a46
Remove redundant debug locations.
...
llvm-svn: 24995
2005-12-23 20:08:28 +00:00
Chris Lattner
c7037abc5b
unbreak the build :-/
...
llvm-svn: 24992
2005-12-23 16:12:20 +00:00
Evan Cheng
31d15fa093
Allow custom lowering of LOAD, EXTLOAD, ZEXTLOAD, STORE, and TRUNCSTORE. Not
...
currently used.
llvm-svn: 24988
2005-12-23 07:29:34 +00:00
Chris Lattner
26943b9691
Simplify store(bitconv(x)) to store(x). This allows us to compile this:
...
void bar(double Y, double *X) {
*X = Y;
}
to this:
bar:
save -96, %o6, %o6
st %i1, [%i2+4]
st %i0, [%i2]
restore %g0, %g0, %g0
retl
nop
instead of this:
bar:
save -104, %o6, %o6
st %i1, [%i6+-4]
st %i0, [%i6+-8]
ldd [%i6+-8], %f0
std %f0, [%i2]
restore %g0, %g0, %g0
retl
nop
on sparcv8.
llvm-svn: 24983
2005-12-23 05:48:07 +00:00
Chris Lattner
54560f6887
fold (conv (load x)) -> (load (conv*)x).
...
This allows us to compile this:
void foo(double);
void bar(double *X) { foo(*X); }
To this:
bar:
save -96, %o6, %o6
ld [%i0+4], %o1
ld [%i0], %o0
call foo
nop
restore %g0, %g0, %g0
retl
nop
instead of this:
bar:
save -104, %o6, %o6
ldd [%i0], %f0
std %f0, [%i6+-8]
ld [%i6+-4], %o1
ld [%i6+-8], %o0
call foo
nop
restore %g0, %g0, %g0
retl
nop
on SparcV8.
llvm-svn: 24982
2005-12-23 05:44:41 +00:00
Chris Lattner
efbbedbf4a
Fold bitconv(bitconv(x)) -> x. We now compile this:
...
void foo(double);
void bar(double X) { foo(X); }
to this:
bar:
save -96, %o6, %o6
or %g0, %i0, %o0
or %g0, %i1, %o1
call foo
nop
restore %g0, %g0, %g0
retl
nop
instead of this:
bar:
save -112, %o6, %o6
st %i1, [%i6+-4]
st %i0, [%i6+-8]
ldd [%i6+-8], %f0
std %f0, [%i6+-16]
ld [%i6+-12], %o1
ld [%i6+-16], %o0
call foo
nop
restore %g0, %g0, %g0
retl
nop
on V8.
llvm-svn: 24981
2005-12-23 05:37:50 +00:00
Chris Lattner
a187460552
constant fold bits_convert in getNode and in the dag combiner for fp<->int
...
conversions. This allows V8 to compiles this:
void %test() {
call float %test2( float 1.000000e+00, float 2.000000e+00, double 3.000000e+00, double* null )
ret void
}
into:
test:
save -96, %o6, %o6
sethi 0, %o3
sethi 1049088, %o2
sethi 1048576, %o1
sethi 1040384
, %o0
or %g0, %o3, %o4
call test2
nop
restore %g0, %g0, %g0
retl
nop
instead of:
test:
save -112, %o6, %o6
sethi 0, %o4
sethi 1049088, %l0
st %o4, [%i6+-12]
st %l0, [%i6+-16]
ld [%i6+-12], %o3
ld [%i6+-16], %o2
sethi 1048576, %o1
sethi 1040384
, %o0
call test2
nop
restore %g0, %g0, %g0
retl
nop
llvm-svn: 24980
2005-12-23 05:30:37 +00:00
Chris Lattner
884eb3adc3
Fix a pasto
...
llvm-svn: 24973
2005-12-23 00:52:30 +00:00
Chris Lattner
9eae8d5d03
fix a thinko in the bit_convert handling code
...
llvm-svn: 24972
2005-12-23 00:50:25 +00:00
Chris Lattner
36e663d6e1
add very simple support for the BIT_CONVERT node
...
llvm-svn: 24970
2005-12-23 00:16:34 +00:00
Chris Lattner
177d7af5d5
remove dead code
...
llvm-svn: 24965
2005-12-22 21:16:08 +00:00
Chris Lattner
1408c05a8b
The 81st column doesn't like code in it.
...
llvm-svn: 24943
2005-12-22 05:23:45 +00:00