Reid Spencer
0f30aec7d3
Make CodeGen libs -pedantic clean.
...
llvm-svn: 31387
2006-11-02 23:56:21 +00:00
Rafael Espindola
e2f969dccb
#include <assert.h>
...
llvm-svn: 31386
2006-11-02 23:48:53 +00:00
Chris Lattner
d0b2340384
fix a bug reid noticed
...
llvm-svn: 31385
2006-11-02 23:39:53 +00:00
Jim Laskey
599ad8b222
1. Hash not quite right for DIEValues.
...
2. Not going to use Usage (no significant benefit.)
llvm-svn: 31384
2006-11-02 21:48:18 +00:00
Reid Spencer
8f92705113
Remove unused variable.
...
llvm-svn: 31382
2006-11-02 20:55:40 +00:00
Reid Spencer
4bafa71dc1
For PR786:
...
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.
llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Jim Laskey
14437996b7
General clean up of teh dwarf writer.
...
1. Most significant is the folding of debug information entries. This
reduced self hosted -g SelectionDAGISel.s from 120M to 13M and pretty
close to matching .o file sizes with gcc.
2. Debug information entry printing for debugging the dwarf code.
3. Bring all the code closer to llvm standards.
4. Misc. fixes and doc clean ups.
llvm-svn: 31379
2006-11-02 20:12:39 +00:00
Rafael Espindola
04afe6eb37
move ARMCondCodeToString to ARMAsmPrinter.cpp
...
remove unused variables from lowerCall
llvm-svn: 31378
2006-11-02 15:00:02 +00:00
Jim Laskey
c770e68c11
Allow FoldingSet clients to pump up the initial hash size.
...
llvm-svn: 31377
2006-11-02 14:21:26 +00:00
Reid Spencer
c3ef589d23
Remove unused variable.
...
llvm-svn: 31376
2006-11-02 08:23:44 +00:00
Reid Spencer
7af6c17de0
Remove unused variables.
...
llvm-svn: 31375
2006-11-02 08:18:15 +00:00
Reid Spencer
34154e10e7
Remove a function prototype that is no longer needed (REM patch missed it)
...
llvm-svn: 31374
2006-11-02 08:12:02 +00:00
Reid Spencer
cbea78a1bb
Get rid of unused variable.
...
llvm-svn: 31373
2006-11-02 07:59:59 +00:00
Andrew Lenharth
c43c2d6966
fix 2006-11-01-vastart.ll
...
llvm-svn: 31371
2006-11-02 03:05:26 +00:00
Reid Spencer
1abf69e923
For PR950:
...
Replace the REM instruction with UREM, SREM and FREM.
llvm-svn: 31369
2006-11-02 01:53:59 +00:00
Chris Lattner
38c04a6bd6
Implement the getRegForInlineAsmConstraint method for PPC. With recent
...
sdisel changes, this eliminates a ton of copies around common inline asms.
For example:
int test2(int Y, int X) {
asm("foo %0, %1" : "=r"(X): "r"(X));
return X;
}
now compiles to:
_test2:
foo r3, r4
blr
instead of:
_test2:
mr r2, r4
foo r2, r2
mr r3, r2
blr
GCC produces:
_test2:
foo r4, r4
mr r3,r4
blr
llvm-svn: 31367
2006-11-02 01:44:04 +00:00
Chris Lattner
35cd439221
Allow the getRegForInlineAsmConstraint method to return a register class with
...
no fixes physreg. Treat this as permission to use any register in the register
class. When this happens and it is safe, allow the llvm register allcoator to
allocate the register instead of doing it at isel time. This eliminates a ton
of copies around common inline asms. For example:
int test2(int Y, int X) {
asm("foo %0, %1" : "=r"(X): "r"(X));
return X;
}
now compiles to:
_test2:
foo r3, r4
blr
instead of:
_test2:
mr r2, r4
foo r2, r2
mr r3, r2
blr
GCC produces:
_test2:
foo r4, r4
mr r3,r4
blr
llvm-svn: 31366
2006-11-02 01:41:49 +00:00
Evan Cheng
1da5ee8485
Rename
...
llvm-svn: 31364
2006-11-01 23:18:32 +00:00
Evan Cheng
e57c89ede0
Two-address instructions no longer have to be A := A op C. Now any pair of dest / src operands can be tied together.
...
llvm-svn: 31363
2006-11-01 23:06:55 +00:00
Devang Patel
ae6d81559a
There can be more than one PHINode at the start of the block.
...
llvm-svn: 31362
2006-11-01 23:04:45 +00:00
Evan Cheng
b1ac9f6c12
Added getTiedToSrcOperand() to check for two-address'ness.
...
llvm-svn: 31360
2006-11-01 23:00:31 +00:00
Evan Cheng
1f18eca4f5
Clean up.
...
llvm-svn: 31359
2006-11-01 22:39:30 +00:00
Devang Patel
3f3161cee2
Handle PHINode with only one incoming value.
...
This fixes http://llvm.org/bugs/show_bug.cgi?id=979
llvm-svn: 31358
2006-11-01 22:26:43 +00:00
Evan Cheng
5479bb9fc4
CopyFromReg starts a live range so its use should not be considered a floater.
...
llvm-svn: 31356
2006-11-01 22:17:06 +00:00
Reid Spencer
198701d5ec
Make ScalarEvolution actually use a ZeroExtend expression instead of
...
having SCZeroExtendExpr be equivalent to SCTruncate
llvm-svn: 31355
2006-11-01 21:53:12 +00:00
Chris Lattner
f20968bc33
give branch folding a simple heuristic to decide which block to split so that
...
it inserts an uncond branch where it is less likely to cause a problem. This
fixes some perf issues on ppc.
llvm-svn: 31354
2006-11-01 19:36:29 +00:00
Chris Lattner
953b8e6f7d
Fix GlobalOpt/2006-11-01-ShrinkGlobalPhiCrash.ll and McGill/chomp
...
llvm-svn: 31352
2006-11-01 18:03:33 +00:00
Rafael Espindola
3ae2b33d17
print null values in bss
...
llvm-svn: 31349
2006-11-01 14:26:44 +00:00
Rafael Espindola
a52f709418
implement zextload bool and truncstore bool
...
llvm-svn: 31348
2006-11-01 14:13:27 +00:00
Evan Cheng
83b0827a2e
Add a printSetLabel that takes two id's.
...
llvm-svn: 31347
2006-11-01 09:23:08 +00:00
Chris Lattner
2cedfa5156
Factor gep instructions through phi nodes.
...
llvm-svn: 31346
2006-11-01 07:43:41 +00:00
Chris Lattner
61ea2af8fe
Turn a phi of many loads into a phi of the address and a single load of the
...
result. This can significantly shrink code and exposes identities more
aggressively.
llvm-svn: 31344
2006-11-01 07:13:54 +00:00
Evan Cheng
790d5c7697
Fix ldmxcsr JIT encoding.
...
llvm-svn: 31343
2006-11-01 06:53:52 +00:00
Chris Lattner
e43c3b1681
Fix a bug in the previous patch
...
llvm-svn: 31342
2006-11-01 04:55:47 +00:00
Chris Lattner
7211110992
Fold things like "phi [add (a,b), add(c,d)]" into two phi's and one add.
...
This triggers thousands of times on multisource.
llvm-svn: 31341
2006-11-01 04:51:18 +00:00
Evan Cheng
67c04b1f2a
Print jumptable index.
...
llvm-svn: 31340
2006-11-01 04:48:30 +00:00
Reid Spencer
a47902dc6f
Remove unnecessary sign conversions made possible by last patch.
...
llvm-svn: 31339
2006-11-01 03:45:43 +00:00
Reid Spencer
ea7b487e03
Fix a bug in the interpreter where divides of unmatched signed operands
...
would fail. E.g. udiv sint X, Y or sdiv uint X, Y would fail to find a
type match in the switch statement and fail the operation.
llvm-svn: 31338
2006-11-01 03:41:05 +00:00
Chris Lattner
b459c08384
make tail merging more aggressive. If two blocks share a common tail, but the
...
tail is not an entire block for either of them, pick one, split it, then
merge the common part.
llvm-svn: 31336
2006-11-01 01:16:12 +00:00
Chris Lattner
5651528580
enable branch folding with an option
...
llvm-svn: 31335
2006-11-01 00:38:31 +00:00
Evan Cheng
f49cb35d90
Add constraints to Instruction class.
...
llvm-svn: 31332
2006-11-01 00:26:27 +00:00
Andrew Lenharth
92b6c807c7
more shotenning
...
llvm-svn: 31331
2006-10-31 23:46:56 +00:00
Chris Lattner
850ef9955d
Compile CodeGen/PowerPC/fp-branch.ll to:
...
_intcoord_cond_next55:
LBB1_3: ;cond_next55
lis r2, ha16(LCPI1_0)
lfs f0, lo16(LCPI1_0)(r2)
fcmpu cr0, f1, f0
blt cr0, LBB1_2 ;cond_next62.exitStub
LBB1_1: ;bb72.exitStub
li r3, 1
blr
LBB1_2: ;cond_next62.exitStub
li r3, 0
blr
instead of:
_intcoord_cond_next55:
LBB1_3: ;cond_next55
lis r2, ha16(LCPI1_0)
lfs f0, lo16(LCPI1_0)(r2)
fcmpu cr0, f1, f0
bge cr0, LBB1_1 ;bb72.exitStub
LBB1_4: ;cond_next55
lis r2, ha16(LCPI1_0)
lfs f0, lo16(LCPI1_0)(r2)
fcmpu cr0, f1, f0
bnu cr0, LBB1_2 ;cond_next62.exitStub
LBB1_1: ;bb72.exitStub
li r3, 1
blr
LBB1_2: ;cond_next62.exitStub
li r3, 0
blr
llvm-svn: 31330
2006-10-31 23:06:00 +00:00
Chris Lattner
3131b7d6d1
look through isunordered to inline it into branch blocks.
...
llvm-svn: 31328
2006-10-31 22:37:42 +00:00
Evan Cheng
cabfd99a79
Nuke dead code.
...
llvm-svn: 31327
2006-10-31 21:53:31 +00:00
Chris Lattner
def30d3eda
allow the address of a global to be used with the "i" constraint when in
...
-static mode. This implements PR882.
llvm-svn: 31326
2006-10-31 20:13:11 +00:00
Chris Lattner
0571c323bf
implement the 'c' inline asm modifier character
...
llvm-svn: 31325
2006-10-31 20:12:30 +00:00
Chris Lattner
3bc1ad2c4a
handle global address constant sdnodes
...
llvm-svn: 31323
2006-10-31 20:01:56 +00:00
Andrew Lenharth
cc672e3b2b
Let us play simplify the td file (and fix a few missed sub and mul patterns).
...
llvm-svn: 31322
2006-10-31 19:52:12 +00:00
Chris Lattner
3bed109ed9
handle "st" as "st(0)"
...
llvm-svn: 31320
2006-10-31 19:42:44 +00:00