oota-llvm.git
18 years agoMore X86 floating point patterns.
Evan Cheng [Fri, 23 Dec 2005 07:31:11 +0000 (07:31 +0000)]
More X86 floating point patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24990 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoOperand 1 of TRUNCSTORE can be any of integer and floating point types.
Evan Cheng [Fri, 23 Dec 2005 07:30:30 +0000 (07:30 +0000)]
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

18 years agoAllow custom lowering of LOAD, EXTLOAD, ZEXTLOAD, STORE, and TRUNCSTORE. Not
Evan Cheng [Fri, 23 Dec 2005 07:29:34 +0000 (07:29 +0000)]
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

18 years agofix something-o
Chris Lattner [Fri, 23 Dec 2005 07:08:39 +0000 (07:08 +0000)]
fix something-o

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24987 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoimplement vaarg. Varargs now should work.
Chris Lattner [Fri, 23 Dec 2005 06:37:38 +0000 (06:37 +0000)]
implement vaarg.  Varargs now should work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24986 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoimplement vastart. The dag isel compiles this:
Chris Lattner [Fri, 23 Dec 2005 06:24:04 +0000 (06:24 +0000)]
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

18 years agoremove benchmark list, remove issues addressed by the dag-dag isel
Chris Lattner [Fri, 23 Dec 2005 06:09:30 +0000 (06:09 +0000)]
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

18 years agoSimplify store(bitconv(x)) to store(x). This allows us to compile this:
Chris Lattner [Fri, 23 Dec 2005 05:48:07 +0000 (05:48 +0000)]
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

18 years agofold (conv (load x)) -> (load (conv*)x).
Chris Lattner [Fri, 23 Dec 2005 05:44:41 +0000 (05:44 +0000)]
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

18 years agoFold bitconv(bitconv(x)) -> x. We now compile this:
Chris Lattner [Fri, 23 Dec 2005 05:37:50 +0000 (05:37 +0000)]
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

18 years agoconstant fold bits_convert in getNode and in the dag combiner for fp<->int
Chris Lattner [Fri, 23 Dec 2005 05:30:37 +0000 (05:30 +0000)]
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

18 years agomake sure bit_convert's are expanded
Chris Lattner [Fri, 23 Dec 2005 05:15:23 +0000 (05:15 +0000)]
make sure bit_convert's are expanded

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24979 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agomake sure bit_converts are expanded
Chris Lattner [Fri, 23 Dec 2005 05:13:35 +0000 (05:13 +0000)]
make sure bit_converts are expanded

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24978 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoGet bugpoint building with VC++ again.
Jeff Cohen [Fri, 23 Dec 2005 05:00:38 +0000 (05:00 +0000)]
Get bugpoint building with VC++ again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24977 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix the int<->fp instructions, which apparently take a single float register
Chris Lattner [Fri, 23 Dec 2005 05:00:16 +0000 (05:00 +0000)]
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

18 years agoUse BIT_CONVERT to simplify this code
Chris Lattner [Fri, 23 Dec 2005 02:31:39 +0000 (02:31 +0000)]
Use BIT_CONVERT to simplify this code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24975 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSimplify some code by using BIT_CONVERT
Chris Lattner [Fri, 23 Dec 2005 00:59:59 +0000 (00:59 +0000)]
Simplify some code by using BIT_CONVERT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24974 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix a pasto
Chris Lattner [Fri, 23 Dec 2005 00:52:30 +0000 (00:52 +0000)]
Fix a pasto

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24973 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix a thinko in the bit_convert handling code
Chris Lattner [Fri, 23 Dec 2005 00:50:25 +0000 (00:50 +0000)]
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

