Commit Graph

21649 Commits

Author SHA1 Message Date
Duraid Madina
b5186853f8 getting there...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25021 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 13:48:44 +00:00
Duraid Madina
4c4e12fb1f more standards compliance (damn, I can't wait for unordered_set (tee hee)
and unordered_map to make it into the standard)

Hurry up, JTC1 SC22 WG21 Library Working Group!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25020 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 13:34:00 +00:00
Duraid Madina
bb35a113db I laugh at your dual-core G5s! Fear my precompiled headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25019 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 10:34:38 +00:00
Duraid Madina
4547e2252c dum de dum
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25018 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 10:24:15 +00:00
Evan Cheng
2b4ea795a2 Added field noResults to Instruction.
Currently tblgen cannot tell which operands in the operand list are results so
it assumes the first one is a result. This is bad. Ideally we would fix this
by separating results from inputs, e.g. (res R32:$dst),
(ops R32:$src1, R32:$src2). But that's a more distruptive change. Adding
'let noResults = 1' is the workaround to tell tblgen that the instruction does
not produces a result. It works for now since tblgen does not support
instructions which produce multiple results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25017 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 09:11:45 +00:00
Duraid Madina
2abbe867ab i love xmas!!!! *;D*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25016 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 08:36:53 +00:00
Duraid Madina
3e317534c7 more HP-UX cleanliness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25015 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 08:35:06 +00:00
Duraid Madina
6fb9a84e79 more standards-compliance stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25014 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 05:08:55 +00:00
Duraid Madina
a7df3c9cc3 HP aCC chokes on this, but it's not required anyway: according to
the bzip2 homepage, only ancient (gcc 2.7.x ?) versions of GCC
require this? It certainly isn't needed for the current bzip2
sources.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25013 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 05:00:25 +00:00
Duraid Madina
786e3e22a9 MERRY CHRISTMAS EVERYONE!!! (what better way to spend christmas than
to try building LLVM on HP-UX! (the Right Way seems to be to tear out
the ancient STL that HP ship and use http://incubator.apache.org/stdcxx/ )


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25012 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 04:56:16 +00:00
Andrew Lenharth
eececbab32 add br pattern, unify JSR and BSR ISel instrs, and add BSR support for DAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25011 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-25 17:36:48 +00:00
Duraid Madina
b13d74a49a unbreak calls, a few more tests should run. Tomorrow: bugpoint!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25010 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-25 14:09:08 +00:00
Duraid Madina
806b89382a we don't feed our call instructions extra operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25009 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-25 14:07:01 +00:00
Andrew Lenharth
53d8970625 All that just to lower div and rem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25008 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-25 01:34:27 +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
Andrew Lenharth
330851a8f6 support targetexternalsym
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25005 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 23:36:59 +00:00
Evan Cheng
e4672aa5b4 Let the helper functions know about X86::FR32RegClass and X86::FR64RegClass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25004 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 09:48:35 +00:00
Andrew Lenharth
c687b48741 All addressing modes are now exposed. The only remaining relocated forms
are for function prologue.

TODO: move external symbols over to using RelLit.
    : have a pattern that matches constpool|globaladdr
    : have a pattern that matches (add x imm) -> x, imm or (...) -> ..., 0


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25003 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 08:29:32 +00:00
Andrew Lenharth
b6718607c5 Unify the patterns for loads and stores. Now offset addressing should be
supported.  This almost completes memory operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25002 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 07:34:33 +00:00
Andrew Lenharth
4e62951282 Let's see if we can break things.
Lower GOT relative addresses to Lo and HI.
Update both ISels to select them when they can.
Saves instructions here and there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25001 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 05:36:33 +00:00
Andrew Lenharth
9fa4d4c7c4 move loads and stores over. Smart addr selection comming
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25000 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 03:41:56 +00:00
Nate Begeman
50fb3c4986 Fix one of the things in the todo file, and get a bit closer to folding
constant offsets from statics into the address arithmetic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24999 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 01:00:15 +00:00
Reid Spencer
443045a816 For PR625:
Don't install contents of CVS directories and don't double install when
srcdir == objdir.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24998 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 22:27:56 +00:00
Evan Cheng
171049d10f * Removed the use of FLAG. Now use hasFlagIn and hasFlagOut instead.
* Added a pseudo instruction (for each target) that represent "return void".
  This is a workaround for lack of optional flag operand (return void is not
  lowered so it does not have a flag operand.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24997 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 22:14:32 +00:00
Evan Cheng
7b05bd5814 * Support for hasInFlag and hasOutFlag (on instructions). Remove nameless FLAG
support which is fragile.
* Fixed a number of bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24996 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 22:11:47 +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
72f49aae17 this test fails
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24994 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 16:14:29 +00:00
Chris Lattner
cf4a81e56f this test is malformed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24993 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 16:13:52 +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
Chris Lattner
2170cef707 not a good idea
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24991 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 07:37:47 +00:00
Evan Cheng
38bcbaf23e More X86 floating point patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24990 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 07:31:11 +00:00
Evan Cheng
d13b00e103 Operand 1 of TRUNCSTORE can be any of integer and floating point types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24989 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 07:30:30 +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
330ea12667 fix something-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24987 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 07:08:39 +00:00
Chris Lattner
74fa64b072 implement vaarg. Varargs now should work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24986 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 06:37:38 +00:00
Chris Lattner
c4769bb529 implement vastart. The dag isel compiles this:
void test3(va_list Y);
void test2(int F, ...) {
  va_list X;
  va_start(X, F);
  test3(X);
}

into this:

test2:
        save -104, %o6, %o6
        st %i5, [%i6+88]
        st %i4, [%i6+84]
        st %i3, [%i6+80]
        st %i2, [%i6+76]
        st %i1, [%i6+72]
        add %i6, 72, %o0
        st %o0, [%i6+-4]
        call test3
        nop
        restore %g0, %g0, %g0
        retl
        nop

The simple isel emits:

test2:
        save -96, %o6, %o6
        st %i0, [%i6+68]
        st %i1, [%i6+72]
        st %i2, [%i6+76]
        st %i3, [%i6+80]
        st %i4, [%i6+84]
        st %i5, [%i6+88]
        or %g0, 1, %l0
        or %g0, 4, %l1
        umul %l0, %l1, %l0
        add %l0, 7, %l0
        and %l0, -8, %l0
        sub %o6, %l0, %o6
        add %o6, 96, %l0
        add %i6, 72, %l1
        st %l1, [%l0]
        ld [%l0], %o0
        call test3
        nop
        restore %g0, %g0, %g0
        retl
        nop


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24985 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 06:24:04 +00:00
Chris Lattner
e6ee868a8d remove benchmark list, remove issues addressed by the dag-dag isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24984 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 06:09:30 +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
Chris Lattner
c8547d856d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24981 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:37:50 +00:00
Chris Lattner
94683777ae 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24980 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:30:37 +00:00
Chris Lattner
21f66859e4 make sure bit_convert's are expanded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24979 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:15:23 +00:00
Chris Lattner
53e884587b make sure bit_converts are expanded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24978 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:13:35 +00:00
Jeff Cohen
46e1ee9791 Get bugpoint building with VC++ again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24977 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:00:38 +00:00
Chris Lattner
3cb7187d5f fix the int<->fp instructions, which apparently take a single float register
to represent the int part (because it's always 32-bits)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24976 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:00:16 +00:00
Chris Lattner
a01874fc89 Use BIT_CONVERT to simplify this code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24975 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 02:31:39 +00:00
Chris Lattner
1b95e0ba92 Simplify some code by using BIT_CONVERT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24974 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:59:59 +00:00
Chris Lattner
232348d66f Fix a pasto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24973 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:52:30 +00:00
Chris Lattner
ed7b5babfb fix a thinko in the bit_convert handling code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24972 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:50:25 +00:00