1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

13175 Commits

Author SHA1 Message Date
Chris Lattner
4fd1599ab1 add support for the bitconvert node
llvm-svn: 26789
2006-03-16 01:29:53 +00:00
Chris Lattner
95577cb3cd add support for vector->vector casts
llvm-svn: 26788
2006-03-15 22:19:46 +00:00
Chris Lattner
7c8518a21d Add a note, this code should be moved to the dag combiner.
llvm-svn: 26787
2006-03-15 22:19:18 +00:00
Chris Lattner
b26656cc15 Teach the strip pass to strip type names in addition to value names. This
is fallout from the type/value split in the symtab long long ago :)

llvm-svn: 26785
2006-03-15 19:22:41 +00:00
Jim Laskey
f6494d753a Expand subprogram and added block descriptor.
llvm-svn: 26782
2006-03-15 19:09:58 +00:00
Andrew Lenharth
fc55d15963 no heap is happening here
llvm-svn: 26781
2006-03-15 19:03:16 +00:00
Andrew Lenharth
b377837353 remove qsort for now
llvm-svn: 26779
2006-03-15 18:32:18 +00:00
Andrew Lenharth
ad29f8dfab allow field sensitivity to be a tunable parameter
llvm-svn: 26777
2006-03-15 05:43:41 +00:00
Nate Begeman
e371cb595a Update scheduling info for vrsave instruction
llvm-svn: 26776
2006-03-15 05:25:05 +00:00
Andrew Lenharth
c285b5ff1f Handle one offset with growth case seen in povray. Namely, if we have an offset,
and the offset lands at a field boundary in the old type, construct a new type,
copying the fields masked by the offset from the old type, and unify with that.

llvm-svn: 26775
2006-03-15 04:04:21 +00:00
Andrew Lenharth
f3e73e10cf improve mem intrinsics and add a few things povray uses
llvm-svn: 26774
2006-03-15 03:43:59 +00:00
Chris Lattner
a5dfe68ee9 Bugfix, unbreaking CodeGen/PowerPC/cttz.ll
llvm-svn: 26764
2006-03-14 19:49:57 +00:00
Chris Lattner
981c57fdbd Fix an et-forest memory leak. Patch by Daniel Berlin.
llvm-svn: 26763
2006-03-14 19:41:45 +00:00
Chris Lattner
9df7eb4071 add a note
llvm-svn: 26762
2006-03-14 19:31:24 +00:00
Jim Laskey
864fb2f799 1. Use null for serialized empty strings.
2. Allow for user defined debug descriptors.
3. Allow for user augmented fields on debug descriptors.

llvm-svn: 26760
2006-03-14 18:37:57 +00:00
Chris Lattner
392087f5bd Fix an off by one error that caused PPC LLC failures last night.
llvm-svn: 26758
2006-03-14 17:56:49 +00:00
Chris Lattner
92090188c3 Implement a FIXME, recusively reassociating
A*A*B + A*A*C   -->   A*(A*B+A*C)   -->   A*(A*(B+C))

This implements Reassociate/mul-factor3.ll

llvm-svn: 26757
2006-03-14 16:04:29 +00:00
Chris Lattner
9ccb2201b8 extract some code into a method, no functionality change
llvm-svn: 26755
2006-03-14 07:11:11 +00:00
Chris Lattner
80c5fabe4e transformation implemented
llvm-svn: 26754
2006-03-14 06:57:34 +00:00
Chris Lattner
0e3d81d8ff Promote shifts by a constant to multiplies so that we can reassociate
(x<<1)+(y<<1) -> (X+Y)<<1.  This implements
Transforms/Reassociate/shift-factor.ll

llvm-svn: 26753
2006-03-14 06:55:18 +00:00
Reid Spencer
728a2e9f62 Convert llvm.cs.uiuc.edu -> llvm.org
llvm-svn: 26748
2006-03-14 05:54:52 +00:00
Jim Laskey
11f7fe9fe5 1. Handle removal of all arguments for a morphed intrinsic.
2. Remove the declaration of llvm.dbg.declare.

llvm-svn: 26745
2006-03-14 02:00:35 +00:00
Evan Cheng
ae7469b2c5 PPC LSR pass should use target lowering hooks.
llvm-svn: 26743
2006-03-13 23:56:51 +00:00
Evan Cheng
7ec94f2ff7 Added getTargetLowering() to TargetMachine. Refactored targets to support this.
llvm-svn: 26742
2006-03-13 23:20:37 +00:00
Evan Cheng
99e87e9147 Update
llvm-svn: 26741
2006-03-13 23:19:10 +00:00
Evan Cheng
ed013bd937 Add LSR hooks.
llvm-svn: 26740
2006-03-13 23:18:16 +00:00
Evan Cheng
692235499c Added target lowering hooks which LSR consults to make more intelligent
transformation decisions.

llvm-svn: 26738
2006-03-13 23:14:23 +00:00
Chris Lattner
d5ecfd83f1 Handle builtins that directly correspond to GCC builtins.
llvm-svn: 26737
2006-03-13 23:09:05 +00:00
Chris Lattner
d0505331d2 For functions that use vector registers, save VRSAVE, mark used
registers, and update it on entry to each function, then restore it on exit.

This compiles:

void func(vfloat *a, vfloat *b, vfloat *c) {
        *a = *b * *c + *c;
}

to this:

_func:
        mfspr r2, 256
        oris r6, r2, 49152
        mtspr 256, r6
        lvx v0, 0, r5
        lvx v1, 0, r4
        vmaddfp v0, v1, v0, v0
        stvx v0, 0, r3
        mtspr 256, r2
        blr

