Chris Lattner
e56fef9b51
eliminate temporary vectors created during X86 lowering.
...
llvm-svn: 34577
2007-02-25 06:40:16 +00:00
Chris Lattner
84141d4e99
remove std::vector's in RET lowering.
...
llvm-svn: 34576
2007-02-25 06:21:57 +00:00
Chris Lattner
43df5b335c
implement support for the linux/ppc function call ABI. Patch by
...
Nicolas Geoffray!
llvm-svn: 34574
2007-02-25 05:34:32 +00:00
Chris Lattner
b9bd34f54a
Add XLForm_1_ext template, patch by Nicolas Geoffray.
...
llvm-svn: 34573
2007-02-25 05:07:49 +00:00
Chris Lattner
249edb8b67
Improve JIT support for linux/ppc: Patch by Nicolas Geoffray!
...
llvm-svn: 34572
2007-02-25 05:04:13 +00:00
Chris Lattner
4ae31ba82c
this doesn't compile, disable it
...
llvm-svn: 34571
2007-02-25 02:32:44 +00:00
Reid Spencer
522ca7cd8b
Clean up lshr and ashr to coding standards.
...
Handle the single word cases for shiftAmt == BitWidth.
llvm-svn: 34569
2007-02-25 01:56:07 +00:00
Dale Johannesen
e80e31eada
remove crediting of Evan Cheng and me.
...
llvm-svn: 34568
2007-02-25 01:42:36 +00:00
Chris Lattner
168c5856bf
initialize a instance variable
...
llvm-svn: 34567
2007-02-25 01:28:05 +00:00
Reid Spencer
ab0e08ae2f
Whoops, last word with bits in large shift left wasn't correct.
...
llvm-svn: 34565
2007-02-25 01:08:58 +00:00
Reid Spencer
a5c84d95fa
Fix the > 64 bits case for left shift.
...
llvm-svn: 34564
2007-02-25 00:56:44 +00:00
Dale Johannesen
01ee5750f4
Removed WaterListOffset, inserted BBOffsets. Remove TODO item about this
...
from README.
When no water available, use end of block if in range. (More to do here.)
llvm-svn: 34563
2007-02-25 00:47:03 +00:00
Reid Spencer
468ad911cb
Fix the remainder shifting in KnuthDiv.
...
llvm-svn: 34562
2007-02-24 20:38:01 +00:00
Reid Spencer
632ebdf8bd
1. Fix a bug in fromString for the <= 64bits case
...
2. Fix shl when shiftAmount == BitWidth.
llvm-svn: 34560
2007-02-24 20:19:37 +00:00
Reid Spencer
df6cf5ab71
1. Fix last bug in KnuthDiv. All divide tests pass up to 1024 bits now.
...
2. Clean up comments, style, coding standards, etc.
3. Simplify a constructor.
Extended testing revealed some additional bugs in shifting. I'll fix these
tomorrow.
llvm-svn: 34559
2007-02-24 10:01:42 +00:00
Jim Laskey
e1d1c0590f
Deal with cases when MMI is not requested.
...
llvm-svn: 34556
2007-02-24 09:45:44 +00:00
Jim Laskey
b869ab6f31
Drop unused operand.
...
llvm-svn: 34555
2007-02-24 09:44:17 +00:00
Reid Spencer
a5e0d200c9
1. Make internal functions take const arguments where they should, just
...
to be safe.
2. Make internal functions that return a carry/borrow return bool instead
of uint64_t because the carry/borrow can only be in range [0,1].
3. Assert that the pointers to KnuthDiv are all different so that the
result and operands can't overlap.
4. Add debug output to KnuthDiv function.
5. Fix a problem with KnuthDiv by separating the b's complement operation
from the subtraction borrow operation. This fixes a wide range of
division problems, but alas, not all of them.
llvm-svn: 34554
2007-02-24 03:58:46 +00:00
Chris Lattner
05858a9e32
Fix PR1216 by cleaning up the ownership of JITResolver.
...
llvm-svn: 34552
2007-02-24 02:57:03 +00:00
Chris Lattner
d7ef3f804d
Fix CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll and PR1219
...
llvm-svn: 34551
2007-02-24 02:09:29 +00:00
Chris Lattner
a5821eca0d
remove folding set debug output
...
llvm-svn: 34549
2007-02-24 01:41:48 +00:00
Chris Lattner
fb94fe742b
Fix Transforms/ConstProp/2007-02-23-sdiv.ll and PR1215
...
llvm-svn: 34548
2007-02-24 01:19:50 +00:00
Chris Lattner
c4d8e7e614
Fix InstCombine/2007-02-23-PhiFoldInfLoop.ll and PR1217
...
llvm-svn: 34546
2007-02-24 01:03:45 +00:00
Chris Lattner
2195fc41ec
Refactor the setName stuff, moving it down the inheritance hierarchy, to
...
solve a crash in -instcombine -debug that was hit while investigating PR1217
llvm-svn: 34544
2007-02-24 00:55:48 +00:00
Bill Wendling
77a345f000
PR1164:
...
Generate local names with a "llvm_cbe_" prefix using the actual name of the
variable instead of a temporary name.
llvm-svn: 34540
2007-02-23 22:45:08 +00:00
Chris Lattner
66330fdddb
Avoid TBAA issue.
...
llvm-svn: 34539
2007-02-23 22:31:24 +00:00
Lauro Ramos Venancio
0eb70ebbe5
bugfix: SP wasn't updated for varargs when frame pointer was eliminated.
...
llvm-svn: 34537
2007-02-23 21:53:48 +00:00
Evan Cheng
520b20d3b7
Reuse extends the liveness of a register. Transfer the kill to the operand that reuse it.
...
llvm-svn: 34536
2007-02-23 21:47:50 +00:00
Jim Laskey
31fef788eb
Handle improper cast.
...
llvm-svn: 34535
2007-02-23 21:45:01 +00:00
Evan Cheng
97cc93841d
Handle cases when joining live intervals of two virtual registers.
...
llvm-svn: 34534
2007-02-23 20:40:13 +00:00
Jim Laskey
2f28a3cf08
Don't spill LR as a callee saved register.
...
llvm-svn: 34533
2007-02-23 20:34:16 +00:00
Lauro Ramos Venancio
3e906c48d3
Fix stack alignment in functions with varargs.
...
llvm-svn: 34532
2007-02-23 20:32:57 +00:00
Chris Lattner
1e48acb858
fix an obscure and tricky bug the inliner can hit sometimes.
...
llvm-svn: 34531
2007-02-23 19:54:30 +00:00
Devang Patel
b1fcb9ae15
Fix thinko.
...
llvm-svn: 34528
2007-02-23 18:05:55 +00:00
Devang Patel
d3ccdfd04d
Loop passes are set up to accept pointer.
...
llvm-svn: 34527
2007-02-23 17:53:17 +00:00
Evan Cheng
584e051c28
Mark livein registers as being in used.
...
llvm-svn: 34525
2007-02-23 08:41:19 +00:00
Dale Johannesen
e18b13b213
rewrite of constant islands
...
llvm-svn: 34523
2007-02-23 05:02:36 +00:00
Evan Cheng
9f8301413c
Added -march=thumb; removed -enable-thumb.
...
llvm-svn: 34521
2007-02-23 03:14:31 +00:00
Evan Cheng
d00d344519
80 col. violation.
...
llvm-svn: 34520
2007-02-23 03:03:16 +00:00
Anton Korobeynikov
01b49ce415
External weak linkage is supported by recent binutils on mingw32.
...
llvm-svn: 34519
2007-02-23 01:58:50 +00:00
Reid Spencer
cb292e4a20
1. Fix a carry out problem in add if destination and x point to the same
...
memory (as done in fromString).
2. Implement Knuth divide more closely to what is recommended in his book.
3. Fix computation of the remainder for Knuth Divide (bad shifting).
4. Remove some cruft from the file
llvm-svn: 34518
2007-02-23 01:57:13 +00:00
Evan Cheng
f7e320c9e0
A spill kills the register being stored. But it is later being reused by spiller, its live range has to be extended.
...
llvm-svn: 34517
2007-02-23 01:13:26 +00:00
Evan Cheng
1e56453585
First potential client of register scavenger.
...
llvm-svn: 34516
2007-02-23 01:11:26 +00:00
Evan Cheng
df5899258c
By default, spills kills the register being stored.
...
llvm-svn: 34515
2007-02-23 01:10:04 +00:00
Evan Cheng
15af662314
Add option to turn on register scavenger; By default, spills kills the register being stored.
...
llvm-svn: 34514
2007-02-23 01:09:11 +00:00
Evan Cheng
9965aebd5d
Use findRegisterUseOperand to find a kill of particular register.
...
llvm-svn: 34512
2007-02-23 01:04:26 +00:00
Evan Cheng
956fdeb694
Initial check in of register scavenger. Its only current functionality is tracking live registers per MBB.
...
llvm-svn: 34511
2007-02-23 01:01:19 +00:00
Devang Patel
55c3827281
Teach LoopPass to assign itself one Loop Pass Manager.
...
llvm-svn: 34510
2007-02-23 00:36:57 +00:00
Devang Patel
715add3462
Add facility that allows LoopPass to re-insert a loop into
...
Loop Pass Manager's queue.
llvm-svn: 34509
2007-02-23 00:16:44 +00:00
Devang Patel
4e335c6c71
Add LPPassManager interface that LoopPass can use to skip
...
rest of the passes in the queue for a loop.
llvm-svn: 34508
2007-02-23 00:10:16 +00:00
Chris Lattner
0416b204c9
remove obsolete file
...
llvm-svn: 34506
2007-02-22 23:48:43 +00:00
Devang Patel
51705713c9
Populate and walk loop queue.
...
llvm-svn: 34505
2007-02-22 23:45:15 +00:00
Devang Patel
de7d49053f
Add LoopQueue. This is used by loop pass manager to manage loop nest.
...
llvm-svn: 34504
2007-02-22 23:30:07 +00:00
Evan Cheng
cc607daac1
Remove unnecessary isKill properties if a live range has been lengthened due to coalescing.
...
llvm-svn: 34503
2007-02-22 23:03:39 +00:00
Jim Laskey
5cbb4262ab
Update comment.
...
llvm-svn: 34502
2007-02-22 18:51:19 +00:00
Jim Laskey
66aa84d12f
Missing end of abbreviations - correction
...
llvm-svn: 34501
2007-02-22 18:48:52 +00:00
Jim Laskey
4e3d2b9acc
Missing end of abbreviations.
...
llvm-svn: 34500
2007-02-22 18:22:42 +00:00
Jim Laskey
3e3a65b764
Need to init.
...
llvm-svn: 34499
2007-02-22 18:04:49 +00:00
Jim Laskey
9df1a1d8d8
Remove isAccessable.
...
llvm-svn: 34497
2007-02-22 16:39:03 +00:00
Jim Laskey
69bd45c1d2
Use exception flag.
...
llvm-svn: 34496
2007-02-22 16:22:15 +00:00
Jim Laskey
d879dfbf1c
Revert changes for a simplier solution.
...
llvm-svn: 34495
2007-02-22 16:21:18 +00:00
Jim Laskey
46dbe12b32
Remove assertion.
...
llvm-svn: 34494
2007-02-22 16:12:17 +00:00
Jim Laskey
44c37e7dbf
Tighten up error checking of args.
...
llvm-svn: 34493
2007-02-22 16:10:05 +00:00
Jim Laskey
504e99479c
Handle lowering invoke to call correctly.
...
llvm-svn: 34492
2007-02-22 15:38:06 +00:00
Jim Laskey
7f5872c455
Simplify lowering and selection of exception ops.
...
llvm-svn: 34491
2007-02-22 15:37:19 +00:00
Jim Laskey
e0008e23cf
Simplify lowering and selection of exception ops.
...
llvm-svn: 34488
2007-02-22 14:56:36 +00:00
Devang Patel
20525d2836
Add Loop Pass Manager.
...
llvm-svn: 34487
2007-02-22 08:56:17 +00:00
Reid Spencer
867b4064ae
When converting from 64 to 32-bits, use the actual number of words to
...
extract the value, not the number of words implied by the active bits.
This fixes numerous, but not all divide bugs.
llvm-svn: 34484
2007-02-22 00:58:45 +00:00
Reid Spencer
e4ce71d07a
Fix countLeadingZeros in the case that the bitwidth evenly divides the
...
word size. This fixes all reads of uninitialized data (buffer over read)
and makes APInt.cpp memory clean, per valgrind. The only remaining
problem is division in a few cases.
llvm-svn: 34483
2007-02-22 00:22:00 +00:00
Jim Laskey
3796abea0f
Support to provide exception and selector registers.
...
llvm-svn: 34482
2007-02-21 22:54:50 +00:00
Jim Laskey
4b37a4c712
Selection and lowering for exception handling.
...
llvm-svn: 34481
2007-02-21 22:53:45 +00:00
Jim Laskey
e4ccf22c34
Itanium ABI exception handing support.
...
llvm-svn: 34480
2007-02-21 22:49:50 +00:00
Jim Laskey
09953e6482
Exception handling support.
...
llvm-svn: 34479
2007-02-21 22:48:45 +00:00
Jim Laskey
18fc09723c
Add support for changes in DwarfWriter.
...
llvm-svn: 34478
2007-02-21 22:47:38 +00:00
Jim Laskey
af76e0e58f
Add TAI field for exception table section.
...
llvm-svn: 34477
2007-02-21 22:43:40 +00:00
Jim Laskey
2dc5245c4a
Make branch folding behave in the presence of landing pads.
...
llvm-svn: 34476
2007-02-21 22:42:20 +00:00
Jim Laskey
5b2b7c1024
Allow for live in registers for eh landing pads.
...
llvm-svn: 34475
2007-02-21 22:41:17 +00:00
Jim Laskey
88dd2fd332
Add structures used for collecting eh information.
...
llvm-svn: 34473
2007-02-21 22:38:31 +00:00
Evan Cheng
84a041eb98
ELF / PIC requires GOT be in the EBX register during calls via PLT GOT pointer.
...
Add implicit uses of EBX to calls to ensure liveintervalanalysis does not treat
the GOT in EBX move as dead upon definition.
This should fix PR1207.
llvm-svn: 34470
2007-02-21 21:18:14 +00:00
Reid Spencer
58a6a43cb3
Reorganize some code to make it clearer, avoid a few uninitialized memory
...
reads, and reduce the number of temporary APInt instances we construct.
llvm-svn: 34467
2007-02-21 08:21:52 +00:00
Reid Spencer
db2abec8ac
Fix the carry in addition.
...
llvm-svn: 34465
2007-02-21 05:44:56 +00:00
Reid Spencer
1ba833564e
1. Add a dump() method for faster debugging.
...
2. Change 0 initialization of union to larger component so all is zeroed.
3. Fix the borrow logic in subtraction so it works for > 128 bits.
4. Rewrite fromString to use a simpler but correct algorithm and also to
not set the bit width contrary to the user's request.
5. Optimize toString a bit by making it only do one Knuth divide per
iteration instead of two.
With these changes, all arithmetic passes (verified by pari/GP) up to
1024 bits except for certain division cases.
llvm-svn: 34463
2007-02-21 03:55:44 +00:00
Evan Cheng
e563c7eb27
Out of bound reference.
...
llvm-svn: 34461
2007-02-21 02:27:39 +00:00
Evan Cheng
de037a821a
Use BitVector instead. No functionality change.
...
llvm-svn: 34460
2007-02-21 02:22:03 +00:00
Reid Spencer
74cf82e522
Fix countLeadingZeros to actually return the correct number.
...
Fix toString to correctly return "0" for zero valued APInts over 128 bits.
llvm-svn: 34459
2007-02-21 00:29:48 +00:00
Reid Spencer
7a6a8d5116
Make long addition and subtraction work. Speed things up by using internal
...
functions more.
llvm-svn: 34458
2007-02-20 23:40:25 +00:00
Evan Cheng
71b8723f07
This cast broke lots of tests.
...
llvm-svn: 34457
2007-02-20 21:30:56 +00:00
Dan Gohman
8c8597c4d9
Fix typos in comments.
...
llvm-svn: 34456
2007-02-20 20:52:03 +00:00
Reid Spencer
4bb430c4b4
Clean up variable names in operator*.
...
Attempt #3 for getting a portable INFINITY value.
llvm-svn: 34454
2007-02-20 20:42:10 +00:00
Reid Spencer
a83af6e1fc
Use INFINITY macro from math.h instead of constructing hex floating point
...
constants (avoids warnings).
llvm-svn: 34452
2007-02-20 18:29:12 +00:00
Reid Spencer
fb77b2ba13
First version that can process arith.cpp test case up to 1024 bits:
...
1. Ensure pVal is set to 0 in each constructor.
2. Fix roundToDouble to make correct calculations and not read beyond the
end of allocated memory.
3. Implement Knuth's "classical algorithm" for division from scratch and
eliminate buffer overflows and uninitialized mememory reads. Document
it properly too.
4. Implement a wrapper function for KnuthDiv which handles the 64-bit to
32-bit conversion and back. It also implement short division for the
n == 1 case that Knuth's algorithm can't handle.
5. Simplify the logic of udiv and urem a little, make them exit early, and
have them use the "divide" wrapper function to perform the division
or remainder operation.
6. Move the toString function to the end of the file, closer to where
the division functions are located.
Note: division is still broken for some > 64 bit values, but at least it
doesn't crash any more.
llvm-svn: 34449
2007-02-20 08:51:03 +00:00
Chris Lattner
c6ee77d1b0
switch ConstantFP's from ValueMap to DenseMap, which is much faster to query
...
and is more memory efficient.
llvm-svn: 34446
2007-02-20 07:17:17 +00:00
Chris Lattner
a80bf0b2a6
cleanup ConstantInt to use a single DenseMap for uniquing instead of the
...
heavy-weight ValueMap class. This reduces mem usage bc reading kc++ by 29K,
even though it only creates 2955 constant ints!
llvm-svn: 34445
2007-02-20 06:39:57 +00:00
Chris Lattner
4510c99a57
Not all managedstatics need object pointers.
...
llvm-svn: 34444
2007-02-20 06:18:57 +00:00
Chris Lattner
281735098a
Make ConstantInt::getTrue/getFalse be llvm_shutdown safe.
...
llvm-svn: 34443
2007-02-20 06:11:36 +00:00
Chris Lattner
5db2f47364
Clean up the internals of the ConstantInt machinery
...
llvm-svn: 34441
2007-02-20 05:55:46 +00:00
Chris Lattner
dbcb0d3ffe
simplify some code that was not llvm_shutdown safe
...
llvm-svn: 34440
2007-02-20 05:46:39 +00:00
Chris Lattner
c35fe713ff
remove reoptimizer-specific passes
...
llvm-svn: 34439
2007-02-20 05:31:49 +00:00
Chris Lattner
62b2842b6f
remove dead method
...
llvm-svn: 34436
2007-02-20 05:29:47 +00:00
Evan Cheng
61cd0914ed
Dead code.
...
llvm-svn: 34435
2007-02-20 01:29:10 +00:00