Chris Lattner
9e7ce53b82
Simplify code and do not invalidate iterators.
...
This fixes a crash compiling TimberWolfMC that was exposed due to recent
optimizer changes.
llvm-svn: 18831
2004-12-12 18:23:20 +00:00
Chris Lattner
6131b06f73
Use the target triple to pick this target.
...
llvm-svn: 18830
2004-12-12 17:40:28 +00:00
Brian Gaeke
757a3aa9b9
Complete the list of MultiSource failures.
...
llvm-svn: 18826
2004-12-12 08:22:11 +00:00
Brian Gaeke
a440424596
hbd should be working now.
...
llvm-svn: 18824
2004-12-12 07:42:59 +00:00
Brian Gaeke
ee60e35a28
Finally enable the setcc-branch folding code.
...
Also, fix a bug where ubyte 255 would sometimes be output as -1. This
was afflicting hbd.
llvm-svn: 18823
2004-12-12 07:42:58 +00:00
Brian Gaeke
09c4a78ece
Add (currently disabled) code for canFoldSetCC
...
llvm-svn: 18820
2004-12-12 06:22:30 +00:00
Chris Lattner
97adae1fa4
Though the previous xform applies to literally dozens (hundreds?) of variables
...
in SPEC, the subsequent optimziations that we are after don't play with
with FP values, so disable this xform for them. Really we just don't want
stuff like:
double G; (always 0 or 412312.312)
= G;
turning into:
bool G_b;
= G_b ? 412312.312 : 0;
We'd rather just do the load.
-Chris
llvm-svn: 18819
2004-12-12 06:03:06 +00:00
Brian Gaeke
55c163e41e
Add stubs for setcc-branch folding support.
...
llvm-svn: 18818
2004-12-12 06:01:26 +00:00
Chris Lattner
f125dc0e49
If a variable can only hold two values, and is not already a bool, shrink it
...
down to actually BE a bool. This allows simple value range propagation
stuff work harder, deleting comparisons in bzip2 in some hot loops.
This implements GlobalOpt/integer-bool.ll, which is the essence of the
loop condition distilled into a testcase.
llvm-svn: 18817
2004-12-12 05:53:50 +00:00
Chris Lattner
02c04bbf45
If one side of and/or is known to be 0/-1, it doesn't matter
...
if the other side is overdefined.
This allows us to fold conditions like: if (X < Y || Y > Z) in some cases.
llvm-svn: 18807
2004-12-11 23:15:19 +00:00
Brian Gaeke
5d213ad8c3
Print llvm code one function at a time.
...
llvm-svn: 18805
2004-12-11 22:17:07 +00:00
Chris Lattner
5ba315dbbe
Check in the file I forgot last night, to solve all of the crashes in every
...
test in the suite. :(
llvm-svn: 18804
2004-12-11 22:10:29 +00:00
Brian Gaeke
80831ad19a
JIT should print LLVM each function before selecting instructions for it.
...
llvm-svn: 18803
2004-12-11 18:41:09 +00:00
Reid Spencer
e43fb31a1f
Rename Path::get -> Path::toString
...
llvm-svn: 18802
2004-12-11 17:37:01 +00:00
Chris Lattner
59ce936426
Only cound if we actually made a change.
...
llvm-svn: 18800
2004-12-11 17:00:14 +00:00
Chris Lattner
8378361f0c
The split bb is really the exit of the old function
...
llvm-svn: 18799
2004-12-11 16:59:54 +00:00
Chris Lattner
06bfa390f6
Two bug fixes:
...
1. Actually increment the Statistic for the GV elim optzn
2. When resolving undef branches, only resolve branches in executable blocks,
avoiding marking a bunch of completely dead blocks live. This has a big
impact on the quality of the generated code.
With this patch, we positively rip up vortex, compiling Ut_MoveBytes to a
single memcpy call. In vortex we get this:
12 ipsccp - Number of globals found to be constant
986 ipsccp - Number of arguments constant propagated
1378 ipsccp - Number of basic blocks unreachable
8919 ipsccp - Number of instructions removed
llvm-svn: 18796
2004-12-11 06:05:53 +00:00
Chris Lattner
5af0ef5c44
Do not delete the entry block to a function.
...
llvm-svn: 18795
2004-12-11 05:32:19 +00:00
Brian Gaeke
220fb4f8cd
Bools are *also* not ints. Sigh. Furthermore, most of the TargetMachine
...
ctor parameters can be defaulted.
Print the transformed llvm code input to the instruction selector
when -print-machineinstrs is on, just like V9.
llvm-svn: 18794
2004-12-11 05:19:04 +00:00
Brian Gaeke
24ea5d3dd7
Look for many more moves to fold (previously, we only
...
*or g0, x add g0, x recognized * as a move)
or x, g0 add x, g0
or 0, x add 0, x
or x, 0 add x, 0
llvm-svn: 18793
2004-12-11 05:19:03 +00:00
Brian Gaeke
948a8145bf
Make GEPs not suck so much:
...
* Don't emit the Index * ElementSize multiply if Index is a constant.
* Use a shift, not a multiply, if ElementSize is 1/2/4/8.
* If ElementSize fits in the immediate field of SMUL, then put it there.
Fix a bug where struct offsets might be truncated (ConstantSInt::get is
now used instead of ConstantInt::get).
llvm-svn: 18792
2004-12-11 05:19:02 +00:00
Brian Gaeke
e0643b792b
Update lists of failing benchmarks, including info on which
...
ones are failing in cbe.
llvm-svn: 18791
2004-12-11 05:19:01 +00:00
Chris Lattner
943f94d2b3
Implement Transforms/SCCP/ipsccp-gvar.ll, by tracking values stored to
...
non-address-taken global variables.
llvm-svn: 18790
2004-12-11 05:15:59 +00:00
Chris Lattner
beeab3a124
Fix a bug where we could delete dead invoke instructions with uses.
...
In functions where we fully constant prop the return value, replace all
ret instructions with 'ret undef'.
llvm-svn: 18786
2004-12-11 02:53:57 +00:00
Reid Spencer
e2af9dc813
Path::get -> Path::toString
...
llvm-svn: 18785
2004-12-11 00:14:15 +00:00
Chris Lattner
d1d00e017b
Implement SCCP/ipsccp-conditional.ll, by totally deleting dead blocks.
...
llvm-svn: 18781
2004-12-10 22:29:08 +00:00
Chris Lattner
5be2c2e299
Fix SCCP/2004-12-10-UndefBranchBug.ll
...
llvm-svn: 18776
2004-12-10 20:41:50 +00:00
Chris Lattner
3c31189583
Make sure to link the target-triple as well, so it ends up in the .llvm.bc file
...
llvm-svn: 18774
2004-12-10 20:26:15 +00:00
Chris Lattner
40e97884f6
Fix Regression/Transforms/SimplifyCFG/2004-12-10-SimplifyCFGCrash.ll,
...
and the failure on make_dparser last night.
llvm-svn: 18766
2004-12-10 17:42:31 +00:00
Brian Gaeke
dc916ae40f
Move -lowerselect later in the chain; some select instructions were
...
slipping through into the instruction selector, which can't deal with
them yet.
llvm-svn: 18758
2004-12-10 08:39:30 +00:00
Brian Gaeke
7ec3883e1a
Add the rest of the multiply instructions.
...
llvm-svn: 18757
2004-12-10 08:39:29 +00:00
Brian Gaeke
2a9ecc433f
Support binary operations with immediates for <= cInt.
...
llvm-svn: 18756
2004-12-10 08:39:28 +00:00
Brian Gaeke
45f3af8d88
Update lists of failing benchmarks (except C++...something is the
...
matter with my sparcv8 libstdc++.a) and to-do list.
llvm-svn: 18755
2004-12-10 08:39:27 +00:00
Chris Lattner
ead42a768e
This is the initial implementation of IPSCCP, as requested by Brian.
...
This implements SCCP/ipsccp-basic.ll, rips apart Olden/mst (as described in
PR415), and does other nice things.
There is still more to come with this, but it's a start.
llvm-svn: 18752
2004-12-10 08:02:06 +00:00
Brian Gaeke
1da3720799
Emit correct prototype for __builtin_alloca on V8.
...
llvm-svn: 18745
2004-12-10 05:44:45 +00:00
Alkis Evlogimenos
9b02192468
Fix writer to properly quote label names when they don't contain
...
simple characters.
llvm-svn: 18744
2004-12-10 05:41:10 +00:00
Alkis Evlogimenos
189fdf11db
Do not allow empty label names.
...
llvm-svn: 18743
2004-12-10 05:40:19 +00:00
Chris Lattner
e0936a0bd3
Implement test/Feature/escaped_label.ll
...
llvm-svn: 18741
2004-12-10 05:27:29 +00:00
Brian Gaeke
91cf4fe1ca
Add SparcV8 target back into the build
...
llvm-svn: 18738
2004-12-10 04:54:21 +00:00
Brian Gaeke
5c8cefdf9a
Adjust paths: Sparc/V8 --> SparcV8
...
llvm-svn: 18737
2004-12-10 04:48:57 +00:00
Brian Gaeke
262fe40da0
Make this file self-contained.
...
llvm-svn: 18736
2004-12-10 04:46:30 +00:00
Brian Gaeke
ef7289195a
Update list of failing MultiSource benchmarks. It works out to +5 -5, but I
...
think some of these might be the CFE's fault; a rebuild should come soon.
llvm-svn: 18735
2004-12-10 04:42:46 +00:00
Brian Gaeke
999a5ba9ba
When FpMOVDs appeared in pairs, we were mistakenly skipping over the latter of
...
each pair. I think this fixes that.
One of these days, I swear I'm going to get the hang of C++ iterators.
Really.
llvm-svn: 18734
2004-12-10 04:42:45 +00:00
Brian Gaeke
a196f80d71
We're continuing to make progress on MultiSource.
...
llvm-svn: 18714
2004-12-09 18:54:31 +00:00
Brian Gaeke
706a0c3988
Bytes and shorts are aligned differently from words.
...
llvm-svn: 18713
2004-12-09 18:51:02 +00:00
Brian Gaeke
43cb9ee8a4
Fix asm-printing directives (how did we not see this before...apparently,
...
everything was an int!)
llvm-svn: 18712
2004-12-09 18:51:01 +00:00
Chris Lattner
f5962a7d6c
note to self: Do not check in debugging code!
...
llvm-svn: 18693
2004-12-09 07:15:52 +00:00
Chris Lattner
1e2b3fd343
Implement trivial sinking for load instructions. This causes us to sink 567 loads in spec
...
llvm-svn: 18692
2004-12-09 07:14:34 +00:00
Chris Lattner
c5f6c3fd48
Remove a dead field, make the map go to integer type ID to hash better and
...
avoid a getType.
llvm-svn: 18691
2004-12-09 06:19:44 +00:00
Jeff Cohen
2d53514c83
Fix residual Visual Studio build problems
...
llvm-svn: 18688
2004-12-09 05:51:11 +00:00