18 years agoimprove comment: mention vectors
Chris Lattner [Fri, 23 Dec 2005 00:46:10 +0000 (00:46 +0000)]
improve comment: mention vectors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24971 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd very simple support for the BIT_CONVERT node
Chris Lattner [Fri, 23 Dec 2005 00:16:34 +0000 (00:16 +0000)]
add very simple support for the BIT_CONVERT node

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24970 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd a new node
Chris Lattner [Fri, 23 Dec 2005 00:15:59 +0000 (00:15 +0000)]
add a new node

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24969 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRevert previous patch. Additional tests fail.
Reid Spencer [Thu, 22 Dec 2005 21:46:37 +0000 (21:46 +0000)]
Revert previous patch. Additional tests fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24968 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoclean up .td file by using evan's new FLAG thing
Chris Lattner [Thu, 22 Dec 2005 21:18:39 +0000 (21:18 +0000)]
clean up .td file by using evan's new FLAG thing

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24967 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoremove a dead node
Chris Lattner [Thu, 22 Dec 2005 21:16:35 +0000 (21:16 +0000)]
remove a dead node

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24966 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoremove dead code
Chris Lattner [Thu, 22 Dec 2005 21:16:08 +0000 (21:16 +0000)]
remove dead code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24965 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix handling of weak linkage
Chris Lattner [Thu, 22 Dec 2005 21:15:17 +0000 (21:15 +0000)]
fix handling of weak linkage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24964 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix PR409:
Reid Spencer [Thu, 22 Dec 2005 21:07:29 +0000 (21:07 +0000)]
Fix PR409:
Implement the suggested check to ensure that out-of-range float constants
don't get accepted by LLVM accidentally. Adjust the supporting test cases
as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24963 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agosilence some bogus gcc warnings
Chris Lattner [Thu, 22 Dec 2005 20:37:36 +0000 (20:37 +0000)]
silence some bogus gcc warnings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24962 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFor PR351:
Reid Spencer [Thu, 22 Dec 2005 20:02:55 +0000 (20:02 +0000)]
For PR351:
Generally, remove use of fork/exec from bugpoint in favor of the portable
sys::Program::ExecuteAndWait method. This change requires two new options
to bugpoint to tell it that it is running in "child" mode. In this mode,
it reads its input and runs the passes. The result code signals to the
parent instance of bugpoint what happened (success, fail, crash).

This change should make bugpoint usable on Win32 systems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24961 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFor PR351:
Reid Spencer [Thu, 22 Dec 2005 20:00:16 +0000 (20:00 +0000)]
For PR351:
* Allow the ExecuteAndWait to return negative values if a signal is
  detected as the reason for the child termination. This is needed to
  support bugpoint detecting bad things in its child processes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24960 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix test/Regression/Other/2002-01-31-CallGraph.ll after the recent callgraph
Chris Lattner [Thu, 22 Dec 2005 19:26:06 +0000 (19:26 +0000)]
Fix test/Regression/Other/2002-01-31-CallGraph.ll after the recent callgraph
rework.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24959 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agomove some random notes out of my email into someplace useful
Chris Lattner [Thu, 22 Dec 2005 17:19:28 +0000 (17:19 +0000)]
move some random notes out of my email into someplace useful

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24956 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agothis is a hack, which may or may not hang around. In short:
Duraid Madina [Thu, 22 Dec 2005 13:29:14 +0000 (13:29 +0000)]
this is a hack, which may or may not hang around. In short:

whimper out of doing things the Right Way, and hack up a generic
'BRCALL' instruction, that gets generated when calls are lowered.
This gets selected by hand in the DAG isel, where it gets turned
into real (i.e. in tablegen) br.call instructions.

BUG: this dies on void calls, but seems to work otherwise?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24952 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agowe can't do this directly in lowering, so we need this case
Duraid Madina [Thu, 22 Dec 2005 07:14:45 +0000 (07:14 +0000)]
we can't do this directly in lowering, so we need this case

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24951 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agooops, back this out
Duraid Madina [Thu, 22 Dec 2005 07:13:51 +0000 (07:13 +0000)]
oops, back this out

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24950 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoi need to do this to take over the earth
Duraid Madina [Thu, 22 Dec 2005 07:02:51 +0000 (07:02 +0000)]
i need to do this to take over the earth

