Commit Graph

2076 Commits

Author SHA1 Message Date
Chris Lattner
5f652295c2 Fix custom lowering of dynamic_stackalloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25329 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 08:43:08 +00:00
Chris Lattner
cc0aad20dd add a missing node name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25327 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 08:39:35 +00:00
Chris Lattner
c0ab5226cc Token chain results are not always the first or last result. Consider copyfromreg nodes, where they are the middle result (the flag result is last)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25325 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 22:41:46 +00:00
Nate Begeman
3a04ffbf6d Remove some duplicated code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 03:18:27 +00:00
Nate Begeman
d88fc03602 bswap implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 03:14:10 +00:00
Chris Lattner
4f0d8e4018 If a target specified a stack pointer with setStackPointerRegisterToSaveRestore,
lower STACKSAVE/STACKRESTORE into a copy from/to that register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25276 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 17:48:44 +00:00
Chris Lattner
140d53c99c Compile llvm.stacksave/restore into STACKSAVE/STACKRESTORE nodes, and allow
targets to custom expand them as they desire.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25273 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:50:02 +00:00
Chris Lattner
5a67afc118 add stacksave/stackrestore nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25270 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:39:42 +00:00
Chris Lattner
e8f7a4bbee Add "support" for stacksave/stackrestore to the dag isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25268 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:24:42 +00:00
Chris Lattner
0c067bc11d Add "support" for the llvm.stacksave/stackrestore intrinsics, this is
used by the C backend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25267 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:22:08 +00:00
Chris Lattner
4aafb4ff92 Add a simple missing fold to produce this:
subfic r3, r2, 33

instead of this:

        subfic r2, r2, 32
        addi r3, r2, 1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25255 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 20:22:43 +00:00
Chris Lattner
5166b82866 If using __main, emit global ctor/dtor list like any other global
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25251 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 19:17:23 +00:00
Chris Lattner
af551bcf6b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25250 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 18:57:33 +00:00
Evan Cheng
a7dce3c6c2 Allow custom lowering of DYNAMIC_STACKALLOC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25224 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 22:14:47 +00:00
Evan Cheng
140e99babc ignore register #0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25223 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 22:13:48 +00:00
Nate Begeman
35ef913ec2 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25222 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 21:21:00 +00:00
Chris Lattner
269f8c0691 silence a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25184 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:43:26 +00:00
Robert Bocchino
c0f4cd9931 Added selection DAG support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25179 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:04:57 +00:00
Chris Lattner
60d97d4f55 Minor cleanup, no functionality change for current targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25173 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 05:41:59 +00:00
Chris Lattner
de387ce810 Fix an exponential function in libcall insertion to not be exponential. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25165 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 23:21:49 +00:00
Evan Cheng
05a2d568c6 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25157 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 18:31:59 +00:00
Evan Cheng
909addffc3 New getNode() variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25156 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 18:29:18 +00:00
Chris Lattner
47f5beaaaf Unbreak the build :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25124 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 05:47:48 +00:00
Evan Cheng
6907708c23 Revert the previous check-in. Leave shl x, 1 along for target to deal with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25121 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 01:56:02 +00:00
Evan Cheng
da95a84a11 fold (shl x, 1) -> (add x, x)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25120 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 01:06:31 +00:00
Evan Cheng
17c428e23d Support for custom lowering of ISD::RET.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25116 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 00:41:43 +00:00
Jim Laskey
abf6d1784b Added initial support for DEBUG_LABEL allowing debug specific labels to be
inserted in the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 01:25:28 +00:00
Jim Laskey
b2efb853f0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25100 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 22:28:25 +00:00
Jim Laskey
5bf6f25b4a Add unique id to debug location for debug label use (work in progress.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25096 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 15:04:11 +00:00
Jim Laskey
7d78a2ab7e Add check for debug presence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25095 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 14:30:12 +00:00
Jim Laskey
a7cea6f599 Tie dwarf generation to darwin assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25093 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:52:30 +00:00
Jim Laskey
f99c232506 Moving MachineDebugInfo to module level location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25090 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:43:56 +00:00
Jim Laskey
7ca9ab3f5c Change how MachineDebugInfo is fetched.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25089 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:42:59 +00:00
Jim Laskey
6af5681824 Extending MachineDebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25086 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:36:38 +00:00
Chris Lattner
2adfa7e932 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25083 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 07:12:21 +00:00
Chris Lattner
172c362fef Add an assertion, update DefInst even though no one uses it (dangling pointers
don't help anyone)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 06:47:48 +00:00
Chris Lattner
dacceef266 Add a LiveVariables::VarInfo::dump method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25080 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 05:40:30 +00:00
Chris Lattner
3b9db830f7 Change a variable from being an iterator to a raw MachineInstr*, to make
GDB use tolerable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25064 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-03 07:41:37 +00:00
Nate Begeman
512beb9465 Make sure to pass the offset into the new node, so that we don't silently
drop it on the floor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25044 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 00:10:38 +00:00
Duraid Madina
f65d917f71 purity++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25041 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-29 05:59:19 +00:00
Duraid Madina
2e096c1cbf add these so I can be less naughty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25034 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 06:29:02 +00:00
Duraid Madina
3005961701 HB is *the* code janitor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25031 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 04:55:42 +00:00
Duraid Madina
8c7bd3615a mixed-STL programs are big and nasty :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25030 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 02:44:35 +00:00
Andrew Lenharth
57030e36e4 allow custom lowering to return null for legal results
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25007 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-25 01:07:37 +00:00
Andrew Lenharth
e8f65f1e62 Support Custom lowering of a few more operations.
Alpha needs to custom lower *DIV and *REM


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25006 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 23:42:32 +00:00
Jim Laskey
d6e8d41340 Remove redundant debug locations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24995 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 20:08:28 +00:00
Chris Lattner
c26f7a033f unbreak the build :-/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24992 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 16:12:20 +00:00
Evan Cheng
f3fd9fe20d Allow custom lowering of LOAD, EXTLOAD, ZEXTLOAD, STORE, and TRUNCSTORE. Not
currently used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24988 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 07:29:34 +00:00
Chris Lattner
c33baaafb6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24983 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:48:07 +00:00
Chris Lattner
5710410dea 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24982 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:44:41 +00:00