Evan Cheng
019b921f3b
Added indexed store node and patfrag's.
...
llvm-svn: 31576
2006-11-08 23:02:11 +00:00
Reid Spencer
972e7d7995
Bump the bytecode version number to 7. Implement upgrade of version 6 and
...
version 6 bytecode.
llvm-svn: 31573
2006-11-08 21:27:54 +00:00
Evan Cheng
2edeb17aed
Use movl+xchgl instead of pushl+popl.
...
llvm-svn: 31572
2006-11-08 20:35:37 +00:00
Evan Cheng
736a8eb3cd
Match tblegen changes.
...
llvm-svn: 31571
2006-11-08 20:34:28 +00:00
Evan Cheng
fcef896f6e
Match more post-indexed ops.
...
llvm-svn: 31569
2006-11-08 20:27:27 +00:00
Chris Lattner
d1bcd014a8
reenable factoring of GEP expressions, being more precise about the
...
case that it bad to do.
llvm-svn: 31563
2006-11-08 19:42:28 +00:00
Chris Lattner
77e0e67f23
make this code more efficient by not creating a phi node we are just going to
...
delete in the first place. This also makes it simpler.
llvm-svn: 31562
2006-11-08 19:29:23 +00:00
Jim Laskey
28fec74f1b
Remove redundant <cmath>.
...
llvm-svn: 31561
2006-11-08 19:16:44 +00:00
Chris Lattner
f2cd0aeced
disable this factoring optzn for GEPs for now, this severely pessimizes some
...
loops.
llvm-svn: 31560
2006-11-08 18:49:31 +00:00
Rafael Espindola
f7b898d497
initial implementation of addressing mode 2
...
TODO: fix lea_addri
llvm-svn: 31552
2006-11-08 17:07:32 +00:00
John Criswell
335eb0232a
Include llvm/Support/DataTypes.h to define intptr_t.
...
This fixes the build on OpenBSD and potentially other systems.
llvm-svn: 31550
2006-11-08 15:04:35 +00:00
Jim Laskey
4d636f03f7
Now can re-enable debug label folding.
...
llvm-svn: 31549
2006-11-08 14:17:45 +00:00
Devang Patel
0aa28c8146
Split FunctionPassManager_New into FunctionPassManager_New and FunctionPassManagerImpl_New.
...
FunctionPassManagerImpl_New implements the pass manager.
FunctionPassManager_New is the public interface.
llvm-svn: 31547
2006-11-08 10:44:40 +00:00
Devang Patel
12982590fa
Split PassManager_New into PassManager_New and PassManagerImpl_New.
...
PassManagerImpl_New implements the pass manager.
PassManager_New is the public interface.
llvm-svn: 31546
2006-11-08 10:29:57 +00:00
Devang Patel
03dc236bdd
Move BasicBlockPassManager_New, FunctionPassManager_New and
...
ModulePassManager_New class declarations from PassManager.h
to PassManager.cpp
llvm-svn: 31545
2006-11-08 10:05:38 +00:00
Evan Cheng
1f5c4a6c43
- When performing pre-/post- indexed load/store transformation, do not worry
...
about whether the new base ptr would be live below the load/store. Let two
address pass split it back to non-indexed ops.
- Minor tweaks / fixes.
llvm-svn: 31544
2006-11-08 08:30:28 +00:00
Evan Cheng
acc6a98286
Fixed a minor bug preventing some pre-indexed load / store transformation.
...
llvm-svn: 31543
2006-11-08 06:56:05 +00:00
Reid Spencer
da1f5b882a
For PR950:
...
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.
llvm-svn: 31542
2006-11-08 06:47:33 +00:00
Chris Lattner
d2ebf186dc
regenerate
...
llvm-svn: 31539
2006-11-08 05:58:47 +00:00
Chris Lattner
6147da248c
Fix a bug noticed by Emil Mikulic.
...
llvm-svn: 31538
2006-11-08 05:58:11 +00:00
Evan Cheng
e50f5e4c05
Fix a obscure post-indexed load / store dag combine bug.
...
llvm-svn: 31537
2006-11-08 02:38:55 +00:00
Chris Lattner
bd39c99fd1
Refactor all the addressing mode selection stuff into the isel lowering
...
class, where it can be used for preinc formation.
llvm-svn: 31536
2006-11-08 02:15:41 +00:00
Chris Lattner
35fb10e1a4
correct the (currently unused) pattern for lwzu.
...
llvm-svn: 31535
2006-11-08 02:13:12 +00:00
Devang Patel
432399869d
Beautify.
...
llvm-svn: 31533
2006-11-08 01:31:28 +00:00
Chris Lattner
f71921c79d
optimize single MBB loops better. In particular, produce:
...
LBB1_57: #bb207.i
movl 72(%esp), %ecx
movb (%ecx,%eax), %cl
movl 80(%esp), %edx
movb %cl, 1(%edx,%eax)
incl %eax
cmpl $143, %eax
jne LBB1_57 #bb207.i
jmp LBB1_64 #cond_next255.i
intead of:
LBB1_57: #bb207.i
movl 72(%esp), %ecx
movb (%ecx,%eax), %cl
movl 80(%esp), %edx
movb %cl, 1(%edx,%eax)
incl %eax
cmpl $143, %eax
je LBB1_64 #cond_next255.i
jmp LBB1_57 #bb207.i
This eliminates a branch per iteration of the loop. This hurted PPC
particularly, because the extra branch meant another dispatch group for each
iteration of the loop.
llvm-svn: 31530
2006-11-08 01:03:21 +00:00
Devang Patel
47de6ddc07
Update new pass managers to use PassManagerAnalysisHelper API.
...
llvm-svn: 31526
2006-11-07 22:56:50 +00:00
Chris Lattner
924b2b109f
scalarrepl should not split the two elements of the vsiidx array:
...
int func(vFloat v0, vFloat v1) {
int ii;
vSInt32 vsiidx[2];
vsiidx[0] = _mm_cvttps_epi32(v0);
vsiidx[1] = _mm_cvttps_epi32(v1);
ii = ((int *) vsiidx)[4];
return ii;
}
This fixes Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll
llvm-svn: 31524
2006-11-07 22:42:47 +00:00
Devang Patel
fece2777c4
Introduce PassManagerAnalysisHelper.
...
llvm-svn: 31522
2006-11-07 22:35:17 +00:00
Devang Patel
6d4ef98c03
Add PassManager_New.
...
llvm-svn: 31521
2006-11-07 22:23:34 +00:00
Evan Cheng
7ca1f47a96
Fixed a bug which causes x86 be to incorrectly match
...
shuffle v, undef, <2, ?, 3, ?>
to movhlps
It should match to unpckhps instead.
Added proper matching code for
shuffle v, undef, <2, 3, 2, 3>
llvm-svn: 31519
2006-11-07 22:14:24 +00:00
Devang Patel
cacc940858
Add ModulePassManager_New.
...
llvm-svn: 31517
2006-11-07 22:03:15 +00:00
Jim Laskey
f0843a78c4
Accidently reran commit.
...
llvm-svn: 31516
2006-11-07 21:58:55 +00:00
Devang Patel
9a2c6538dd
Add FunctionPassManager_New.
...
llvm-svn: 31515
2006-11-07 21:49:50 +00:00
Jim Laskey
5264310433
Missed a label map, reverting till covered.
...
llvm-svn: 31514
2006-11-07 21:37:31 +00:00
Devang Patel
b7d2cd5ec2
Add BasicBlockPassManager_New.
...
llvm-svn: 31513
2006-11-07 21:31:57 +00:00
Jim Laskey
54a8f6f998
Missed a label map, reverting till covered.
...
llvm-svn: 31512
2006-11-07 20:53:05 +00:00
Andrew Lenharth
a79b273ca9
Optionally allow comparison operations from affect DSGraphs
...
llvm-svn: 31511
2006-11-07 20:39:05 +00:00
Andrew Lenharth
9182b69155
Allow loop detection during debug in forwarding nodes, and revert auxcall patch as it make 176.gcc untenable
...
llvm-svn: 31510
2006-11-07 20:36:02 +00:00
Andrew Lenharth
0bab81d9e2
debug type for DSA TD
...
llvm-svn: 31509
2006-11-07 20:35:11 +00:00
Jim Laskey
7e0f0b2d24
1. Add a pass to fold debug label instructions so a debug info client can detect
...
empty ranges.
2. Reorg how MachineDebugInfo maintains changes to debug labels.
3. Have dwarf writer use debug label info to simplify scopes and source line
coorespondence.
4. Revert the merging of compile units until I can get the bugs ironed out.
llvm-svn: 31507
2006-11-07 19:33:46 +00:00
Chris Lattner
f64e5f5f3e
add a note from viterbi
...
llvm-svn: 31506
2006-11-07 18:30:21 +00:00
Chris Lattner
3e2e03ef34
Enable improved spilling costs by default. This speeds up viterbi on x86
...
by 40%, FreeBench/fourinarow by 20%, and many other programs 10-25%.
On PPC, this speeds up fourinarow by 18%, and probably other things as well.
llvm-svn: 31504
2006-11-07 18:04:58 +00:00
Jim Laskey
4b1aff4aec
Use correct value for float HUGH_VAL.
...
llvm-svn: 31500
2006-11-07 12:25:45 +00:00
Evan Cheng
3db2b3aab9
Add post-indexed load / store transformations.
...
llvm-svn: 31498
2006-11-07 09:03:05 +00:00
Chris Lattner
f966846d10
Add a new llcbeta option. This speeds up viterbi from 12.34 to 8.76s on
...
X86. If happy, I'll enable this by default.
llvm-svn: 31493
2006-11-07 07:18:40 +00:00
Reid Spencer
03e18e905e
Unbreak X86/ELF Debugging. Somehow this line got lost in Jim's cleanup.
...
llvm-svn: 31492
2006-11-07 06:36:36 +00:00
Chris Lattner
c8d5fc4461
Fix PR988 and CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll.
...
The low part goes in the first operand of expandop, not the second one.
llvm-svn: 31487
2006-11-07 04:11:44 +00:00
Chris Lattner
bed20e1a25
fix encoding of BLR
...
llvm-svn: 31485
2006-11-07 01:51:50 +00:00
Evan Cheng
ef1c22b6fa
Remove dead code; added a missing null ptr check.
...
llvm-svn: 31478
2006-11-06 21:33:46 +00:00
Chris Lattner
c3e6822514
add a note
...
llvm-svn: 31477
2006-11-06 21:26:49 +00:00
Jim Laskey
1f3ff6bcfe
Tab interferes with uniqueness.
...
NOTE: There doesn't seem to be consistency for whether a leading tab
is present in a section heading.
llvm-svn: 31475
2006-11-06 16:23:59 +00:00
Jim Laskey
2008b25d7e
D'oh - reversed logic.
...
llvm-svn: 31474
2006-11-06 13:20:29 +00:00
Evan Cheng
f191d53a9a
Add comment.
...
llvm-svn: 31473
2006-11-06 08:14:30 +00:00
Jeff Cohen
e1003da1a2
Unbreak VC++ build.
...
llvm-svn: 31464
2006-11-05 19:31:28 +00:00
Reid Spencer
be216ad603
Fix a bug in the last patch and convert to && instead of & for logical expr.
...
llvm-svn: 31463
2006-11-05 19:26:37 +00:00
Reid Spencer
f88c9b1dfc
Implement the -enabled-cbe-printf-a feature.
...
llvm-svn: 31462
2006-11-05 17:09:41 +00:00
Nick Lewycky
8b17d79f5e
Remove commented line from earlier debugging.
...
llvm-svn: 31460
2006-11-05 14:19:40 +00:00
Evan Cheng
bf7db95159
Added pre-indexed store support.
...
llvm-svn: 31459
2006-11-05 09:31:14 +00:00
Evan Cheng
ae357e5044
Added getIndexedStore.
...
llvm-svn: 31458
2006-11-05 09:30:09 +00:00
Jim Laskey
1c8b925a87
Live local variables are being dropped because the begin or end labels marking
...
their scope are being deleted. Workaround is to widen scope to full function.
llvm-svn: 31454
2006-11-04 10:48:07 +00:00
Evan Cheng
42cb1fd0ac
Changes to use operand constraints to process two-address instructions.
...
llvm-svn: 31453
2006-11-04 09:44:31 +00:00
Chris Lattner
a193c9c977
encode BLR predicate info for the JIT
...
llvm-svn: 31450
2006-11-04 05:42:48 +00:00
Chris Lattner
a7687f805c
Go through all kinds of trouble to mark 'blr' as having a predicate operand
...
that takes a register and condition code. Print these pieces of BLR the
right way, even though it is currently set to 'always'.
Next up: get the JIT encoding right, then enhance branch folding to produce
predicated blr for simple examples.
llvm-svn: 31449
2006-11-04 05:27:39 +00:00
Evan Cheng
4328919c08
Fixed some spiller bugs exposed by the recent two-address code changes. Now
...
there may be other def(s) apart from the use&def two-address operand. We need
to check if the register reuse for a use&def operand may conflicts with another
def. Provide a mean to recover from the conflict if it is detected when the
defs are processed later.
llvm-svn: 31439
2006-11-04 00:21:55 +00:00
Chris Lattner
db04ba8502
Describe PPC predicates, which are a pair of CR# and condition.
...
llvm-svn: 31438
2006-11-03 23:53:25 +00:00
Chris Lattner
4296d2e0fa
initial steps to getting the predicate on PPC::BLR right.
...
llvm-svn: 31437
2006-11-03 23:52:18 +00:00
Chris Lattner
f9394871ff
remove dead var
...
llvm-svn: 31436
2006-11-03 23:50:15 +00:00
Chris Lattner
7c265ad682
remove dead/redundant vars
...
llvm-svn: 31435
2006-11-03 23:48:56 +00:00
Chris Lattner
a69c6416ca
remove redundant/dead vars
...
llvm-svn: 31434
2006-11-03 23:47:20 +00:00
Chris Lattner
5f953f0927
remove dead vars
...
llvm-svn: 31433
2006-11-03 23:46:45 +00:00
Andrew Lenharth
c2f822392c
The wrong parameter was being tested to deturmine i32 vs i64
...
llvm-svn: 31431
2006-11-03 22:45:50 +00:00
Chris Lattner
2cb1391e09
add a note
...
llvm-svn: 31429
2006-11-03 22:27:39 +00:00
Chris Lattner
bbc4261790
Fix BasicAA/2006-11-03-BasicAAVectorCrash.ll by handling out-of-range
...
vector accesses like we handle out-of-range array accesses.
llvm-svn: 31427
2006-11-03 21:58:48 +00:00
Chris Lattner
7628decccf
this will work better
...
llvm-svn: 31419
2006-11-03 19:15:55 +00:00
Chris Lattner
8bf77463ea
Fix the build on xcode < 2.4
...
llvm-svn: 31417
2006-11-03 19:13:59 +00:00
Andrew Lenharth
8a81e9e264
Split the External and Intrinsic handling into seperate functions. This
...
improves readability of the call handling code significantly, as well as
makes it clear which parts are hacky (externals) and which parts are good
(call handling).
No functionality change.
llvm-svn: 31415
2006-11-03 17:43:19 +00:00
Evan Cheng
047a33d3e3
Fix comments.
...
llvm-svn: 31414
2006-11-03 07:31:32 +00:00
Evan Cheng
466e20fca2
Rename
...
llvm-svn: 31413
2006-11-03 07:21:16 +00:00
Reid Spencer
8cac48e619
Remove dead variable. Fix 80 column violations.
...
llvm-svn: 31412
2006-11-03 03:30:34 +00:00
Rafael Espindola
3459a4b85b
revert previous patch
...
llvm-svn: 31411
2006-11-03 03:08:28 +00:00
Evan Cheng
a0133317f7
Added DAG combiner transformation to generate pre-indexed loads.
...
llvm-svn: 31410
2006-11-03 03:06:21 +00:00
Evan Cheng
b9ed18642c
Added isPredecessor.
...
llvm-svn: 31409
2006-11-03 03:05:24 +00:00
Evan Cheng
79570c731a
Proper check for two-addressness.
...
llvm-svn: 31408
2006-11-03 03:04:46 +00:00
Evan Cheng
54c4be233e
Dead code.
...
llvm-svn: 31405
2006-11-03 02:08:41 +00:00
Reid Spencer
52135336f2
Remove some dead code.
...
llvm-svn: 31401
2006-11-03 01:44:51 +00:00
Rafael Espindola
5cfe91aaca
add createCFGSimplificationPass to ARMTargetMachine::addInstSelector
...
llvm-svn: 31400
2006-11-03 01:39:25 +00:00
Rafael Espindola
ef14a04371
assert.h -> cassert
...
llvm-svn: 31399
2006-11-03 01:38:14 +00:00
Chris Lattner
8f8a1ed82e
remove dead code
...
llvm-svn: 31398
2006-11-03 01:34:58 +00:00
Chris Lattner
d4881b4e2d
silence warning
...
llvm-svn: 31397
2006-11-03 01:28:29 +00:00
Chris Lattner
294085b9be
silence warning
...
llvm-svn: 31395
2006-11-03 01:19:31 +00:00
Chris Lattner
13ae6835d9
silence warnings.
...
llvm-svn: 31394
2006-11-03 01:18:29 +00:00
Chris Lattner
24e8fdc1f6
silence warning
...
llvm-svn: 31393
2006-11-03 01:13:15 +00:00
Chris Lattner
71ce2c5de5
silence warnings
...
llvm-svn: 31392
2006-11-03 01:11:05 +00:00
Reid Spencer
524974949d
Make CBackend -pedantic clean.
...
llvm-svn: 31388
2006-11-03 00:00:57 +00:00
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
Chris Lattner
a44a27dc47
TargetLowering::isOperandValidForConstraint
...
llvm-svn: 31319
2006-10-31 19:41:18 +00:00
Chris Lattner
d9afd310a6
Change the prototype for TargetLowering::isOperandValidForConstraint
...
llvm-svn: 31318
2006-10-31 19:40:43 +00:00
Chris Lattner
3b7a9fa472
generalize the fix for PR977 to also fix
...
Transforms/LCSSA/2006-10-31-UnreachableBlock-2.ll
llvm-svn: 31317
2006-10-31 18:56:48 +00:00
Chris Lattner
79daf6ae80
Fix PR977 and Transforms/LCSSA/2006-10-31-UnreachableBlock.ll
...
llvm-svn: 31315
2006-10-31 17:52:18 +00:00
Andrew Lenharth
c4f8836525
Add all that branch mangling niftiness
...
llvm-svn: 31313
2006-10-31 16:49:55 +00:00
Rafael Espindola
ba8771a3db
add support for calling functions when the caller has variable sized objects
...
llvm-svn: 31312
2006-10-31 13:03:26 +00:00
Anton Korobeynikov
e6ba8a819c
1. Clean up code due to changes in SwitchTo*Section(2)
...
2. Added partial debug support for mingw\cygwin targets (the same as
Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
for storing debug info by default, thus many (runtime) libraries has
this information included. These formats shouldn't be mixed in one binary
('stabs' & 'DWARF'), otherwise binutils tools will be confused.
llvm-svn: 31311
2006-10-31 08:31:24 +00:00
Chris Lattner
a9f10b25cc
Turn an assert into an error message. This is commonly triggered when
...
we don't support a specific constraint yet. When this happens, print the
unsupported constraint.
llvm-svn: 31310
2006-10-31 07:33:13 +00:00
Anton Korobeynikov
9867bf5eaf
Unbreaking static ctors patch.
...
Defaulting second arguments of SwitchTo*Section, this should make things
somehow clearer.
llvm-svn: 31306
2006-10-31 06:11:06 +00:00
Evan Cheng
3da8d26445
Fix a typo which can break jumptables.
...
llvm-svn: 31305
2006-10-31 02:31:00 +00:00
Reid Spencer
0b5a938e79
Make this compile again.
...
llvm-svn: 31304
2006-10-31 01:45:56 +00:00
Evan Cheng
a8168f310e
Apply Aton's LLVM patch for PR973: Linux ctors / dtors support.
...
llvm-svn: 31303
2006-10-31 01:26:55 +00:00
Reid Spencer
fe7c10d900
Fix a problem introduced by a last-minute change (logic negation).
...
llvm-svn: 31302
2006-10-30 23:34:32 +00:00
Chris Lattner
ed0b1b4b24
fix miscompilation of llvm.isunordered, where we branched on the opposite
...
condition. This fixes miscompilation of Olden/bh and many others.
llvm-svn: 31301
2006-10-30 23:02:25 +00:00
Reid Spencer
db06ed9156
Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
...
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.
llvm-svn: 31299
2006-10-30 22:32:30 +00:00
Chris Lattner
ac9ed02670
fix wonky indentation
...
llvm-svn: 31298
2006-10-30 22:27:23 +00:00
Devang Patel
2015279c13
Update comment. Valid option is -debug-pass=Structures.
...
llvm-svn: 31297
2006-10-30 19:25:54 +00:00
Jim Laskey
df32faedf7
Switch abbreviations to use the folding set.a.
...
llvm-svn: 31296
2006-10-30 15:59:54 +00:00
Jim Laskey
1ccb7c5d03
Simplify DwarfWriter header.
...
llvm-svn: 31295
2006-10-30 13:35:07 +00:00
Evan Cheng
5766dd6455
All targets expand BR_JT for now.
...
llvm-svn: 31294
2006-10-30 08:02:39 +00:00
Evan Cheng
972f469722
Lower jumptable to BR_JT. The legalizer can lower it to a BRIND or let the target custom lower it.
...
llvm-svn: 31293
2006-10-30 08:00:44 +00:00
Evan Cheng
7437ed9f30
Added a new SDNode type: BR_JT for jumptable branch.
...
llvm-svn: 31292
2006-10-30 07:59:36 +00:00
Chris Lattner
1db6efc297
add a highly efficient hash table that is specialized for mapping C strings
...
to some other type.
llvm-svn: 31286
2006-10-29 23:42:03 +00:00
Chris Lattner
6a498a7658
Add a new llvm::Allocator abstraction, which will be used by a container
...
I'm about to add. This is similar to, but necessarily different than, the
STL allocator class.
llvm-svn: 31285
2006-10-29 22:08:03 +00:00
Chris Lattner
cc8731fef4
Fix SimplifyCFG/2006-10-29-InvokeCrash.ll, a crash compiling QT.
...
llvm-svn: 31284
2006-10-29 21:21:20 +00:00
Chris Lattner
e1b2b2127b
Make CanFallThrough more intelligent (so it can handle blocks with (e.g.) no
...
successors), and make island block movement more general.
This compiles CodeGen/X86/2006-04-27-ISelFoldingBug.ll to:
_loadAndRLEsource_no_exit_2E_1_label_2E_0:
subl $8, %esp
movl %esi, 4(%esp)
movl %ebx, (%esp)
movl 16(%esp), %eax
movl 12(%esp), %ecx
LBB1_3: #label.0
movl _last, %edx
movl %edx, %esi
incl %esi
movl %esi, _last
movl %ecx, %ebx
# TRUNCATE movb %bl, %bl
movl _block, %esi
movb %bl, 1(%esi,%edx)
cmpl %eax, _last
jge LBB1_2 #codeRepl5.exitStub
LBB1_4: #label.0
cmpl $257, %ecx
je LBB1_2 #codeRepl5.exitStub
LBB1_1: #label.0.no_exit.1_crit_edge.exitStub
movl $1, %eax
movl (%esp), %ebx
movl 4(%esp), %esi
addl $8, %esp
ret
LBB1_2: #codeRepl5.exitStub
xorl %eax, %eax
movl (%esp), %ebx
movl 4(%esp), %esi
addl $8, %esp
ret
instead of:
_loadAndRLEsource_no_exit_2E_1_label_2E_0:
subl $8, %esp
movl %esi, 4(%esp)
movl %ebx, (%esp)
movl 16(%esp), %eax
movl 12(%esp), %ecx
jmp LBB1_3 #label.0
LBB1_1: #label.0.no_exit.1_crit_edge.exitStub
movl $1, %eax
movl (%esp), %ebx
movl 4(%esp), %esi
addl $8, %esp
ret
LBB1_2: #codeRepl5.exitStub
xorl %eax, %eax
movl (%esp), %ebx
movl 4(%esp), %esi
addl $8, %esp
ret
LBB1_3: #label.0
movl _last, %edx
movl %edx, %esi
incl %esi
movl %esi, _last
movl %ecx, %ebx
# TRUNCATE movb %bl, %bl
movl _block, %esi
movb %bl, 1(%esi,%edx)
cmpl %eax, _last
jge LBB1_2 #codeRepl5.exitStub
LBB1_4: #label.0
cmpl $257, %ecx
jne LBB1_1 #label.0.no_exit.1_crit_edge.exitStub
jmp LBB1_2 #codeRepl5.exitStub
... which is much better layout :)
llvm-svn: 31282
2006-10-29 21:05:41 +00:00
Chris Lattner
46a439780e
fix Generic/2006-10-29-Crash.ll
...
llvm-svn: 31281
2006-10-29 21:01:20 +00:00
Chris Lattner
0a5d859ae3
Fix a load folding issue that Evan noticed: there is no need to export values
...
used by comparisons in the main block.
llvm-svn: 31279
2006-10-29 18:23:37 +00:00
Jim Laskey
0a32281238
Try again.
...
llvm-svn: 31278
2006-10-29 09:19:59 +00:00
Jim Laskey
7c8f89c34e
Not handling zero length strings.
...
llvm-svn: 31277
2006-10-29 08:27:07 +00:00
Evan Cheng
fa1756d048
VLOAD is not the LoadSDNode opcode.
...
llvm-svn: 31276
2006-10-29 06:14:47 +00:00
Nick Lewycky
baef048f71
Remove spurious case. EXTLOAD is not one of the node opcodes.
...
llvm-svn: 31275
2006-10-29 02:26:30 +00:00
Chris Lattner
776740f897
split critical edges more carefully and intelligently. In particular, critical
...
edges whose destinations are not phi nodes don't bother us. Also, share
split edges, since the split edge can't have a phi. This significantly
reduces the complexity of generated code in some cases.
llvm-svn: 31274
2006-10-28 19:22:10 +00:00
Chris Lattner
95eed3bd09
Teach branch folding to fold identical jump tables together and to delete
...
jump tables that are dead.
llvm-svn: 31273
2006-10-28 18:34:47 +00:00
Chris Lattner
3c19558b6b
const'ify jump table stuff
...
llvm-svn: 31269
2006-10-28 18:17:09 +00:00
Chris Lattner
8f46e97b96
add an assert
...
llvm-svn: 31267
2006-10-28 18:11:20 +00:00
Chris Lattner
2d338110d3
don't print dead jump tables
...
llvm-svn: 31266
2006-10-28 18:10:06 +00:00
Chris Lattner
a478e05437
implement the BlockHasNoFallThrough hook
...
llvm-svn: 31264
2006-10-28 17:35:02 +00:00
Chris Lattner
af9b4c33c2
improve deletion of blocks that just contain branches by knowing that
...
the pred block doesn't fall through into them if it's a jumptable.
llvm-svn: 31263
2006-10-28 17:32:47 +00:00
Chris Lattner
dcfee77788
add another target hook for branch folding.
...
llvm-svn: 31262
2006-10-28 17:29:57 +00:00
Jim Laskey
26ac9ac4ad
Load and stores have not been uniqued properly.
...
llvm-svn: 31261
2006-10-28 17:25:28 +00:00
Chris Lattner
ee8a70f370
Split *all* critical edges before isel. This resolves issues with spill code
...
being inserted on unsplit critical edges, which introduces (sometimes large
amounts of) partially dead spill code.
This also fixes PR925 + CodeGen/Generic/switch-crit-edge-constant.ll
llvm-svn: 31260
2006-10-28 17:04:37 +00:00
Chris Lattner
65f872288d
add option to isCriticalEdge
...
llvm-svn: 31258
2006-10-28 06:58:17 +00:00
Chris Lattner
a1da382ad3
break edges more intelligently
...
llvm-svn: 31257
2006-10-28 06:45:33 +00:00
Chris Lattner
85bc826ca6
Expose a smarter way to break critical edges.
...
llvm-svn: 31256
2006-10-28 06:44:56 +00:00
Chris Lattner
41216d38c5
SplitCriticalEdge checks to see if an edge is critical, don't check twice
...
llvm-svn: 31255
2006-10-28 06:38:14 +00:00
Chris Lattner
f44a34d817
Fix a serious bug that caused any x86 vector stuff to infinite loop
...
llvm-svn: 31254
2006-10-28 06:15:26 +00:00
Evan Cheng
b60a58362a
Doh. Must check if GV is constant first before putting it in .cstring.
...
llvm-svn: 31253
2006-10-28 05:56:51 +00:00
Evan Cheng
45b6e99308
Doh. Must check if GV is constant first.
...
llvm-svn: 31252
2006-10-28 05:56:06 +00:00
Chris Lattner
44b3550217
add a method
...
llvm-svn: 31249
2006-10-28 01:24:05 +00:00
Chris Lattner
93414d06c4
prepare for a change I'm about to make
...
llvm-svn: 31248
2006-10-28 00:59:20 +00:00
Chris Lattner
0d69f553c9
don't dist internal readme
...
llvm-svn: 31247
2006-10-28 00:51:15 +00:00
Chris Lattner
c94f21143f
don't dist internal readme's
...
llvm-svn: 31246
2006-10-28 00:49:54 +00:00
Chris Lattner
b57c880eb0
don't distribute internal readme's
...
llvm-svn: 31245
2006-10-28 00:48:27 +00:00
Reid Spencer
6719e92a1a
Make sure all the readme files get distributed.
...
llvm-svn: 31244
2006-10-28 00:11:39 +00:00
Jim Laskey
17bfaab377
Clean up.
...
llvm-svn: 31243
2006-10-27 23:52:51 +00:00