when I take over the earth, sabre will be happy because i'll stop asking
him silly questions!!!!!!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24949 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agowe can't all have brains now, can we
Duraid Madina [Thu, 22 Dec 2005 06:41:39 +0000 (06:41 +0000)]
we can't all have brains now, can we

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24948 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agothis should take care of calls to varadic functions, but it doesn.,t
Duraid Madina [Thu, 22 Dec 2005 06:39:57 +0000 (06:39 +0000)]
this should take care of calls to varadic functions, but it doesn.,t
BUG: calling printf(string, float) will load the float into the wrong
register, completely forget about loading the string, etce

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24947 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agowe need to emit the getf.d instruction in lowering, so add it
Duraid Madina [Thu, 22 Dec 2005 06:38:38 +0000 (06:38 +0000)]
we need to emit the getf.d instruction in lowering, so add it
to IA64ISD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24946 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agocredit where credit is due
Chris Lattner [Thu, 22 Dec 2005 06:09:08 +0000 (06:09 +0000)]
credit where credit is due

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24945 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSeparate the call graph implementation from its interface. This implements
Chris Lattner [Thu, 22 Dec 2005 06:07:52 +0000 (06:07 +0000)]
Separate the call graph implementation from its interface.  This implements
the rough idea sketched out in http://nondot.org/sabre/LLVMNotes/CallGraphClass.txt,
allowing new spiffy implementations of the callgraph interface to be built.

Many thanks to Saem Ghani for contributing this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24944 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoThe 81st column doesn't like code in it.
Chris Lattner [Thu, 22 Dec 2005 05:23:45 +0000 (05:23 +0000)]
The 81st column doesn't like code in it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24943 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoI shoulda done this a *long* time ago (tm): implement calls properly,
Duraid Madina [Thu, 22 Dec 2005 04:07:40 +0000 (04:07 +0000)]
I shoulda done this a *long* time ago (tm): implement calls properly,
i.e. r1/r12/rp are saved/restored regardless of scheduling/luck