GCC produces this (which has additional stack accesses):

_func:
        mfspr r0,256
        stw r0,-4(r1)
        oris r0,r0,0xc000
        mtspr 256,r0
        lvx v0,0,r5
        lvx v1,0,r4
        lwz r12,-4(r1)
        vmaddfp v0,v0,v1,v0
        stvx v0,0,r3
        mtspr 256,r12
        blr

llvm-svn: 26733
2006-03-13 21:52:10 +00:00
Chris Lattner
3b4ceba4ff make sure dead token factor nodes are removed by the dag combiner.
llvm-svn: 26731
2006-03-13 18:37:30 +00:00
Reid Spencer
ba5d13fd59 Bring makefile back into compliance with standard by using
$(Echo) instead of @echo

llvm-svn: 26730
2006-03-13 17:57:31 +00:00
Jim Laskey
c741139c24 Handle the removal of the debug chain.
llvm-svn: 26729
2006-03-13 13:07:37 +00:00
Chris Lattner
ea1453c3dc remove two implemented items
llvm-svn: 26728
2006-03-13 06:52:22 +00:00
Chris Lattner
3a3c8682b5 Fold X+Y -> X|Y when safe. This implements:
Regression/CodeGen/PowerPC/and_add.ll

a case that occurs with dynamic allocas of constant size.

llvm-svn: 26727
2006-03-13 06:51:27 +00:00
Chris Lattner
1782f3971d I can't convince myself that this is safe, remove the recursive call.
llvm-svn: 26725
2006-03-13 06:42:16 +00:00
Chris Lattner
9d0ebb55a6 add a couple of missing folds
llvm-svn: 26724
2006-03-13 06:26:26 +00:00
Chris Lattner
3cb122bfa8 For targets with FABS/FNEG support, lower copysign to an integer load,
a select and FABS/FNEG.

This speeds up a trivial (aka stupid) copysign benchmark I wrote from 6.73s
to 2.64s, woo.

llvm-svn: 26723
2006-03-13 06:08:38 +00:00
Chris Lattner
3aff8e6acf Fix a couple of bugs that broke the alpha tester build
llvm-svn: 26722
2006-03-13 05:23:59 +00:00
Chris Lattner
9898674f99 Handle cracked instructions in dispatch group formation.
llvm-svn: 26721
2006-03-13 05:20:04 +00:00
Chris Lattner
ba10d4e4ab Mark instructions that are cracked by the PPC970 decoder as such.
llvm-svn: 26720
2006-03-13 05:15:10 +00:00
Chris Lattner
a278639f29 Several big changes:
1. Use flags on the instructions in the .td file to indicate the PPC970 unit
   type instead of a table in the .cpp file.  Much cleaner.
2. Change the hazard recognizer to build d-groups according to the actual
   algorithm used, not my flawed understanding of it.
3. Model "must be in the first slot" and "must be the only instr in a group"
   accurately.

llvm-svn: 26719
2006-03-12 09:13:49 +00:00
Chris Lattner
a54a9d83c3 Don't advance the hazard recognizer when there are no hazards and no instructions
to be emitted.

Don't add one to the latency of a completed instruction if the latency of the
op is 0.

llvm-svn: 26718
2006-03-12 09:01:41 +00:00
Chris Lattner
aea53fc36f Chain operands aren't real uses: they don't require the full latency of the
predecessor to finish before they can start.

llvm-svn: 26717
2006-03-12 03:52:09 +00:00
Chris Lattner
7396b82585 As a pending queue data structure to keep track of instructions whose
operands have all issued, but whose results are not yet available.  This
allows us to compile:

int G;
int test(int A, int B, int* P) {
   return (G+A)*(B+1);
}

to:

_test:
        lis r2, ha16(L_G$non_lazy_ptr)
        addi r4, r4, 1
        lwz r2, lo16(L_G$non_lazy_ptr)(r2)
        lwz r2, 0(r2)
        add r2, r2, r3
        mullw r3, r2, r4
        blr

instead of this, which has a stall between the lis/lwz:

_test:
        lis r2, ha16(L_G$non_lazy_ptr)
        lwz r2, lo16(L_G$non_lazy_ptr)(r2)
        addi r4, r4, 1
        lwz r2, 0(r2)
        add r2, r2, r3
        mullw r3, r2, r4
        blr

llvm-svn: 26716
2006-03-12 00:38:57 +00:00
Chris Lattner
62eafde9c1 rename priorityqueue -> availablequeue. When a node is scheduled, remember
which cycle it lands on.

llvm-svn: 26714
2006-03-11 22:44:37 +00:00
Chris Lattner
04ada12cb7 Make CurrCycle a local var instead of an instance var
llvm-svn: 26713
2006-03-11 22:34:41 +00:00
Chris Lattner
6a9861953b Move some methods around so that BU specific code is together, TD specific code
is together, and direction independent code is together.

llvm-svn: 26712
2006-03-11 22:28:35 +00:00
Chris Lattner
40c02c01a5 merge preds/chainpreds -> preds set
merge succs/chainsuccs -> succs set

This has no functionality change, simplifies the code, and reduces the size
of sunits.

llvm-svn: 26711
2006-03-11 22:24:20 +00:00
Chris Lattner
19b93158c1 blr is a branch too
llvm-svn: 26710
2006-03-11 21:49:49 +00:00
Chris Lattner
916761949b add an example
llvm-svn: 26709
2006-03-11 20:20:40 +00:00