Nate Begeman
133decdceb
Update scheduling info for vrsave instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26776 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 05:25:05 +00:00
Andrew Lenharth
4bebcdbca1
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26775 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 04:04:21 +00:00
Andrew Lenharth
24b1ea159e
improve mem intrinsics and add a few things povray uses
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26774 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 03:43:59 +00:00
Chris Lattner
7538f4b52b
Bugfix, unbreaking CodeGen/PowerPC/cttz.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26764 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 19:49:57 +00:00
Chris Lattner
bb636274d4
Fix an et-forest memory leak. Patch by Daniel Berlin.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 19:41:45 +00:00
Chris Lattner
cbd3cdd239
add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26762 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 19:31:24 +00:00
Jim Laskey
2140798cc4
1. Use null for serialized empty strings.
...
2. Allow for user defined debug descriptors.
3. Allow for user augmented fields on debug descriptors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26760 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 18:37:57 +00:00
Chris Lattner
a08610c8a5
Fix an off by one error that caused PPC LLC failures last night.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26758 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 17:56:49 +00:00
Chris Lattner
e9efecbf47
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26757 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 16:04:29 +00:00
Chris Lattner
895b392269
extract some code into a method, no functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26755 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 07:11:11 +00:00
Chris Lattner
ad5a3a0265
transformation implemented
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26754 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 06:57:34 +00:00
Chris Lattner
22a66c41f3
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26753 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 06:55:18 +00:00
Reid Spencer
9dce2b3380
Convert llvm.cs.uiuc.edu -> llvm.org
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 05:54:52 +00:00
Jim Laskey
5a588a9636
1. Handle removal of all arguments for a morphed intrinsic.
...
2. Remove the declaration of llvm.dbg.declare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26745 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 02:00:35 +00:00
Evan Cheng
9c543b2299
PPC LSR pass should use target lowering hooks.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 23:56:51 +00:00
Evan Cheng
c4c6257c1a
Added getTargetLowering() to TargetMachine. Refactored targets to support this.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26742 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 23:20:37 +00:00
Evan Cheng
e617b085fe
Update
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26741 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 23:19:10 +00:00
Evan Cheng
30b37b5f29
Add LSR hooks.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 23:18:16 +00:00
Evan Cheng
d277f2c669
Added target lowering hooks which LSR consults to make more intelligent
...
transformation decisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 23:14:23 +00:00
Chris Lattner
872421553e
Handle builtins that directly correspond to GCC builtins.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26737 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 23:09:05 +00:00
Chris Lattner
1877ec9b02
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26733 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 21:52:10 +00:00
Chris Lattner
ac0f8f2929
make sure dead token factor nodes are removed by the dag combiner.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26731 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 18:37:30 +00:00
Reid Spencer
a136429462
Bring makefile back into compliance with standard by using
...
$(Echo) instead of @echo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26730 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 17:57:31 +00:00
Jim Laskey
f4321a3a43
Handle the removal of the debug chain.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 13:07:37 +00:00
Chris Lattner
2e8a77ff42
remove two implemented items
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26728 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 06:52:22 +00:00
Chris Lattner
947c28935d
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26727 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 06:51:27 +00:00
Chris Lattner
b6b17ffbc6
I can't convince myself that this is safe, remove the recursive call.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26725 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 06:42:16 +00:00
Chris Lattner
79dbea5ab4
add a couple of missing folds
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26724 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 06:26:26 +00:00
Chris Lattner
8f4191d619
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26723 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 06:08:38 +00:00
Chris Lattner
64ce964673
Fix a couple of bugs that broke the alpha tester build
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26722 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 05:23:59 +00:00
Chris Lattner
3faad495bc
Handle cracked instructions in dispatch group formation.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26721 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 05:20:04 +00:00
Chris Lattner
fd97734f36
Mark instructions that are cracked by the PPC970 decoder as such.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 05:15:10 +00:00
Chris Lattner
88d211f823
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26719 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-12 09:13:49 +00:00
Chris Lattner
fc3549ee8c
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26718 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-12 09:01:41 +00:00
Chris Lattner
b2215030d6
Chain operands aren't real uses: they don't require the full latency of the
...
predecessor to finish before they can start.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26717 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-12 03:52:09 +00:00
Chris Lattner
53fbf2a8e8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26716 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-12 00:38:57 +00:00
Chris Lattner
8469031622
rename priorityqueue -> availablequeue. When a node is scheduled, remember
...
which cycle it lands on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26714 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 22:44:37 +00:00
Chris Lattner
c1c078c170
Make CurrCycle a local var instead of an instance var
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26713 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 22:34:41 +00:00
Chris Lattner
7d82b00048
Move some methods around so that BU specific code is together, TD specific code
...
is together, and direction independent code is together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26712 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 22:28:35 +00:00
Chris Lattner
309cf8a713
merge preds/chainpreds -> preds set
...
merge succs/chainsuccs -> succs set
This has no functionality change, simplifies the code, and reduces the size
of sunits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26711 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 22:24:20 +00:00
Chris Lattner
9c2c38674a
blr is a branch too
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26710 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 21:49:49 +00:00
Chris Lattner
74cfb7d7b3
add an example
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 20:20:40 +00:00
Chris Lattner
c20995e070
add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26708 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 20:17:08 +00:00
Nate Begeman
442b32b5c5
Fix PR681 by using the standard Lengauer and Tarjan algorithm for dominator
...
set construction, rather than intersecting various std::sets. This reduces
the memory usage for the testcase in PR681 from 496 to 26MB of ram on my
darwin system, and reduces the runtime from 32.8 to 0.8 seconds on a
2.5GHz G5. This also enables future code sharing between Dom and PostDom
now that they share near-identical implementations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26707 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 02:20:46 +00:00
Evan Cheng
2352ce9cb6
Doh!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26705 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 00:13:10 +00:00
Evan Cheng
0937103368
Added a parameter to control whether Constant::getStringValue() would chop
...
off the result string at the first null terminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26704 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 23:52:03 +00:00
Chris Lattner
7907b6950b
remove some dead code
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26703 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 23:14:22 +00:00
Chris Lattner
7d74d1145f
scrape out bits of llvm-db
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26701 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 22:48:19 +00:00
Chris Lattner
89b192690a
Remove UnixLocalInferiorProcess: debugging via the JIT isn't a good idea.
...
Perhaps llvm-db will turn into a read debugger someday.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 22:39:48 +00:00
Chris Lattner
e928a72772
teach the JIT to encode vector registers
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26697 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 20:19:50 +00:00
Chris Lattner
a34b6f8713
Move simple-selector-specific types to the simple selector.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26693 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:51:18 +00:00
Chris Lattner
20a4921791
Simplify the interface to the schedulers, to not pass the selected heuristicin.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:49:12 +00:00
Chris Lattner
2f5806c2b3
Move some simple-sched-specific instance vars to the simple scheduler.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26690 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:42:02 +00:00
Chris Lattner
1e433c59e0
prune #includes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26689 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:37:35 +00:00
Chris Lattner
e76074ab89
move some simple scheduler methods into the simple scheduler
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26688 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:35:21 +00:00
Chris Lattner
8c7ef0599c
Make EmitNode take a SDNode instead of a NodeInfo*
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:28:36 +00:00
Chris Lattner
df3750642a
Move the VRBase field from NodeInfo to being a separate, explicit, map.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:25:12 +00:00
Chris Lattner
8d41651da7
no need to build groups anymore
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26684 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:15:58 +00:00
Chris Lattner
b2042e31a7
Create SUnits directly from the SelectionDAG.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26683 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 07:13:32 +00:00
Chris Lattner
be24e5996c
Push PrepareNodeInfo/IdentifyGroups down the inheritance hierarchy
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26682 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 06:34:51 +00:00
Chris Lattner
da4ff69153
Teach the latency scheduler some new tricks. In particular, to break ties,
...
keep track of a sense of "mobility", i.e. how many other nodes scheduling one
node will free up. For something like this:
float testadd(float *X, float *Y, float *Z, float *W, float *V) {
return (*X+*Y)*(*Z+*W)+*V;
}
For example, this makes us schedule *X then *Y, not *X then *Z. The former
allows us to issue the add, the later only lets us issue other loads.
This turns the above code from this:
_testadd:
lfs f0, 0(r3)
lfs f1, 0(r6)
lfs f2, 0(r4)
lfs f3, 0(r5)
fadds f0, f0, f2
fadds f1, f3, f1
lfs f2, 0(r7)
fmadds f1, f0, f1, f2
blr
into this:
_testadd:
lfs f0, 0(r6)
lfs f1, 0(r5)
fadds f0, f1, f0
lfs f1, 0(r4)
lfs f2, 0(r3)
fadds f1, f2, f1
lfs f2, 0(r7)
fmadds f1, f1, f0, f2
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26680 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 05:51:05 +00:00
Chris Lattner
f83a47d905
add an aggregate method for reinserting scheduled nodes, add a callback for
...
priority impls that want to be notified when a node is scheduled
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26678 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 04:32:49 +00:00
Jeff Cohen
9630d271c5
Fix VC++ build breakage.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26676 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-10 03:57:45 +00:00
Chris Lattner
aeebe7f208
use autogenerated side-effect information
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26673 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 22:38:10 +00:00
Chris Lattner
cad25379d3
Use autogenerated mod/ref info for intrinsics.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26670 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 22:31:29 +00:00
Chris Lattner
3b816b7aa7
Use the autogenerated intrinsic verifier
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26667 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 22:06:04 +00:00
Evan Cheng
627fb57e19
Add option -enable-x86-lsr to enable x86 loop strength reduction pass.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 21:51:28 +00:00
Chris Lattner
9a016ff284
Use the function name matcher autogenerated from the .td file.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26664 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:35:01 +00:00
Chris Lattner
80c2c9224f
This rule also depends on tblgen
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26662 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:29:41 +00:00
Chris Lattner
82c78b2f7e
add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26661 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:13:21 +00:00
Chris Lattner
59bcce5ae5
remove dbg_declare, it's not used yet.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:02:42 +00:00
Chris Lattner
8a5343989b
silly case insensitive file systems...
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26658 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 19:55:06 +00:00
Chris Lattner
5c1c0cb2ac
Build intrinsics.gen from intrinsics.td
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26657 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 19:53:27 +00:00
Chris Lattner
a758b8250d
autoupgrade memcpy/memmove/memset with signed counts.
...
CVS: ----------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 18:42:10 +00:00
Andrew Lenharth
ddc877ccae
these are copies too
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26653 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 18:18:51 +00:00
Chris Lattner
79cdfa3ee2
remove some now-dead code
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26652 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 18:07:49 +00:00
Andrew Lenharth
e5b71d0715
fcopysign for mixed mode
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26651 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:56:33 +00:00
Chris Lattner
2695de410d
back out my previous hack
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:48:46 +00:00
Andrew Lenharth
d26b8f97c4
relax fcopysign
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26649 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:47:22 +00:00
Andrew Lenharth
283f22275a
alpha and llvm have different oppinions on which arg is the sign bit
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26647 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:41:50 +00:00
Chris Lattner
8c84f3f0df
remove temporary option
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26646 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:31:22 +00:00
Andrew Lenharth
017c556efc
Alpha Scheduling classes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26643 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:16:45 +00:00
Chris Lattner
8bf586f305
temporary hack to get the build working again, apparently a header
...
commit was forgotten
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26642 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 17:11:08 +00:00
Andrew Lenharth
13beebb25b
fcopysign and get rid of dsnode cruft. custom PA runtimes make this better in some senses
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26641 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 14:58:25 +00:00
Andrew Lenharth
97d74aac35
fcopysign support
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26640 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 14:57:36 +00:00
Jim Laskey
54689c2bee
Move bit field endianness to backend.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26639 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 13:28:47 +00:00
Chris Lattner
571340633f
yes yes, enabled debug output is bad
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26637 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 07:39:25 +00:00
Chris Lattner
6a4b70bbcf
switch the t-d scheduler to use a really dumb and trivial critical path
...
latency priority function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 07:38:27 +00:00
Chris Lattner
477ef6d8cb
Pull latency information for target instructions out of the latency tables. :)
...
Only enable this with -use-sched-latencies, I'll enable it by default with a
clean nightly tester run tonight.
PPC is the only target that provides latency info currently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26634 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 07:15:18 +00:00
Chris Lattner
e70f671b97
don't copy all itinerary data
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26633 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 07:13:00 +00:00
Chris Lattner
0324ba8f02
PriorityQueue is an instance var, use it.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26632 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 06:48:37 +00:00
Chris Lattner
e87c5c8088
add some comments
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26631 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 06:37:29 +00:00
Chris Lattner
e32178dd32
Refactor the priority mechanism one step further: now that it is a separate
...
class, sever its implementation from the interface. Now we can provide new
implementations of the same interface (priority computation) without touching
the scheduler itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26630 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 06:35:14 +00:00
Chris Lattner
04f9674857
Add support for 'special' llvm globals like debug info and static ctors/dtors.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26628 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 06:14:35 +00:00
Chris Lattner
e2b59d2760
fix a pasto
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26627 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 06:09:41 +00:00
Chris Lattner
181b9c6a2a
a couple of miscellaneous things.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26625 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 01:39:46 +00:00
Jim Laskey
7075d6f2f2
Add #line support for CBE.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 19:31:15 +00:00
Chris Lattner
9ca6cdaee9
Add a helper method for running static ctors/dtors in the module.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26619 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 18:42:46 +00:00
Chris Lattner
9d25824e4c
add a new helper method.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26618 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 18:39:13 +00:00
Jim Laskey
21b6c9d647
Get rid of the multiple copies of getStringValue. Now a Constant:: method.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26616 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 18:11:07 +00:00
Duraid Madina
1ffd41ab99
doo de doo
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26614 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 06:18:46 +00:00
Chris Lattner
49eee4a26f
Split the priority function computation and priority queue management out
...
of the ScheduleDAGList class into a new SchedulingPriorityQueue class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26613 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 05:18:27 +00:00
Chris Lattner
c45a59bb32
switch from an explicitly managed list of SUnits to a simple vector of sunits
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26612 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:54:34 +00:00
Chris Lattner
6a67b3a4e6
Shrinkify some fields, fit to 80 columns
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26611 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:41:06 +00:00
Chris Lattner
6b24af87e6
revert the previous patch, didn't mean to check it in yet
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:39:05 +00:00
Chris Lattner
5874f82564
remove "Slot", it is dead
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26609 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:37:58 +00:00
Chris Lattner
b0d21ef20c
Change the interface for getting a target HazardRecognizer to be more clean.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26608 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 04:25:59 +00:00
Jim Laskey
2b0e309640
libstdc++-v3 was failing to build. Needed to handle composite types with empty
...
members (running into a zero initializer.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26607 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 02:07:02 +00:00
Chris Lattner
25de486263
Fix a miscompilation of 188.ammp with the new CFE. 188.ammp is accessing
...
arrays out of range in a horrible way, but we shouldn't break it anyway.
Details in the comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26606 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 01:05:29 +00:00
Chris Lattner
49f398b96a
add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26605 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 00:25:47 +00:00
Evan Cheng
9925642ec5
X86ISD::REP_STOS and X86ISD::REP_MOVS now produces a flag.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26604 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 23:34:23 +00:00
Evan Cheng
ff909926e2
Use rep/stosl; and Count 0x3; rep/stosb for memset with 4 byte aligned dest.
...
and variable value.
Similarly for memcpy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26603 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 23:29:39 +00:00
Chris Lattner
9a571ba823
Two things:
...
1. Don't emit debug info, or other llvm.metadata to the .cbe.c file.
2. Mark static ctors/dtors as such, so that bugpoint works on C++ code
compiled with the new CFE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26602 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 22:58:23 +00:00
Jim Laskey
7809811e4e
Use "llvm.metadata" section for debug globals. Filter out these globals in the
...
asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26599 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 22:00:35 +00:00
Jim Laskey
e8c3e3b51c
Switch to using a numeric id for anchors.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26598 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 20:53:47 +00:00
Chris Lattner
e1c173bc77
Fix ConstantMerge/2006-03-07-DontMergeDiffSections.ll, a problem Jim
...
hypotheticalized about, where we would incorrectly merge two globals in
different sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26597 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 17:56:59 +00:00
Chris Lattner
b84225b080
add another missing store.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26595 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 16:26:48 +00:00
Chris Lattner
ab5801cb28
add a couple more load/store instrs, add a newline to the end of file.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26594 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 16:19:46 +00:00
Jim Laskey
20c3ed8166
Bitfield support.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 15:51:33 +00:00
Nate Begeman
3acbe5d4f0
This kinda sorta implements "things that have to lead a dispatch group".
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26591 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 08:30:27 +00:00
Chris Lattner
2046371e70
add some new instructions to the classifier. With this, we correctly insert
...
a nop into Freebench/neural, which speeds it up from 136->129s (~5.4%).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26590 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 07:14:55 +00:00
Chris Lattner
7ce64852e8
add some comments that describe what we model
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26588 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 06:44:19 +00:00
Chris Lattner
c664418820
Implement a very very simple hazard recognizer for LSU rejects and ctr set/read
...
flushes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26587 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 06:32:48 +00:00
Chris Lattner
b2d635803d
Fix some formatting, when looking for hazards, prefer target nodes over
...
things like copyfromreg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26586 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 05:40:43 +00:00
Chris Lattner
5a63c47fb5
add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26585 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 04:42:59 +00:00
Chris Lattner
549f27d235
add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26583 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 02:46:26 +00:00
Evan Cheng
d594881a28
- Emit subsections_via_symbols for Darwin.
...
- Conditionalize Dwarf debugging output (Darwin only for now).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26582 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 02:23:26 +00:00
Evan Cheng
3c992d291b
Enable Dwarf debugging info.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26581 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 02:02:57 +00:00
Chris Lattner
51c26e911a
Teach the alignment handling code to look through constant expr casts and GEPs
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26580 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 01:28:57 +00:00
Chris Lattner
95a959dc1a
Teach instcombine to increase the alignment of memset/memcpy/memmove when
...
the pointer is known to come from either a global variable, alloca or
malloc. This allows us to compile this:
P = malloc(28);
memset(P, 0, 28);
into explicit stores on PPC instead of a memset call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26577 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 20:18:44 +00:00
Chris Lattner
6af7ef8da8
update file comment
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26573 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 17:58:04 +00:00
Evan Cheng
adc5e5c85f
Remove some code that doesn't make sense
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26572 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 07:31:44 +00:00
Evan Cheng
6b36ce9202
Remove SUnit::Priority1: it is re-calculated on demand as number of live
...
range to be generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26570 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 06:08:54 +00:00
Chris Lattner
03fc53c174
Hoist the HazardRecognizer out of the ScheduleDAGList.cpp file to where
...
targets can implement them. Make the top-down scheduler non-g5-specific.
Remove the old testing hazard recognizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26569 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 00:22:00 +00:00
Chris Lattner
67727308fa
Comment fixes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26567 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:59:20 +00:00
Chris Lattner
3c232c83be
Don't depend on the C99 copysign function, implement it ourselves.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26566 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:57:58 +00:00
Chris Lattner
a93dfcd40a
When a hazard recognizer needs noops to be inserted, do so. This represents
...
noops as null pointers in the instruction sequence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26564 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:51:47 +00:00
Chris Lattner
bbf1c72d51
implement TII::insertNoop
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26562 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:49:55 +00:00
Chris Lattner
6cc3f0a774
Implement G5HazardRecognizer as a trivial thing that wants 5 cycles between
...
copyfromreg nodes. Clearly useful!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26559 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 23:13:56 +00:00
Chris Lattner
ad0f78ace2
Add basic hazard recognizer support. noop insertion isn't complete yet though.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26558 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 22:45:01 +00:00
Jeff Cohen
3d68e15c20
Fix VC++ compilation error.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26554 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 21:43:37 +00:00
Chris Lattner
a5de484bc7
Split the list scheduler into top-down and bottom-up pieces. The priority
...
function of the top-down scheduler are completely bogus currently, and
having (future) PPC specific in this file is also wrong, but this is a
small incremental step.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26552 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 21:10:33 +00:00
Chris Lattner
41f5ea0665
Move the available queue to being inside the ListSchedule method, since it
...
bounds its lifetime.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26550 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 20:21:55 +00:00
Chris Lattner
5b0fe7d91d
add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26549 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 20:00:08 +00:00
Chris Lattner
cac7059d0f
Reinstate this now that the offending opposite xform has been removed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26548 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 19:53:55 +00:00
Chris Lattner
c1d9f1de41
Do not fold (add (shl x, c1), (shl c2, c1)) -> (shl (add x, c2), c1),
...
we want to canonicalize the other way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26547 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 19:52:57 +00:00
Chris Lattner
5267651057
print arbitrary constant pool entries
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26545 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 09:38:03 +00:00
Evan Cheng
9176b0169c
Back out fold (shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2) for now.
...
It's causing an infinite loop compiling ldecod on x86 / Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26544 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 07:30:16 +00:00
Chris Lattner
12d830346b
Add some simple copysign folds
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26543 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 05:30:57 +00:00
Chris Lattner
a09f848c11
Codegen copysign[f] into a FCOPYSIGN node
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 05:09:38 +00:00
Chris Lattner
9601a86a64
Copysign needs to be expanded everywhere. Note that Alpha and IA64 should
...
implement copysign as a native op if they have it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26541 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 05:08:37 +00:00
Chris Lattner
a4929df2da
add a note for something evan noticed
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26539 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 01:15:18 +00:00
Chris Lattner
220b0cf3e4
Make vector narrowing more effective, implementing
...
Transforms/InstCombine/vec_narrow.ll. This add support for narrowing
extract_element(insertelement) also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26538 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 00:22:33 +00:00
Chris Lattner
9f17be690e
Implemented.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26536 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 23:33:44 +00:00
Chris Lattner
a1deca3cd6
fold (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2)
...
fold (shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2)
This allows us to compile CodeGen/PowerPC/addi-reassoc.ll into:
_test1:
slwi r2, r4, 4
add r2, r2, r3
lwz r3, 36(r2)
blr
_test2:
mulli r2, r4, 5
add r2, r2, r3
lbz r2, 11(r2)
extsb r3, r2
blr
instead of:
_test1:
addi r2, r4, 2
slwi r2, r2, 4
add r2, r3, r2
lwz r3, 4(r2)
blr
_test2:
addi r2, r4, 2
mulli r2, r2, 5
add r2, r3, r2
lbz r2, 1(r2)
extsb r3, r2
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26535 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 23:33:26 +00:00
Chris Lattner
2cfdd2854c
Fix a crash compiling Obsequi
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26529 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 21:48:01 +00:00
Chris Lattner
e5022fe4cd
Add factoring of multiplications, e.g. turning A*A+A*B into A*(A+B).
...
Testcase here: Transforms/Reassociate/mulfactor.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26524 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 09:31:13 +00:00
Chris Lattner
ad01993194
Add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26523 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 08:44:51 +00:00
Chris Lattner
c2c6038913
Regenerate
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26522 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 07:53:41 +00:00
Chris Lattner
7d5c1e1ed1
Don't use invalidated iterators!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26521 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 07:53:16 +00:00
Evan Cheng
f42f516984
Add an entry
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26520 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 07:49:50 +00:00
Chris Lattner
ab51f3fa96
Canonicalize (X+C1)*C2 -> X*C2+C1*C2
...
This implements Transforms/InstCombine/add.ll:test31
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26519 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 06:04:02 +00:00
Evan Cheng
62bec2ca4c
MEMSET / MEMCPY lowering bugs: we can't issue a single WORD / DWORD version of
...
rep/stos and rep/mov if the count is not a constant. We could do
rep/stosl; and $count, 3; rep/stosb
For now, I will lower them to memset / memcpy calls. We will revisit this after
a little bit experiment.
Also need to take care of the trailing bytes even if the count is a constant.
Since the max. number of trailing bytes are 3, we will simply issue loads /
stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26517 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 02:48:56 +00:00
Chris Lattner
5a3cf8de5d
Be more conservative with our symbolic alias analysis. In particular,
...
don't assume that A[1][0] and A[0][i] can't alias. "i" might be out of
range, or even negative. This fixes a miscompilation of 188.ammp (which
does bad pointer tricks) with the new CFE.
Testcase here: Analysis/BasicAA/2006-03-03-BadArraySubscript.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26515 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 02:06:34 +00:00
Chris Lattner
b27b69f283
add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26513 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 01:19:34 +00:00
Evan Cheng
8df346b4e8
Typo
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26512 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 01:12:00 +00:00
Jim Laskey
b80af6f572
Added support for dwarf block data entries.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26509 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 21:00:14 +00:00
Chris Lattner
329b951b69
Unbreak autouprade of llvm.sqrt, simplify some code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26506 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 16:31:22 +00:00
Jim Laskey
f01e547700
Adding basic structure support.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26505 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 15:06:57 +00:00
Evan Cheng
3e1ce5a44d
Add more vector NodeTypes: VSDIV, VUDIV, VAND, VOR, and VXOR.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26504 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 07:01:07 +00:00
Evan Cheng
33143dce15
Number of NodeTypes now exceeds 128.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26503 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:58:59 +00:00
Evan Cheng
bfa284f697
SDOperand::isOperand should not be a forwarding. It must check *this against N's operands.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26502 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:42:32 +00:00
Evan Cheng
80d8eaae05
Added isOperand(N): true if this is an operand of N
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26501 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:24:54 +00:00
Evan Cheng
fb43331226
A bit more tweaking
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26500 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:23:43 +00:00
Jeff Cohen
d84525480a
Fix VC++ compilation errors.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26498 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 03:25:07 +00:00
Evan Cheng
932f022b82
Move #include "llvm/CodeGen/AsmPrinter.h" to top since it's the interface.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26493 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 02:04:29 +00:00
Chris Lattner
a8309ae1cb
Split the valuetypes out of Target.td into ValueTypes.td
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26490 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:55:26 +00:00
Chris Lattner
21959390c1
Change this to work with renamed intrinsics.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26484 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:34:17 +00:00
Chris Lattner
aecb0627fa
Make this work with renamed intrinsics.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26482 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:30:23 +00:00
Chris Lattner
01ac91e2fd
updates for recent changes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26481 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:21:36 +00:00
Chris Lattner
41edaa0529
remove the read/write port/io intrinsics.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26479 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 00:19:58 +00:00
Chris Lattner
03dd465215
Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
...
PR709, and paving the way for future progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26476 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 00:00:25 +00:00
Chris Lattner
bad08000f1
Simplify the autoupgrade interface
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26475 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-02 23:59:12 +00:00
Chris Lattner
ffa987d3ee
Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
...
PR709, and paving the way for future progress.
Significantly refactor autoupgrading code, to handle the more complex case
(where we upgrade one argument in a function), and fix some bugs in it.
Testcase here: llvm/test/Regression/Bytecode/memcpy.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26474 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-02 23:58:40 +00:00
Chris Lattner
89188a1096
add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26472 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-02 22:34:38 +00:00
Evan Cheng
86ec7d1d07
- Fixed some priority calculation bugs that were causing bug 478. Among them:
...
a predecessor appearing more than once in the operand list was counted as
multiple predecessor; priority1 should be updated during scheduling;
CycleBound was updated after the node is inserted into priority queue; one
of the tie breaking condition was flipped.
- Take into consideration of two address opcodes. If a predecessor is a def&use
operand, it should have a higher priority.
- Scheduler should also favor floaters, i.e. nodes that do not have real
predecessors such as MOV32ri.
- The scheduling fixes / tweaks fixed bug 478:
.text
.align 4
.globl _f
_f:
movl 4(%esp), %eax
movl 8(%esp), %ecx
movl %eax, %edx
imull %ecx, %edx
imull %eax, %eax
imull %ecx, %ecx
addl %eax, %ecx
leal (%ecx,%edx,2), %eax
ret
It is also a slight performance win (1% - 3%) for most tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26470 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-02 21:38:29 +00:00
Chris Lattner
db3f873bd8
Generalize the REM folding code to handle another case Nick Lewycky
...
pointed out: realize the AND can provide factors and look through Casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26469 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-02 06:50:58 +00:00
Jim Laskey
6a3eb01084
Support for enumerations.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26466 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 23:52:37 +00:00
Evan Cheng
246ae0dcf7
Don't print llvm constant in assmebly file. Assembler won't like comments that
...
span multiple lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26463 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 22:18:09 +00:00
Evan Cheng
a4ffcc23a2
Back out my last check-in. Wrong place to fix it.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26462 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 22:17:00 +00:00
Evan Cheng
7cfdd01869
AsmWriter should not print LLVM constant in comment. Assembler won't like
...
multi-line comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26461 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 22:00:59 +00:00
Chris Lattner
1ec05d1bb4
Fix CodeGen/Generic/2006-03-01-dagcombineinfloop.ll, an infinite loop
...
in the dag combiner on 176.gcc on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26459 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 21:47:21 +00:00
Jim Laskey
9c4447aa2b
Switch back to using actual dwarf tags. Simplifies code without loss to other
...
debug forms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26455 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 20:39:36 +00:00
Chris Lattner
b2742f4a26
Fix a typo evan noticed
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26454 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 19:55:35 +00:00
Jim Laskey
92ae740396
Use context and not compile unit.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 18:20:30 +00:00
Jim Laskey
288fe0f74d
I guess I can handle large type sizes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26452 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 18:13:05 +00:00
Jim Laskey
f8913f19ae
Basic array support.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26451 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 17:53:02 +00:00
Chris Lattner
0f6ab6ff97
Implement CodeGen/PowerPC/or-addressing-mode.ll, which is also PR668.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26450 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 07:14:48 +00:00
Chris Lattner
00d18f0879
add a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26448 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 06:36:20 +00:00
Chris Lattner
5126984b1d
Compile this:
...
void foo(float a, int *b) { *b = a; }
to this:
_foo:
fctiwz f0, f1
stfiwx f0, 0, r4
blr
instead of this:
_foo:
fctiwz f0, f1
stfd f0, -8(r1)
lwz r2, -4(r1)
stw r2, 0(r4)
blr
This implements CodeGen/PowerPC/stfiwx.ll, and also incidentally does the
right thing for GCC bugzilla 26505.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 05:50:56 +00:00
Chris Lattner
8c13d0a573
Use a target-specific dag-combine to implement CodeGen/PowerPC/fp-int-fp.ll.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26445 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 04:57:39 +00:00
Chris Lattner
2466472a2b
Add support for target-specific dag combines
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26443 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 04:53:38 +00:00
Chris Lattner
00ffed0468
Add interfaces for targets to provide target-specific dag combiner optimizations.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26442 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 04:52:55 +00:00
Chris Lattner
5750df9d69
Add a new AddToWorkList method, start using it
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26441 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 04:03:14 +00:00
Chris Lattner
0b1a85f110
Pull shifts by a constant through multiplies (a form of reassociation),
...
implementing Regression/CodeGen/X86/mul-shift-reassoc.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26440 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 03:44:24 +00:00
Evan Cheng
d30bf01e90
Vector op lowering.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26438 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 01:11:20 +00:00
Evan Cheng
860771d2d8
Vector ops lowering.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26436 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 01:09:54 +00:00
Evan Cheng
f338dd881f
New type v2f32.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26435 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 01:06:22 +00:00
Evan Cheng
1ab7d859cf
- Added VConstant as an abstract version of ConstantVec.
...
- All abstrct vector nodes must have # of elements and element type as their
first two operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26432 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 00:51:13 +00:00
Evan Cheng
aafc1412b1
Another entry.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26430 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 23:38:49 +00:00
Evan Cheng
8c03fe4aca
Don't match x << 1 to LEAL. It's better to emit x + x.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26429 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 21:13:57 +00:00
Jim Laskey
45ccae5b7d
Add const, volatile, restrict support.
...
Add array of debug descriptor support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26428 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 20:15:07 +00:00
Chris Lattner
06e1e25368
Fix a regression in a patch from a couple of days ago. This fixes
...
Transforms/InstCombine/2006-02-28-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26427 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 19:47:20 +00:00
Chris Lattner
bf751e2d6f
Add a subtarget feature for the stfiwx instruction. I know the G5 has it,
...
but I don't know what other PPC impls do. If someone could update the proc
table, I would appreciate it :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26421 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 07:08:22 +00:00
Chris Lattner
35a9f5a241
Compile:
...
unsigned foo4(unsigned short *P) { return *P & 255; }
unsigned foo5(short *P) { return *P & 255; }
to:
_foo4:
lbz r3,1(r3)
blr
_foo5:
lbz r3,1(r3)
blr
not:
_foo4:
lhz r2, 0(r3)
rlwinm r3, r2, 0, 24, 31
blr
_foo5:
lhz r2, 0(r3)
rlwinm r3, r2, 0, 24, 31
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26419 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 06:49:37 +00:00
Chris Lattner
f4c8575c27
remove implemented item
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26418 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 06:36:04 +00:00
Chris Lattner
15045b6973
Fold "and (LOAD P), 255" -> zextload. This allows us to compile:
...
unsigned foo3(unsigned *P) { return *P & 255; }
as:
_foo3:
lbz r3, 3(r3)
blr
instead of:
_foo3:
lwz r2, 0(r3)
rlwinm r3, r2, 0, 24, 31
blr
and:
unsigned short foo2(float a) { return a; }
as:
_foo2:
fctiwz f0, f1
stfd f0, -8(r1)
lhz r3, -2(r1)
blr
instead of:
_foo2:
fctiwz f0, f1
stfd f0, -8(r1)
lwz r2, -4(r1)
rlwinm r3, r2, 0, 16, 31
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26417 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 06:35:35 +00:00
Chris Lattner
71d9ebcbc1
fold (sra (sra x, c1), c2) -> (sra x, c1+c2)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26416 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 06:23:04 +00:00
Chris Lattner
9794392781
Implement rem.ll:test[7-9] and PR712
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26415 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 05:49:21 +00:00
Chris Lattner
6c9951b0da
Simplify some code now that the RHS of a rem can't be 0
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26413 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 05:40:55 +00:00
Chris Lattner
19ccd5c757
Rearrange some code, fold "rem X, 0", implementing rem.ll:test6
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26411 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-28 05:30:45 +00:00
Chris Lattner
22873462c9
Add support for output memory constraints.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26410 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 23:45:39 +00:00
Jim Laskey
9a777a3a8e
Qualify dwarf namespace inside llvm namespace.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26409 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 22:37:23 +00:00
Nate Begeman
6e53ceb0d4
readme updates
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26405 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 22:08:36 +00:00
Jim Laskey
8a8e9756c8
Partial enabling of functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26404 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 20:37:42 +00:00
Chris Lattner
a34544d96c
Don't print constant initializers, they may span lines now.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26403 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 20:09:23 +00:00
Jim Laskey
bd76184e67
Supporting multiple compile units.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26402 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 17:27:12 +00:00
Jim Laskey
0d086af82b
Re-orging file.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26401 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 12:43:29 +00:00
Jim Laskey
38a409c7ae
Pretty print large struct constants.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26400 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 10:33:53 +00:00
Jim Laskey
dae29989cf
Removed dependency on how operands are printed (want multi-line.)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26399 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 10:29:04 +00:00
Chris Lattner
3e88a4d700
Merge two almost-identical pieces of code.
...
Make this code more powerful by using ComputeMaskedBits instead of looking
for an AND operand. This lets us fold this:
int %test23(int %a) {
%tmp.1 = and int %a, 1
%tmp.2 = seteq int %tmp.1, 0
%tmp.3 = cast bool %tmp.2 to int ;; xor tmp1, 1
ret int %tmp.3
}
into: xor (and a, 1), 1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26396 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 02:38:23 +00:00
Chris Lattner
26ab9a9218
Fold (A^B) == A -> B == 0
...
and (A-B) == A -> B == 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26394 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 01:44:11 +00:00
Chris Lattner
a6bc5a4d21
Implement bit propagation through sub nodes, this (re)implements
...
PowerPC/div-2.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26392 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 01:00:42 +00:00
Chris Lattner
2d2536c9d7
remove some completed notes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26390 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 00:39:31 +00:00
Chris Lattner
81cd35586f
Check RHS simplification before LHS simplification to avoid infinitely looping
...
on PowerPC/small-arguments.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26389 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 00:36:27 +00:00
Chris Lattner
5f0c658aa4
Just like we use the RHS of an AND to simplify the LHS, use the LHS to
...
simplify the RHS. This allows for the elimination of many thousands of
ands from multisource, and compiles CodeGen/PowerPC/and-elim.ll:test2
into this:
_test2:
srwi r2, r3, 1
xori r3, r2, 40961
blr
instead of this:
_test2:
rlwinm r2, r3, 31, 17, 31
xori r2, r2, 40961
rlwinm r3, r2, 0, 16, 31
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26388 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-27 00:22:28 +00:00
Chris Lattner
ec665151b8
Add a bunch of missed cases. Perhaps the most significant of which is that
...
assertzext produces zero bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26386 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-26 23:36:02 +00:00
Chris Lattner
02bd1b3e94
Fold (X|C1)^C2 -> X^(C1|C2) when possible. This implements
...
InstCombine/or.ll:test23.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26385 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-26 19:57:54 +00:00
Jim Laskey
c13a72c329
Reverting. Didn't realize some developers were embedding constants in their
...
target assembler code gen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26383 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-26 10:16:05 +00:00
Evan Cheng
140a4c4868
ConstantPoolIndex is now the displacement portion of the address (rather
...
than base).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26382 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-26 09:12:34 +00:00
Evan Cheng
38b7327ec0
Print ConstantPoolSDNode offset field.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26381 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-26 08:36:57 +00:00
Evan Cheng
a09bd8190c
Fixed ConstantPoolIndex operand asm print bug. This fixed 2005-07-17-INT-To-FP
...
and 2005-05-12-Int64ToFP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-26 08:28:12 +00:00
Jim Laskey
a3f332bdc3
Format large struct constants for readability.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26379 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 12:27:03 +00:00
Evan Cheng
51a9ed9b41
* Cleaned up addressing mode matching code.
...
* Cleaned up and tweaked LEA cost analysis code. Removed some hacks.
* Handle ADD $X, c to MOV32ri $X+c. These patterns cannot be autogen'd and
they need to be matched before LEA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26376 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 10:09:08 +00:00
Evan Cheng
53f280a30e
Updates.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26375 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 10:04:07 +00:00
Evan Cheng
71fb834b50
* Allow mul, shl nodes to be codegen'd as LEA (if appropriate).
...
* Add patterns to handle GlobalAddress, ConstantPool, etc.
MOV32ri to materialize these nodes in registers.
ADD32ri to handle %reg + GA, etc.
MOV32mi to handle store GA, etc. to memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 10:02:21 +00:00
Evan Cheng
c4ee50c6b9
ConstantPoolIndex is now the displacement field of addressing mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26373 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 09:56:50 +00:00
Evan Cheng
bbbb2fbbde
Added a common about the need for X86ISD::Wrapper.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26372 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 09:55:19 +00:00
Evan Cheng
404cb4f9fa
Added an offset field to ConstantPoolSDNode.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26371 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 09:54:52 +00:00
Chris Lattner
28bad08411
Fix a bug that Evan exposed with some changes he's making, and that was
...
exposed with a fastcc problem (breaking pcompress2 on x86 with -enable-x86-fastcc).
When reloading a reused reg, make sure to invalidate the reloaded reg, and
check to see if there are any other pending uses of the same register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 02:17:31 +00:00
Chris Lattner
47cb7173ea
Remove debugging printout :)
...
Add a minor compile time win, no codegen change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26368 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 02:03:40 +00:00
Chris Lattner
540fec6b38
Refactor some code from being inline to being out in a new class with methods.
...
This gets rid of two gotos, which is always nice, and also adds some comments.
No functionality change, this is just a refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26367 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 01:51:33 +00:00
Evan Cheng
cb4a38e75d
Fix an obvious bug exposed when we are doing
...
ADD X, 4
==>
MOV32ri $X+4, ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26366 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-25 01:37:02 +00:00
Chris Lattner
2c003e26e5
Add memory printing support for PPC. Input memory operands now work with
...
inline asms! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26365 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 20:27:40 +00:00
Chris Lattner
dd26033002
Use the PrintAsmMemoryOperand to print addressing modes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26364 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 20:21:58 +00:00
Chris Lattner
daf6bc6347
Pass all the flags to the asm printer, not just the # operands.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26362 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 19:50:58 +00:00
Chris Lattner
fd6d282a71
rename NumOps -> NumVals to avoid shadowing a NumOps var in an outer scope.
...
Add support for addressing modes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26361 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 19:18:20 +00:00
Chris Lattner
ed18b6896e
Refactor operand adding out to a new AddOperand method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26358 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 18:54:03 +00:00
Chris Lattner
97f37a439c
Fix a problem that Nate noticed that boils down to an over conservative check
...
in the code that does "select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y)))".
We now compile this loop:
LBB1_1: ; no_exit
add r6, r2, r3
subf r3, r2, r3
cmpwi cr0, r2, 0
addi r7, r5, 4
lwz r2, 0(r5)
addi r4, r4, 1
blt cr0, LBB1_4 ; no_exit
LBB1_3: ; no_exit
mr r3, r6
LBB1_4: ; no_exit
cmpwi cr0, r4, 16
mr r5, r7
bne cr0, LBB1_1 ; no_exit
into this instead:
LBB1_1: ; no_exit
srawi r6, r2, 31
add r2, r2, r6
xor r6, r2, r6
addi r7, r5, 4
lwz r2, 0(r5)
addi r4, r4, 1
add r3, r3, r6
cmpwi cr0, r4, 16
mr r5, r7
bne cr0, LBB1_1 ; no_exit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26356 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 18:05:58 +00:00
Jim Laskey
6990600f93
Add pointer and reference types. Added short-term code to ignore NULL types
...
(to allow llvm-gcc4 to build.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26355 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 16:46:40 +00:00
Jeff Cohen
7e88103cde
Get VC++ building again.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26351 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 02:52:40 +00:00
Chris Lattner
0e43f2ba11
Implement (most of) selection of inline asm memory operands.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26350 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 02:13:54 +00:00
Chris Lattner
e5d8861126
Implement selection of inline asm memory operands
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26348 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 02:13:12 +00:00
Chris Lattner
87bc3bd121
Lower C_Memory operands.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26346 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 01:11:24 +00:00
Chris Lattner
2b7401e28e
Recognize memory operand codes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26345 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 01:10:46 +00:00
Chris Lattner
fe3db46fe0
Parse the %*# constraint modifiers
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26341 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 23:36:53 +00:00
Jim Laskey
434b40b42f
Added basic support for typedefs.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26339 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 22:37:30 +00:00
Evan Cheng
d0839f3071
PPC JIT relocation model should be DynamicNoPIC.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26338 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 22:18:07 +00:00
Evan Cheng
020d2e8e7a
- Clean up the lowering and selection code of ConstantPool, GlobalAddress,
...
and ExternalSymbol.
- Use C++ code (rather than tblgen'd selection code) to match the above
mentioned leaf nodes. Do not mutate and nodes and do not record the
selection in CodeGenMap. These nodes should be safe to duplicate. This is
a performance win.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26335 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 20:41:18 +00:00
Chris Lattner
9f6637db10
Fix an endianness problem on big-endian targets with expanded operands
...
to inline asms. Mark some methods const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26334 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 20:06:57 +00:00
Chris Lattner
e3f01570c1
Implement the PPC inline asm "L" modifier. This allows us to compile:
...
long long test(long long X) {
__asm__("foo %0 %L0 %1 %L1" : "=r"(X): "r"(X));
return X;
}
to:
foo r2 r3 r2 r3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26333 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 19:31:10 +00:00
Chris Lattner
c3a9f8d31c
Record all of the expanded registers in the DAG and machine instr, fixing
...
several bugs in inline asm expanded operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26332 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 19:21:04 +00:00
Jim Laskey
f4afdd9f41
DwarfWriter reading basic type information from llvm-gcc4 code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26331 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 16:58:18 +00:00
Chris Lattner
ffab42263a
Code cleanups, no functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26328 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 06:44:17 +00:00
Chris Lattner
e650a6b3f4
"." isn't enough to get a private label on linux, use ".L".
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26327 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 05:25:02 +00:00
Chris Lattner
205065ae0c
add a small and simple case.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26326 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 05:17:43 +00:00
Evan Cheng
3032410f9b
A couple of new entries.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26325 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 02:50:21 +00:00
Evan Cheng
a0ea0539e3
PIC related bug fixes.
...
1. Various asm printer bug.
2. Lowering bug. Now TargetGlobalAddress is wrapped in X86ISD::TGAWrapper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26324 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 02:43:52 +00:00
Evan Cheng
224ec39cab
X86 codegen tweak to use lea in another case:
...
Suppose base == %eax and it has multiple uses, then instead of
movl %eax, %ecx
addl $8, %ecx
use
leal 8(%eax), %ecx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 00:13:58 +00:00
Evan Cheng
f1616dadad
Missing .globl for weak / link-once .text symbols.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26321 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 23:59:57 +00:00
Chris Lattner
f8bf116f80
Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, which
...
caused SPASS to fail building last night.
We can't trivially unswitch a loop if the exit block has phi nodes in it,
because we don't know which predecessor to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26320 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 23:55:00 +00:00
Chris Lattner
9b6fb5de49
This fixes a couple of problems with expansion
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 23:09:03 +00:00
Chris Lattner
b3befd41b4
Don't return registers from register classes that aren't legal.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26317 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 23:00:51 +00:00
Chris Lattner
864635ad7b
Change a whole bunch of code to be built around RegsForValue instead of
...
a single register number. This fully implements promotion for inline asms,
expand is close but not quite right yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26316 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 22:37:12 +00:00
Evan Cheng
4c1aa86657
- Added option -relocation-model to set relocation model. Valid values include static, pic,
...
dynamic-no-pic, and default.
PPC and x86 default is dynamic-no-pic for Darwin, pic for others.
- Removed options -enable-pic and -ppc-static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26315 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 20:19:42 +00:00
Jim Laskey
0420f2aaf9
Coordinate activities with llvm-gcc4 and dwarf.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26314 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 19:02:11 +00:00
Chris Lattner
bd28e3f8ef
Add some comments, simplify some code, and fix a bug that caused rewriting
...
to rewrite with the wrong value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26311 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 06:37:14 +00:00
Evan Cheng
470a6adc78
Added MMX, SSE1, and SSE2 vector instructions and some simple patterns.
...
Fixed some existing bugs (wrong predicates, prefixes) at the same time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26310 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 02:26:30 +00:00
Chris Lattner
1efa40f6a4
split register class handling from explicit physreg handling.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26308 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 00:56:39 +00:00
Chris Lattner
0f0b7d4927
Adjust to changes in getRegForInlineAsmConstraint prototype
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26306 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 23:12:12 +00:00
Chris Lattner
4217ca8dc1
Updates to match change of getRegForInlineAsmConstraint prototype
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26305 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 23:11:00 +00:00
Evan Cheng
4e4c71e423
One more round of reorg so sabre doesn't freak out. :-)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26303 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 20:00:20 +00:00
Evan Cheng
beb07e117d
A big more cleaning up.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26302 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 19:30:30 +00:00
Evan Cheng
bf156d1ae6
Moving things to their proper places.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26301 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 19:26:52 +00:00
Evan Cheng
ffcb95beab
Split instruction info into multiple files, one for each of x87, MMX, and SSE.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26300 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 19:13:53 +00:00
Chris Lattner
a1532bc283
missed optzn
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 18:29:44 +00:00
Chris Lattner
2deb87f201
The HasNoV9 hack isn't needed here, now that tblgen knows that CustomDAGSchedInserter
...
instructions are expensive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 18:04:32 +00:00
Evan Cheng
747a90d887
Added separate alias instructions for SSE logical ops that operate on non-packed types.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26297 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 02:24:38 +00:00
Evan Cheng
7dbc0a3351
Added MMX and XMM packed integer move instructions, movd and movq.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26296 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 01:39:57 +00:00
Evan Cheng
933be3318b
Added SSE2 128-bit integer packed types: V16I8, V8I16, V4I32, and V2I64.
...
Added generic vector types: VR64 and VR128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26295 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 01:38:21 +00:00
Evan Cheng
aea20f50e5
Added x86 integer vector types: 64-bit packed byte integer (v16i8), 64-bit
...
packed word integer (v8i16), and 64-bit packed doubleword integer (v2i32).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26294 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-20 22:34:53 +00:00
Evan Cheng
755ee8f9aa
Some updates
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26292 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-20 19:58:27 +00:00
Chris Lattner
7d20d39009
Fix a problem Nate and Duraid reported where simplifying nodes can cause
...
them to get ressurected, in which case, deleting the undead nodes is
unfriendly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26291 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-20 06:51:04 +00:00
Chris Lattner
dca7abed91
Fix a problem on itanium with memset. The value to set has been promoted to
...
i64 before this code, so zero_ext doesn't work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26290 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-20 06:38:35 +00:00
Chris Lattner
a6fc94b71e
improved support for branch folding, still not enabled.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26289 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 07:57:38 +00:00
Evan Cheng
45af8fd8c2
If SSE3 is available, promote FP_TO_UINT i32 to FP_TO_SINT i64 to take
...
advantage of fisttpll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26288 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 07:26:17 +00:00
Jeff Cohen
bce4805d6f
Fix bugs identified by VC++.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 03:20:33 +00:00
Nate Begeman
003a272319
Add a fold for add that exchanges it with a constant shift if possible, so
...
that the shift may be more easily folded into other operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26286 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 02:43:25 +00:00
Chris Lattner
db41024a85
Implement deletion of dead blocks, currently disabled.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26285 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 02:42:34 +00:00
Nate Begeman
b0d04a7dea
Add checks to make sure we don't create bogus extend nodes, and fix a bug
...
where we were doing exactly that which was causing failures on x86 and
alpha.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26284 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 02:40:58 +00:00
Evan Cheng
2b15271571
Added fisttp for fp to int conversion.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26283 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 02:36:28 +00:00
Evan Cheng
6428302f3d
Disable PIC for JIT.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 01:49:25 +00:00
Chris Lattner
caf4893536
a previous patch completely disabled trivial unswitching, this fixees it.
...
Thanks to nate for pointing this out :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26280 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 01:32:04 +00:00
Chris Lattner
f4412d890d
initial trivial support for folding branches that have now-constant destinations.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 01:27:45 +00:00
Evan Cheng
5e8b5558f7
Jit does not support PIC yet.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 00:57:10 +00:00
Chris Lattner
25cae0fd1c
When unswitching a loop, make sure to update loop info with exit blocks in
...
the right loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26277 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 00:55:32 +00:00
Chris Lattner
299520de7c
Fix Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26275 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 00:33:17 +00:00
Evan Cheng
7ccced634a
x86 / Darwin PIC support.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26273 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 00:15:05 +00:00
Evan Cheng
d2ee218b49
Moved PICEnabled to include/llvm/Target/TargetOptions.h
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26272 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 00:08:58 +00:00
Chris Lattner
012f241987
Fix a tricky issue in the SimplifyDemandedBits code where CombineTo wasn't
...
exactly the API we wanted to call into. This fixes the crash on crafty last
night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26269 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 21:58:01 +00:00
Nate Begeman
fb7217bea3
Clean up DemandedBitsAreZero interface
...
Make more use of the new mask helpers in valuetypes.h
Combine (sra (srl x, c1), c1) -> sext_inreg if legal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26263 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 19:54:08 +00:00
Nate Begeman
cd6a6ed0a9
Don't expand sdiv by power of two before legalize, since it will likely
...
generate illegal nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26261 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 07:26:20 +00:00
Chris Lattner
c2fe97e726
unbreak the build
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26260 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 07:09:27 +00:00
Evan Cheng
5298bcc722
Unbreak x86 be
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26259 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 07:01:52 +00:00
Chris Lattner
0017d480cc
Fix loops where the header has an exit, fixing a loop-unswitch crash on crafty
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26258 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 06:39:56 +00:00
Nate Begeman
551bf3f800
kill ADD_PARTS & SUB_PARTS and replace them with fancy new ADDC, ADDE, SUBC
...
and SUBE nodes that actually expose what's going on and allow for
significant simplifications in the targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26255 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 05:43:56 +00:00
Chris Lattner
25125697fb
Fix another miscompilation exposed by lencode, where we lowered i64->f32
...
conversions to __floatdidf instead of __floatdisf on targets that support
f32 but not i64 (e.g. sparc).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26254 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 04:32:33 +00:00
Chris Lattner
a648df2871
add note about div by power of 2
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26253 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 04:20:13 +00:00
Jeff Cohen
5755b17044
Fix bug noticed by VC++.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26252 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 02:12:18 +00:00
Nate Begeman
9c3c2e9686
Whoops, didn't mean to check this in yet.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26250 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 00:56:19 +00:00
Nate Begeman
c22f357b78
Add a missing and useful pat frag
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26249 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 00:51:06 +00:00
Chris Lattner
52221f7b16
start of some new simplification code, not thoroughly tested, use at your own
...
risk :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26248 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 00:31:07 +00:00
Evan Cheng
7634ac4a9b
Remind ourselves to revisit the "pxor vs. xorps/xorpd to clear XMM registers"
...
issue. Need to do more experiments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26247 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 00:04:28 +00:00
Nate Begeman
4c5dcf54ff
Kill the x86 pattern isel. boom.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26246 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 00:03:04 +00:00
Evan Cheng
dc8acb6420
Remove the entry about using movapd for SSE reg-reg moves.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26245 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-17 00:00:58 +00:00
Evan Cheng
39d1761c70
pxor (for FLD0SS) encoding was missing the OpSize prefix.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26244 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 23:59:30 +00:00
Chris Lattner
6a6eb7b622
Remove the skeleton target, it doesn't produce useful code and there are
...
other small targets that do that can be learned from. They also have
the added advantage of being tested :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26243 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 23:14:50 +00:00
Evan Cheng
cffbb5174f
Dumb bug. Code sees a memcpy from X+c so it increments src offset. But it
...
turns out not to point to a constant string but it forgot change the offset
back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26242 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 23:11:42 +00:00
Evan Cheng
fe5cb19405
1. Use pxor instead of xoraps / xorapd to clear FR32 / FR64 registers. This
...
proves to be worth 20% on Ptrdist/ks. Might be related to dependency
breaking support.
2. Added FsMOVAPSrr and FsMOVAPDrr as aliases to MOVAPSrr and MOVAPDrr. These
are used for FR32 / FR64 reg-to-reg copies.
3. Tell reg-allocator to generate MOVSSrm / MOVSDrm and MOVSSmr / MOVSDmr to
spill / restore FsMOVAPSrr and FsMOVAPDrr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26241 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 22:45:17 +00:00
Evan Cheng
19ade3bf9c
Use movaps / movapd to spill / restore V4F4 / V2F8 registers.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26240 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 21:20:26 +00:00
Nate Begeman
368e18d56a
Rework the SelectionDAG-based implementations of SimplifyDemandedBits
...
and ComputeMaskedBits to match the new improved versions in instcombine.
Tested against all of multisource/benchmarks on ppc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26238 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 21:11:51 +00:00
Chris Lattner
10cd9bbde7
Change SplitBlock to increment a BasicBlock::iterator, not an Instruction*. Apparently they do different things :)
...
This fixes a testcase that nate reduced from spass.
Also included are a couple minor code changes that don't affect the generated
code at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26235 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 19:36:22 +00:00
Evan Cheng
77dea9b3c3
MOVAPSrr and MOVAPDrr instruction format should be MRMSrcReg.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26234 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 19:34:41 +00:00
Duraid Madina
00d3d44b75
distinguish between objects and register names, now we can have stuff
...
with names like "f84", "in6" etc etc.
this should fix one or two tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26232 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 13:12:57 +00:00
Evan Cheng
298ebf2bd8
If the false case is the current basic block, then this is a self loop.
...
We do not want to emit "Loop: ... brcond Out; br Loop", as it adds an extra
instruction in the loop. Instead, invert the condition and emit
"Loop: ... br!cond Loop; br Out.
Generalize the fix by moving it from PPCDAGToDAGISel to SelectionDAGLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26231 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 08:27:56 +00:00
Chris Lattner
8f4880be66
Lowering of sdiv X, pow2 was broken, this fixes it. This patch is written
...
by Nate, I'm just committing it for him.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26230 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 08:02:36 +00:00
Jeff Cohen
21c107ab0f
Fix VC++ warning.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26228 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 04:07:37 +00:00
Evan Cheng
d51425a82d
Use movaps / movapd (instead of movss / movsd) to do FR32 / FR64 reg to reg
...
transfer.
According to the Intel P4 Optimization Manual:
Moves that write a portion of a register can introduce unwanted
dependences. The movsd reg, reg instruction writes only the bottom
64 bits of a register, not to all 128 bits. This introduces a dependence on
the preceding instruction that produces the upper 64 bits (even if those
bits are not longer wanted). The dependence inhibits register renaming,
and thereby reduces parallelism.
Not to mention movaps is shorter than movss.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26226 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 01:50:02 +00:00
Chris Lattner
f17c42d409
fix a bug where we unswitched the wrong way
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26225 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 01:24:41 +00:00
Evan Cheng
18a8452f3d
A bit more memset / memcpy optimization.
...
Turns them into calls to memset / memcpy if 1) buffer(s) are not DWORD aligned,
2) size is not known to be greater or equal to some minimum value (currently 128).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26224 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 00:21:07 +00:00
Chris Lattner
a48654ef23
Implement trivial unswitching for switch stmts. This allows us to trivial
...
unswitch this loop on 2 before sweating to unswitch on 1/3.
void test4(int N, int i, int C, int*P, int*Q) {
int j;
for (j = 0; j < N; ++j) {
switch (C) { // general unswitching.
default: P[i+j] = 0; break;
case 1: Q[i+j] = 0; break;
case 3: P[i+j] = Q[i+j]; break;
case 2: break; // TRIVIAL UNSWITCH on C==2
}
}
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26223 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 22:52:05 +00:00
Evan Cheng
fe1c31204e
Remove an entry.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26222 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 22:14:34 +00:00
Evan Cheng
a47876d87a
Remove an unused function parameter.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26221 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 22:12:35 +00:00
Chris Lattner
4e1323969c
make "trivial" unswitching significantly more general. It can now handle
...
this for example:
for (j = 0; j < N; ++j) { // trivial unswitch
if (C)
P[i+j] = 0;
}
turning it into the obvious code without bothering to duplicate an empty loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26220 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 22:03:36 +00:00
Evan Cheng
74d0aa9a4b
Turn a memcpy from string constant into a series of stores of constant values.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26219 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 21:59:04 +00:00
Andrew Lenharth
2f9859486a
fix a bunch of alpha regressions. see bug 709
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26218 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 21:13:37 +00:00
Chris Lattner
5946fef1db
new test
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26217 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 19:52:06 +00:00
Jim Laskey
d0e58e36a9
Should not combine ISD::LOCATIONs until we have scheme to remove from
...
MachineDebugInfo tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26216 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 19:34:44 +00:00
Chris Lattner
3fdde110eb
Checking the wrong value. This caused us to emit silly code like
...
Y = seteq bool X, true
instead of just using X :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26215 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 19:05:52 +00:00
Chris Lattner
58af2a1c5f
Convert this over to work with the new makefiles
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26206 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 07:22:58 +00:00
Chris Lattner
45090476be
Sparc actually *DOES* have a directive for emitting zeros. In fact, it requires
...
it, because this:
.bss
X:
.byte 0
results in the assembler warning: "initialization in bss segment". Annoying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26204 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 07:07:14 +00:00
Chris Lattner
2fecc0f9e2
random lexer change to test the makefile updating stuff
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26203 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 07:02:59 +00:00
Chris Lattner
6fa1f57c66
Fix SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c on Sparc.
...
The ABI specifies that there is a register save area at the bottom of the
stack, which means the actual used pointer needs to be an offset from
the subtracted value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26202 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 06:41:34 +00:00
Evan Cheng
2354f5a46b
Remove an entry.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26197 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 01:56:48 +00:00
Evan Cheng
17ef92eda7
Use .zerofill on x86/darwin.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26196 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 01:56:23 +00:00
Evan Cheng
c080d6fb3d
Lower memcpy with small constant size operand into a series of load / store
...
ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 01:54:51 +00:00
Chris Lattner
6d9d13d2e4
more refactoring, no functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26194 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 01:44:42 +00:00
Evan Cheng
f3f0a9c587
cvtsd2ss / cvtss2sd encoding bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26193 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 00:31:03 +00:00
Evan Cheng
7335f9beea
movaps, movapd encoding bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26192 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 00:11:37 +00:00
Chris Lattner
fed5d9dbd3
pull some code out into a function
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26191 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 00:07:43 +00:00
Chris Lattner
0ab9f966de
Canonicalize inner loops before outer loops. Inner loop canonicalization
...
can provide work for the outer loop to canonicalize.
This fixes a case that breaks unswitching.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26189 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 23:06:02 +00:00
Evan Cheng
dea7245997
Doh again!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26188 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 23:05:54 +00:00
Chris Lattner
c27e056d4f
When splitting exit edges to canonicalize loops, make sure to put the new
...
block in the appropriate loop nest.
Third time is the charm, right?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26187 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 22:34:08 +00:00
Chris Lattner
ae302ab9cb
new note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26186 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 22:19:54 +00:00
Chris Lattner
0d7db6f79a
If we have zero initialized data with external linkage, use .zerofill to
...
emit it (instead of .space), saving a bit of space in the .o file.
For example:
int foo[100];
int bar[100] = {};
when compiled with C++ or -fno-common results in shrinkage from 1160 to 360
bytes of space. The X86 backend can also do this on darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26185 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 22:18:23 +00:00
Jim Laskey
ae9a84b9be
Using wrong DW_FORM.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26184 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 22:01:57 +00:00
Evan Cheng
ee50a1ae27
Don't special case XS, XD prefixes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26183 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 21:52:51 +00:00
Evan Cheng
576c141921
Bug fix: XS, XD prefixes were being emitted twice.
...
XMM registers were not being handled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26182 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 21:45:24 +00:00
Chris Lattner
33d5082779
Make sure that weak functions are aligned properly
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26181 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 20:42:33 +00:00
Evan Cheng
ddf7532442
Duh
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26180 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 20:37:37 +00:00
Evan Cheng
968c178172
Remove -disable-x86-sse
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26179 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 20:30:14 +00:00
Chris Lattner
60330ff193
add an assert
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26178 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 20:14:17 +00:00
Evan Cheng
c4f8eee054
Keep to < 80 cols
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26177 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 20:12:38 +00:00
Evan Cheng
ac940ab1bf
Missed a break so memcpy cases fell through to memset. Doh.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26176 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 19:45:56 +00:00
Evan Cheng
80e89d7d6c
Fixed a build breakage.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26175 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 09:11:59 +00:00
Evan Cheng
a03a5dc7ce
Rename maxStoresPerMemSet to maxStoresPerMemset, etc.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26174 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 08:38:30 +00:00
Evan Cheng
952b7d6a1e
Add a entry.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26173 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 08:25:32 +00:00
Evan Cheng
87ed716d21
Set maxStoresPerMemSet to 16. Ditto for maxStoresPerMemCpy and
...
maxStoresPerMemMove. Although the last one is not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26172 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 08:25:08 +00:00
Evan Cheng
1db92f947c
Expand memset dst, c, size to a series of stores if size falls below the
...
target specific theshold, e.g. 16 for x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26171 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 08:22:34 +00:00
Evan Cheng
82eaf628b4
Enable SSE (for the right subtargets)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26169 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 08:07:58 +00:00
Chris Lattner
06a248c9b3
now that libcalls don't suck, we can remove this hack
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26164 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 05:39:35 +00:00
Chris Lattner
32eecb09a2
adjust to new style of handling lexer changes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26162 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 05:14:46 +00:00
Chris Lattner
3dd4c402de
Use statistics to keep track of what flavors of loops we are unswitching
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26157 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 01:01:41 +00:00
Chris Lattner
4b653a0405
Fix a latent bug in the call sequence handling stuff. Some targets (e.g. x86)
...
create these nodes with flag results. Remember that we legalized them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26156 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 00:55:02 +00:00
Chris Lattner
2082ad9b41
Implement Instcombine/and.ll:test34
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26155 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 23:07:23 +00:00
Chris Lattner
f345fe4d9a
If any of the sign extended bits are demanded, the input sign bit is demanded
...
for a sign extension.
This fixes InstCombine/2006-02-13-DemandedMiscompile.ll and Ptrdist/bc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26152 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 22:41:07 +00:00
Chris Lattner
f9a05329a1
Another hack due to allowing multiple symbols with the same name.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26150 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 22:22:42 +00:00
Chris Lattner
ed1e1e232f
Another work around for the 'symbols with different types can have the same
...
name' issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26149 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 21:43:26 +00:00
Andrew Lenharth
40ec5037fa
improved zap discovery
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26148 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 18:52:29 +00:00
Jim Laskey
d96185aa62
Rename to better reflect usage (current and planned.)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26145 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 12:50:39 +00:00
Chris Lattner
6831a81599
Completely rewrite libcall insertion by the legalizer, providing the
...
following handy-dandy properties:
1. it is always correct now
2. it is much faster than before
3. it is easier to understand
This implementation builds off of the recent simplifications of the
legalizer that made it single-pass instead of iterative.
This fixes JM/lencod, JM/ldecod, and
CodeGen/Generic/2006-02-12-InsertLibcall.ll (at least on PPC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 09:18:02 +00:00
Chris Lattner
94dd29216c
Switch targets over to using SelectionDAG::getCALLSEQ_START to create
...
CALLSEQ_START nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26143 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 09:00:43 +00:00
Chris Lattner
45b3976db7
Switch to using getCALLSEQ_START instead of using our own creation calls
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26142 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 08:55:29 +00:00
Chris Lattner
c15637bafc
Be careful not to request or look at bits shifted in from outside the size
...
of the input. This fixes the mediabench/gsm/toast failure last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26138 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 06:09:08 +00:00
Nate Begeman
789fd42320
Add missing patterns for andi. and andis., fixing test/Regression/CodeGen/
...
PowerPC/and-imm.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26136 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 09:09:52 +00:00
Chris Lattner
8d6bbdbbcb
remove some more dead special case code
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26135 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 08:07:37 +00:00
Chris Lattner
f8c36f502b
Eliminate special case hacks that are superceded by general purpose hacks
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26134 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 08:02:11 +00:00
Chris Lattner
bf5d8a8270
Three changes:
...
1. Teach GetConstantInType to handle boolean constants.
2. Teach instcombine to fold (compare X, CST) when X has known 0/1 bits.
Testcase here: set.ll:test22
3. Improve the "(X >> c1) & C2 == 0" folding code to allow a noop cast
between the shift and and. More aggressive bitfolding for other reasons
was turning signed shr's into unsigned shr's, leaving the noop cast in
the way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26131 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 02:07:56 +00:00
Chris Lattner
ee628cfefb
Revert my last patch. It too breaks stuff
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26128 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 01:59:10 +00:00
Chris Lattner
d308ddcd67
Fix for my previously reverted patch
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26126 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 21:24:54 +00:00
Chris Lattner
255d8919b6
Port the recent innovations in ComputeMaskedBits to SimplifyDemandedBits.
...
This allows us to simplify on conditions where bits are not known, but they
are not demanded either! This also fixes a couple of bugs in
ComputeMaskedBits that were exposed during this work.
In the future, swaths of instcombine should be removed, as this code
subsumes a bunch of ad-hockery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26122 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 09:31:47 +00:00
Chris Lattner
5077c7be92
revert my previous change, it exposed other problems.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26121 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 08:47:47 +00:00
Duraid Madina
b20f97959e
fix storing booleans (grawp missed this one)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26120 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 07:33:17 +00:00
Duraid Madina
631a140054
now short immediates will get matched (previously constants were all
...
triggering movl 64bit imm fat instructions)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26119 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 07:32:15 +00:00
Chris Lattner
8587eb3a51
Make this check stricter. Disallow loop exit blocks from being shared by
...
loops and their subloops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26118 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 02:13:17 +00:00
Evan Cheng
2486af1b53
Prevent certain nodes that have already been selected from being folded into
...
X86 addressing mode. Currently we do not allow any node whose target node
produces a chain as well as any node that is at the root of the addressing
mode expression tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26117 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 02:05:36 +00:00
Chris Lattner
441365c46e
remove dead expr
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26116 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 01:43:37 +00:00
Jim Laskey
ce72b1755f
Reorg for integration with gcc4. Old style debug info will not be passed though
...
to SelIDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26115 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 01:01:30 +00:00
Chris Lattner
c23580969f
implement unswitching of loops with switch stmts and selects in them
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26114 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 00:43:37 +00:00
Chris Lattner
e825593bf2
Update PHI nodes in successors of exit blocks.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26113 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 23:26:14 +00:00
Chris Lattner
b2bc315eac
Reform the unswitching code in terms of edge splitting, not block splitting.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26112 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 23:16:39 +00:00
Evan Cheng
23addc061c
Nicer code. :-)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26111 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 22:46:26 +00:00
Evan Cheng
f597dc78f8
Added X86 isel debugging stuff.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26110 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 22:24:32 +00:00
Chris Lattner
81be2e961b
Fix a case where UnswitchTrivialCondition broke critical edges with
...
phi's in the successors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26108 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 19:08:15 +00:00
Chris Lattner
ad7a3e6208
Use the auto-generated call matcher. Remove a broken impl of the frameaddr/returnaddr
...
intrinsics.
Autogen frameindex matcher
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26107 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 07:35:42 +00:00
Chris Lattner
f613fcb741
Update to new-style flags usage, simplifying the .td file
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 06:58:25 +00:00
Evan Cheng
c57e5c17bc
Remove a completed entry; add a new entry about fisttp op
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26105 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 05:48:15 +00:00
Chris Lattner
708e1a5c9c
add some notes, move some code around. Implement unswitching of loops
...
with branches on partially invariant computations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 02:30:37 +00:00
Chris Lattner
dd3ee6d086
Move code around to be more logical, no functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26103 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 02:01:22 +00:00
Chris Lattner
4d1ca946ea
When unswitching a trivial loop, do admit we are doing it! :)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26102 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 01:36:35 +00:00
Chris Lattner
4c41d49a92
Implement unconditional unswitching of 'trivial' loops, those loops that contain
...
branches in their entry block that control whether or not the loop is a noop or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26101 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 01:24:09 +00:00
Chris Lattner
f4f5f4e56f
Simplify control flow a bit, note that unswitch preserves canonical loop form
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26098 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 22:15:42 +00:00
Evan Cheng
7d82d607c5
Match tblgen change.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26096 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 22:12:53 +00:00
Evan Cheng
fae9f1cb34
Added SelectionDAG::InsertISelMapEntry(). This is used to workaround the gcc
...
problem where it inline the map insertion call too aggressively. Before this
change it was producing a frame size of 24k for Select_store(), now it's down
to 10k (by calling this method rather than calling the map insertion operator).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26094 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 22:11:03 +00:00
Chris Lattner
e487abbfbf
Make the threshold a parameter
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26093 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 20:15:48 +00:00
Chris Lattner
f262766619
Done
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26091 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 20:00:19 +00:00
Chris Lattner
3ab48ed72f
Enable LSR by default for SPARC: it is a clear win.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26090 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 19:59:55 +00:00
Chris Lattner
2f4b898e8c
Simplify the loop-unswitch pass, by not even trying to unswitch loops with
...
uses of loop values outside the loop. We need loop-closed SSA form to do
this right, or to use SSA rewriting if we really care.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26089 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 19:14:52 +00:00
Chris Lattner
9a4cacb7c2
Fix 80-column violations
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26088 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 07:41:14 +00:00
Chris Lattner
68d5ff2b83
Enhance MVIZ in three ways:
...
1. Teach it new tricks: in particular how to propagate through signed shr and sexts.
2. Teach it to return a bitset of known-1 and known-0 bits, instead of just zero.
3. Teach instcombine (AND X, C) to fold when we know all C bits of X.
This implements Regression/Transforms/InstCombine/bittest.ll, and allows
future things to be simplified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26087 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 07:38:58 +00:00
Evan Cheng
7e9b26fc73
Match getTargetNode() changes (now return SDNode* instead of SDOperand).
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26085 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 07:17:49 +00:00
Evan Cheng
6ae46c4c87
More changes to reduce frame size.
...
Move all getTargetNode() out of SelectionDAG.h into SelectionDAG.cpp. This
prevents them from being inlined.
Change getTargetNode() so they return SDNode * instead of SDOperand to prevent
copying. It should also help compilation speed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26083 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 07:15:23 +00:00
Chris Lattner
9413678f91
add an option to turn on LSR.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26080 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 05:06:36 +00:00
Chris Lattner
239862ce99
simplify this code now that each constant pool entry is not separately allocated
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26079 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 04:49:59 +00:00
Chris Lattner
3029f92051
Adjust to MachineConstantPool interface change: instead of keeping a
...
value/alignment pair for each constant, keep a value/offset pair.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26078 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 04:46:04 +00:00
Chris Lattner
fa77d43ba1
rename fields of constant pool entries
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26076 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 04:22:52 +00:00
Chris Lattner
74b7d27ab1
Simplify code, alignment must be specified now.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26074 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 02:26:04 +00:00
Chris Lattner
948d9668a7
Make MachineConstantPool entries alignments explicit
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26071 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 02:23:13 +00:00
Chris Lattner
5ac38d147b
Always pass in an alignment.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26070 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 02:19:16 +00:00
Chris Lattner
23c574a841
provide an explicit alignment for cp entries
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26069 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 02:15:30 +00:00