TODO: calls to external symbols, indirect (function descriptor) calls,
      performance (we're being paranoid right now)

BUG: the code for handling calls to vararg functions breaks if FP
args are passed (this will make printf() go haywire so a bunch of
tests will fail)

BUG: this seems to trigger some legalize nastiness

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24942 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agokill SelectCALL() in the DAG isel, we handle this in lowering now, like
Duraid Madina [Thu, 22 Dec 2005 03:58:17 +0000 (03:58 +0000)]
kill SelectCALL() in the DAG isel, we handle this in lowering now, like
SPARCv8. (we copy sparcv8's workaround for tablegen not being nice about
ISD::CALL/TAILCALL)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24941 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix documentation for the AlarmSetup function.
Reid Spencer [Thu, 22 Dec 2005 03:57:15 +0000 (03:57 +0000)]
Fix documentation for the AlarmSetup function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24940 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoupdate tablegen files - nothing to see here
Duraid Madina [Thu, 22 Dec 2005 03:56:03 +0000 (03:56 +0000)]
update tablegen files - nothing to see here

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24939 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFor PR351:
Reid Spencer [Thu, 22 Dec 2005 03:31:26 +0000 (03:31 +0000)]
For PR351:
Move the system dependent portion to lib/System/*/Alarm.inc. This makes the
SlowOperationInformer platform independent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24938 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement a generic polled Alarm function. This merely removes the system
Reid Spencer [Thu, 22 Dec 2005 03:23:46 +0000 (03:23 +0000)]
Implement a generic polled Alarm function. This merely removes the system
dependent portion of the lib/Support/SlowOperationTimer code into the
lib/System implementation where it can be ported to different platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24937 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAttempt to fix a crash on WIN32.
Evan Cheng [Thu, 22 Dec 2005 02:35:21 +0000 (02:35 +0000)]
Attempt to fix a crash on WIN32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24936 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoBye bye HACKTROCITY.
Evan Cheng [Thu, 22 Dec 2005 02:26:21 +0000 (02:26 +0000)]
Bye bye HACKTROCITY.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24935 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdded special flag node FLAG.
Evan Cheng [Thu, 22 Dec 2005 02:25:14 +0000 (02:25 +0000)]
Added special flag node FLAG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24934 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago* Added support for FLAG - a special nameless flag register. Can be used as
Evan Cheng [Thu, 22 Dec 2005 02:24:50 +0000 (02:24 +0000)]
* Added support for FLAG - a special nameless flag register. Can be used as
  either an operand or a result.
* Fixed some more flag / chain bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24933 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFor PR678:
Reid Spencer [Thu, 22 Dec 2005 02:08:30 +0000 (02:08 +0000)]
For PR678:
* Make it possible to pass a fourth argument to the CHECK_PROGRAM_SANITY
  macro that controls whether a non-sane program generates an error or
  a warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24931 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement PR679:
Reid Spencer [Thu, 22 Dec 2005 01:50:56 +0000 (01:50 +0000)]
Implement PR679:
* Changed the -rpath option from cl::opt to cl::list
* Changed the interface to GenerateNative to take a std::vector<std::string>
  instead of just a std::string
* Changed GenerateNative to generate multiple -Wl,-rpath, options to be
  passed to gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24930 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd new files to Visual Studio.
Jeff Cohen [Thu, 22 Dec 2005 01:50:11 +0000 (01:50 +0000)]
Add new files to Visual Studio.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24929 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoOh oh... Unix is case sensitive.
Jeff Cohen [Thu, 22 Dec 2005 01:46:59 +0000 (01:46 +0000)]
Oh oh...  Unix is case sensitive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24928 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMake it compile with VC++.
Jeff Cohen [Thu, 22 Dec 2005 01:44:51 +0000 (01:44 +0000)]
Make it compile with VC++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24927 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd an eol at the end to shut gcc sup.
Reid Spencer [Thu, 22 Dec 2005 01:41:00 +0000 (01:41 +0000)]
Add an eol at the end to shut gcc sup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24926 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd an eol at the end to shut gcc up.
Reid Spencer [Thu, 22 Dec 2005 01:40:06 +0000 (01:40 +0000)]
Add an eol at the end to shut gcc up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24925 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSome simple cleanups:
Reid Spencer [Wed, 21 Dec 2005 23:17:06 +0000 (23:17 +0000)]
Some simple cleanups:
1. When srcdir == objdir have "spotless" say that it isn't supported in
   that mode rather than just let make say "no such target"
2. Minor doc cleanups
3. Fix the double rebuild problem with yacc files. A missing dependency
   caused parallel builds to skip building the .cpp file after the .cpp
   file was regenerated by bison.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24924 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdded TargetLowering::isMaskedValueZeroForTargetNode() declaration.
Evan Cheng [Wed, 21 Dec 2005 23:15:41 +0000 (23:15 +0000)]
Added TargetLowering::isMaskedValueZeroForTargetNode() declaration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24923 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoLefted out TargetLowering::
Evan Cheng [Wed, 21 Dec 2005 23:14:54 +0000 (23:14 +0000)]
Lefted out TargetLowering::

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24922 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago* Fix a GlobalAddress lowering bug.
Evan Cheng [Wed, 21 Dec 2005 23:05:39 +0000 (23:05 +0000)]
* Fix a GlobalAddress lowering bug.
* Teach DAG combiner about X86ISD::SETCC by adding a TargetLowering hook.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24921 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoOops. Accidentally deleted RET pattern. It's still needed for return void;
Evan Cheng [Wed, 21 Dec 2005 22:22:16 +0000 (22:22 +0000)]
Oops. Accidentally deleted RET pattern. It's still needed for return void;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24920 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDisengage DEBUG_LOC from non-PPC targets.
Jim Laskey [Wed, 21 Dec 2005 20:51:37 +0000 (20:51 +0000)]
Disengage DEBUG_LOC from non-PPC targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24919 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSync up the project with my tweaks.
Jim Laskey [Wed, 21 Dec 2005 20:47:34 +0000 (20:47 +0000)]
Sync up the project with my tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24918 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago* Added support for X86 RET with an additional operand to specify number of
Evan Cheng [Wed, 21 Dec 2005 20:21:51 +0000 (20:21 +0000)]
* Added support for X86 RET with an additional operand to specify number of
bytes to pop off stack.
* Added support for X86 SETCC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24917 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAllows instructions which no explicit operands. e.g. X86 RET which has but
Evan Cheng [Wed, 21 Dec 2005 20:20:49 +0000 (20:20 +0000)]
Allows instructions which no explicit operands. e.g. X86 RET which has but
an implicit flag operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24916 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd dwarfwriter to the xcode project
Chris Lattner [Wed, 21 Dec 2005 19:51:24 +0000 (19:51 +0000)]
add dwarfwriter to the xcode project

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24915 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoStart of Dwarf framework.
Jim Laskey [Wed, 21 Dec 2005 19:48:16 +0000 (19:48 +0000)]
Start of Dwarf framework.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24914 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoOops llvm namespace.
Jim Laskey [Wed, 21 Dec 2005 19:46:32 +0000 (19:46 +0000)]
Oops llvm namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24913 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoStart of Dwarf framework code.
Jim Laskey [Wed, 21 Dec 2005 19:44:40 +0000 (19:44 +0000)]
Start of Dwarf framework code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24912 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agomake sure to relegalize all cases
Chris Lattner [Wed, 21 Dec 2005 19:40:42 +0000 (19:40 +0000)]
make sure to relegalize all cases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24911 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoenable the gep isel opt
Chris Lattner [Wed, 21 Dec 2005 19:36:36 +0000 (19:36 +0000)]
enable the gep isel opt

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24910 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRegenerate
Chris Lattner [Wed, 21 Dec 2005 18:31:50 +0000 (18:31 +0000)]
Regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24908 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoallow logical operators on packed integral types
Chris Lattner [Wed, 21 Dec 2005 18:31:29 +0000 (18:31 +0000)]
allow logical operators on packed integral types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24907 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoGet logical operations to like packed types, allow BinOp::getNot to create
Chris Lattner [Wed, 21 Dec 2005 18:22:19 +0000 (18:22 +0000)]
Get logical operations to like packed types, allow BinOp::getNot to create
the right vector of -1's as its operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24906 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing...
Chris Lattner [Wed, 21 Dec 2005 18:02:52 +0000 (18:02 +0000)]
fix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing vectors)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24905 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoregenerate
Chris Lattner [Wed, 21 Dec 2005 17:53:23 +0000 (17:53 +0000)]
regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24904 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement Regression/Assembler/2005-12-21-ZeroInitVector.ll
Chris Lattner [Wed, 21 Dec 2005 17:53:02 +0000 (17:53 +0000)]
Implement Regression/Assembler/2005-12-21-ZeroInitVector.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24903 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase
Chris Lattner [Wed, 21 Dec 2005 17:52:42 +0000 (17:52 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24902 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd some nodes, forgot to commit this last night :(
Chris Lattner [Wed, 21 Dec 2005 16:22:46 +0000 (16:22 +0000)]
add some nodes, forgot to commit this last night :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24901 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoThis was meant to go in
Chris Lattner [Wed, 21 Dec 2005 07:50:26 +0000 (07:50 +0000)]
This was meant to go in

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24900 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRewrite FP stackifier support in the X86InstrInfo.td file, splitting patterns
Chris Lattner [Wed, 21 Dec 2005 07:47:04 +0000 (07:47 +0000)]
Rewrite FP stackifier support in the X86InstrInfo.td file, splitting patterns
that were overloaded to work before and after the stackifier runs.  With the
new clean world, it is possible to write patterns for these instructions: woo!

This also adds a few simple patterns here and there, though there are a lot
still missing.  These should be easy to add though. :)

See the comments under "Floating Point Stack Support" for more details on
the new world order.

This patch as absolutely no effect on the generated code, woo!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24899 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoWrap some long lines: no functionality change
Chris Lattner [Wed, 21 Dec 2005 05:34:58 +0000 (05:34 +0000)]
Wrap some long lines: no functionality change

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24898 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoEliminate some GCC warnings from the generated code
Chris Lattner [Wed, 21 Dec 2005 05:31:05 +0000 (05:31 +0000)]
Eliminate some GCC warnings from the generated code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24897 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoremove dead code
Chris Lattner [Wed, 21 Dec 2005 05:27:51 +0000 (05:27 +0000)]
remove dead code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24896 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDocument the new -post-link-opts option.
Reid Spencer [Wed, 21 Dec 2005 05:13:06 +0000 (05:13 +0000)]
Document the new -post-link-opts option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24895 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase, fails on X86 and probably others
Chris Lattner [Wed, 21 Dec 2005 05:09:57 +0000 (05:09 +0000)]
new testcase, fails on X86 and probably others

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24894 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement PR512:
Reid Spencer [Wed, 21 Dec 2005 05:03:23 +0000 (05:03 +0000)]
Implement PR512:
This patch adds a -post-link-opts option to llvm-ld which allows an arbitrary
program to optimize bytecode after linking. The program is passed two file
names. The first is the input (linked bytecode) the second is where it must
place its output (presumably after optimizing). If the output file is bytecode,
it is used as a substitute for the input. This will allow things like poolalloc
to be written as a separate program instead of a loadable module or built into
LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24893 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDocument the new --enable-debug-runtime configure option.
Reid Spencer [Wed, 21 Dec 2005 03:46:45 +0000 (03:46 +0000)]
Document the new --enable-debug-runtime configure option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24892 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement fix for PR471:
Reid Spencer [Wed, 21 Dec 2005 03:31:53 +0000 (03:31 +0000)]
Implement fix for PR471:
* Add --enable-debug-runtime option, defaults to disabled
* Pass the new config var, DEBUG_RUNTIME, to Makefiles
* Don't use -Wa,-strip-debug if debug-runtime is enabled

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24891 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoLower ConstantAggregateZero into zeros
Chris Lattner [Wed, 21 Dec 2005 02:43:26 +0000 (02:43 +0000)]
Lower ConstantAggregateZero into zeros

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24890 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemove ISD::RET select code. Now tblgen'd.
Evan Cheng [Wed, 21 Dec 2005 02:41:57 +0000 (02:41 +0000)]
Remove ISD::RET select code. Now tblgen'd.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24889 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago* Added lowering hook for external weak global address. It inserts a load
Evan Cheng [Wed, 21 Dec 2005 02:39:21 +0000 (02:39 +0000)]
* Added lowering hook for external weak global address. It inserts a load
  for Darwin.
* Added lowering hook for ISD::RET. It inserts CopyToRegs for the return
  value (or store / fld / copy to ST(0) for floating point value). This
  eliminate the need to write C++ code to handle RET with variable number
  of operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24888 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDon't emit a null terminator, nor anything after it, to the ctor/dtor list
Chris Lattner [Wed, 21 Dec 2005 01:17:37 +0000 (01:17 +0000)]
Don't emit a null terminator, nor anything after it, to the ctor/dtor list

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24887 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSSE2 floating point load / store patterns. SSE2 fp to int conversion patterns.
Evan Cheng [Tue, 20 Dec 2005 22:59:51 +0000 (22:59 +0000)]
SSE2 floating point load / store patterns. SSE2 fp to int conversion patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24886 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFlip the meaning of FPContractions to reflect Requires<[]> change.
Evan Cheng [Tue, 20 Dec 2005 20:08:53 +0000 (20:08 +0000)]
Flip the meaning of FPContractions to reflect Requires<[]> change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24884 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix the semantic of Requires<[cond]> to mean if (!cond) goto PXXFail;
Evan Cheng [Tue, 20 Dec 2005 20:08:01 +0000 (20:08 +0000)]
Fix the semantic of Requires<[cond]> to mean if (!cond) goto PXXFail;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24883 91177308-0d34-0410-b5e6-96231b3b80d8