Chris Lattner
c7fe78d9a1
Fix the regression last night compiling povray
...
llvm-svn: 23348
2005-09-14 17:32:56 +00:00
Chris Lattner
fa644b391f
fix a major regression from my patch this afternoon
...
llvm-svn: 23347
2005-09-14 06:06:45 +00:00
Chris Lattner
72cfebc71b
remove some code that isn't ready for prime time
...
llvm-svn: 23346
2005-09-14 06:03:10 +00:00
Chris Lattner
c4ae94aa32
Switch to a slightly more structured representation for instructions
...
llvm-svn: 23345
2005-09-14 04:03:16 +00:00
Chris Lattner
77cc161bd5
Add some more checking/verification code
...
llvm-svn: 23344
2005-09-14 02:11:12 +00:00
Chris Lattner
9ab561788e
start parsing instructions into patterns, start doing many more checks of
...
'set's.
llvm-svn: 23343
2005-09-14 00:09:24 +00:00
Chris Lattner
c7fb54af0b
we don't need this proto any longer
...
llvm-svn: 23342
2005-09-13 22:05:21 +00:00
Chris Lattner
e2591652a2
don't emit the namespace inside the class!
...
llvm-svn: 23341
2005-09-13 22:05:02 +00:00
Chris Lattner
1da656efd4
Emit code suitable for emission into the ISel class, allowing us to use/define
...
methods.
llvm-svn: 23340
2005-09-13 22:03:37 +00:00
Chris Lattner
ffab20ddeb
move the #include for the generated code into the isel class body so we
...
can use/define class methods
llvm-svn: 23339
2005-09-13 22:03:06 +00:00
Chris Lattner
9bb7fff501
continue xform function parsing
...
llvm-svn: 23338
2005-09-13 21:59:15 +00:00
Chris Lattner
abc740453c
Start parsing node transformation information
...
llvm-svn: 23337
2005-09-13 21:51:00 +00:00
Chris Lattner
0dd99c9aaf
Add a new Record::getValueAsCode method to mirror the other getValueAs*
...
methods. Use it to simplify some code.
llvm-svn: 23336
2005-09-13 21:44:28 +00:00
Chris Lattner
4e59482982
completely eliminate TreePattern::PatternType
...
llvm-svn: 23335
2005-09-13 21:20:49 +00:00
Chris Lattner
16700b9beb
Change the arg lowering code to use copyfromreg from vregs associated
...
with incoming arguments instead of the pregs themselves. This fixes
the scheduler from causing problems by moving a copyfromreg for an argument
to after a select_cc node (now it can, and bad things won't happen).
llvm-svn: 23334
2005-09-13 19:33:40 +00:00
Chris Lattner
b56110ff54
This has been moved to the target-indep code
...
llvm-svn: 23333
2005-09-13 19:32:18 +00:00
Chris Lattner
00bfb7812d
This code is no longer needed, it is moved to the target-indep code
...
llvm-svn: 23332
2005-09-13 19:31:44 +00:00
Chris Lattner
49669dd169
If a function has liveins, and if the target requested that they be plopped
...
into particular vregs, emit copies into the entry MBB.
llvm-svn: 23331
2005-09-13 19:30:54 +00:00
Chris Lattner
075b4458cf
Majik numbers are bad
...
llvm-svn: 23330
2005-09-13 19:03:13 +00:00
Chris Lattner
766369cf45
Remove some dead vectors
...
llvm-svn: 23329
2005-09-13 18:47:49 +00:00
Chris Lattner
f020513d57
Add a simple xform to simplify array accesses with casts in the way.
...
This is useful for 178.galgel where resolution of dope vectors (by the
optimizer) causes the scales to become apparent.
llvm-svn: 23328
2005-09-13 18:36:04 +00:00
Chris Lattner
26aef8992f
Fix an issue where LSR would miss rewriting a use of an IV expression by a PHI node that is not the original PHI.
...
This fixes up a dot-product loop in galgel, speeding it up from 18.47s to
16.13s.
llvm-svn: 23327
2005-09-13 02:09:55 +00:00
Duraid Madina
5c8de93882
fails since linux-itanium headers are Different
...
llvm-svn: 23326
2005-09-13 01:03:53 +00:00
Chris Lattner
4284014415
Add a helper function, allowing us to simplify some code a bit, changing
...
indentation, no functionality change
llvm-svn: 23325
2005-09-13 00:40:14 +00:00
Chris Lattner
d35d5d2492
Implement a simple xform to turn code like this:
...
if () { store A -> P; } else { store B -> P; }
into a PHI node with one store, in the most trival case. This implements
load.ll:test10.
llvm-svn: 23324
2005-09-12 23:23:25 +00:00
Chris Lattner
dbe60107c5
new testcase
...
llvm-svn: 23323
2005-09-12 23:22:17 +00:00
Chris Lattner
6eee5b16b1
Another load-peephole optimization: do gcse when two loads are next to
...
each other. This implements InstCombine/load.ll:test9
llvm-svn: 23322
2005-09-12 22:21:03 +00:00
Chris Lattner
db236987c2
new testcase
...
llvm-svn: 23321
2005-09-12 22:19:46 +00:00
Chris Lattner
2657841260
Implement a trivial form of store->load forwarding where the store and the
...
load are exactly consequtive. This is picked up by other passes, but this
triggers thousands of times in fortran programs that use static locals
(and is thus a compile-time speedup).
llvm-svn: 23320
2005-09-12 22:00:15 +00:00
Chris Lattner
c183614166
new testcase
...
llvm-svn: 23319
2005-09-12 21:59:22 +00:00
Chris Lattner
a949a2836d
Fix a regression from last night, which caused this pass to create invalid
...
code for IV uses outside of loops that are not dominated by the latch block.
We should only convert these uses to use the post-inc value if they ARE
dominated by the latch block.
Also use a new LoopInfo method to simplify some code.
This fixes Transforms/LoopStrengthReduce/2005-09-12-UsesOutOutsideOfLoop.ll
llvm-svn: 23318
2005-09-12 17:11:27 +00:00
Chris Lattner
fa762ece7e
relax pattern match on name
...
llvm-svn: 23317
2005-09-12 17:09:40 +00:00
Chris Lattner
2a30ed887c
new testcase
...
llvm-svn: 23316
2005-09-12 17:08:15 +00:00
Chris Lattner
ab0448905e
Add a new getLoopLatch() method.
...
llvm-svn: 23315
2005-09-12 17:03:55 +00:00
Chris Lattner
f3471861a6
new method
...
llvm-svn: 23314
2005-09-12 17:03:16 +00:00
Chris Lattner
780ffd9c1f
_test:
...
li r2, 0
LBB_test_1: ; no_exit.2
li r5, 0
stw r5, 0(r3)
addi r2, r2, 1
addi r3, r3, 4
cmpwi cr0, r2, 701
blt cr0, LBB_test_1 ; no_exit.2
LBB_test_2: ; loopexit.2.loopexit
addi r2, r2, 1
stw r2, 0(r4)
blr
[zion ~/llvm]$ cat > ~/xx
Uses of IV's outside of the loop should use hte post-incremented version
of the IV, not the preincremented version. This helps many loops (e.g. in sixtrack)
which used to generate code like this (this is the code from the
dont-hoist-simple-loop-constants.ll testcase):
_test:
li r2, 0 **** IV starts at 0
LBB_test_1: ; no_exit.2
or r5, r2, r2 **** Copy for loop exit
li r2, 0
stw r2, 0(r3)
addi r3, r3, 4
addi r2, r5, 1
addi r6, r5, 2 **** IV+2
cmpwi cr0, r6, 701
blt cr0, LBB_test_1 ; no_exit.2
LBB_test_2: ; loopexit.2.loopexit
addi r2, r5, 2 **** IV+2
stw r2, 0(r4)
blr
And now generated code like this:
_test:
li r2, 1 *** IV starts at 1
LBB_test_1: ; no_exit.2
li r5, 0
stw r5, 0(r3)
addi r2, r2, 1
addi r3, r3, 4
cmpwi cr0, r2, 701 *** IV.postinc + 0
blt cr0, LBB_test_1
LBB_test_2: ; loopexit.2.loopexit
stw r2, 0(r4) *** IV.postinc + 0
blr
llvm-svn: 23313
2005-09-12 06:04:47 +00:00
Chris Lattner
963c549bc9
new testcase
...
llvm-svn: 23312
2005-09-12 05:50:15 +00:00
Chris Lattner
773456a944
Regenerate
...
llvm-svn: 23311
2005-09-12 05:30:06 +00:00
Chris Lattner
8b34f3d20d
Rearrange two rules, which apparently makes some versions of bison happier.
...
llvm-svn: 23310
2005-09-12 05:29:43 +00:00
Chris Lattner
94198e530b
Make sure to disable 64-bit extensions for this test
...
llvm-svn: 23309
2005-09-11 03:50:38 +00:00
Jeff Cohen
ce2b74a2b5
Fix more Visual Studio build problems.
...
llvm-svn: 23308
2005-09-10 02:33:17 +00:00
Jeff Cohen
7e6b5c60fc
Fix miscellaneous Visual Studio build problems.
...
llvm-svn: 23307
2005-09-10 02:00:02 +00:00
Chris Lattner
ddec75fdf6
implement Transforms/LoopStrengthReduce/dont-hoist-simple-loop-constants.ll.
...
We used to emit this code for it:
_test:
li r2, 1 ;; Value tying up a register for the whole loop
li r5, 0
LBB_test_1: ; no_exit.2
or r6, r5, r5
li r5, 0
stw r5, 0(r3)
addi r5, r6, 1
addi r3, r3, 4
add r7, r2, r5 ;; should be addi r7, r5, 1
cmpwi cr0, r7, 701
blt cr0, LBB_test_1 ; no_exit.2
LBB_test_2: ; loopexit.2.loopexit
addi r2, r6, 2
stw r2, 0(r4)
blr
now we emit this:
_test:
li r2, 0
LBB_test_1: ; no_exit.2
or r5, r2, r2
li r2, 0
stw r2, 0(r3)
addi r3, r3, 4
addi r2, r5, 1
addi r6, r5, 2 ;; whoa, fold those adds!
cmpwi cr0, r6, 701
blt cr0, LBB_test_1 ; no_exit.2
LBB_test_2: ; loopexit.2.loopexit
addi r2, r5, 2
stw r2, 0(r4)
blr
more improvement coming.
llvm-svn: 23306
2005-09-10 01:18:45 +00:00
Chris Lattner
97f62d0f5e
new testcase
...
llvm-svn: 23305
2005-09-10 01:14:37 +00:00
Chris Lattner
00e9278551
PowerPC cannot truncstore i1 natively
...
llvm-svn: 23304
2005-09-10 00:21:06 +00:00
Chris Lattner
38fb15db44
Allow targets to say they don't support truncstore i1 (which includes a mask
...
when storing to an 8-bit memory location), as most don't.
llvm-svn: 23303
2005-09-10 00:20:18 +00:00
Chris Lattner
52a8cb35e6
Add a missing #include, patch courtesy of Baptiste Lepilleur.
...
llvm-svn: 23302
2005-09-09 23:53:39 +00:00
Chris Lattner
cae9229d6e
Fix a problem duraid encountered on itanium where this folding:
...
select (x < y), 1, 0 -> (x < y) incorrectly: the setcc returns i1 but the
select returned i32. Add the zero extend as needed.
llvm-svn: 23301
2005-09-09 23:00:07 +00:00
Chris Lattner
85884e9b8a
Fix a crash viewing dags that have target nodes in them
...
llvm-svn: 23300
2005-09-09 22:35:03 +00:00
Chris Lattner
ad8728e9a6
I forgot that we always spill fp values as 64-bits. Implement spill folding
...
for FP as well. This triggers a couple dozen times on 177.mesa (for example).
llvm-svn: 23299
2005-09-09 21:59:44 +00:00