Chris Lattner
2ebb2e99d1
a note
...
llvm-svn: 34670
2007-02-27 17:21:09 +00:00
Devang Patel
28349abeab
Make getPassManagerType() const.
...
llvm-svn: 34669
2007-02-27 15:00:39 +00:00
Nicolas Geoffray
b524dfd557
Fix parenthesis for BCTRL_{ELF|Macho} test.
...
llvm-svn: 34668
2007-02-27 13:10:41 +00:00
Nicolas Geoffray
89d81878d2
Differentiate between the MachO and the ELF ABI the CALL instruction.
...
llvm-svn: 34667
2007-02-27 13:01:19 +00:00
Jim Laskey
b6e200bd68
Duplicate use of LR, take 2.
...
llvm-svn: 34666
2007-02-27 11:55:45 +00:00
Nicolas Geoffray
19ec8a9a2c
Added myself
...
llvm-svn: 34665
2007-02-27 10:44:42 +00:00
Reid Spencer
ad25003200
Allow the AsmWriter to print out arbitrary precision integers.
...
llvm-svn: 34664
2007-02-27 08:34:09 +00:00
Reid Spencer
a91ec25da0
Correct the implelmentation of ConstantInt::getAllOnesValue() for bit
...
widths > 64 bits.
llvm-svn: 34663
2007-02-27 07:57:53 +00:00
Reid Spencer
011651745c
Get rid of extraneous // in file comment.
...
llvm-svn: 34662
2007-02-27 07:35:18 +00:00
Chris Lattner
fa9227ed54
Add calling convention info
...
llvm-svn: 34661
2007-02-27 06:59:52 +00:00
Reid Spencer
81658a8aca
For PR1205:
...
Implement constant folding via APInt instead of uint64_t.
llvm-svn: 34660
2007-02-27 06:23:51 +00:00
Chris Lattner
db2049fb8e
move target independent calling convention stuff to TargetCallingConv.td
...
llvm-svn: 34659
2007-02-27 05:57:32 +00:00
Chris Lattner
4c83b98604
fill in some holes
...
llvm-svn: 34658
2007-02-27 05:51:05 +00:00
Chris Lattner
c9eed39a5d
switch x86-64 return value lowering over to using same mechanism as argument
...
lowering uses.
llvm-svn: 34657
2007-02-27 05:28:59 +00:00
Chris Lattner
9f059194a7
Minor refactoring of CC Lowering interfaces
...
llvm-svn: 34656
2007-02-27 05:13:54 +00:00
Chris Lattner
dc3adc83e7
move CC Lowering stuff to its own public interface
...
llvm-svn: 34655
2007-02-27 04:43:02 +00:00
Chris Lattner
2e5e8407ad
refactor x86-64 argument lowering yet again, this time eliminating templates,
...
'clients', etc, and adding CCValAssign instead.
llvm-svn: 34654
2007-02-27 04:18:15 +00:00
Chris Lattner
33e93b84af
ConstantFolding.cpp/h -> ConstantFold.cpp/h to avoid confusion with
...
lib/Analysis/ConstantFolding.
llvm-svn: 34653
2007-02-27 03:05:06 +00:00
Evan Cheng
5d7ce57c13
Backing out Jim's LR spill changes. This was causing llvm-gcc bootstrapping
...
to infinite loop:
PPCMachineFunctionInfo.h updated: 1.2 -> 1.3
PPCRegisterInfo.cpp updated: 1.110 -> 1.111
PPCRegisterInfo.h updated: 1.28 -> 1.29
llvm-svn: 34652
2007-02-27 02:55:29 +00:00
Reid Spencer
8cd69de23e
XFAIL this on x86-Linux until its fixed.
...
llvm-svn: 34651
2007-02-27 02:45:12 +00:00
Reid Spencer
5c41e96631
Remove test cases that produce undefined results.
...
llvm-svn: 34650
2007-02-27 02:34:02 +00:00
Evan Cheng
ca25c0ee0d
forward() should not increment internal iterator. Its client may insert instruction between now and next forward() call.
...
llvm-svn: 34649
2007-02-27 01:58:48 +00:00
Reid Spencer
974551a7e9
Simplify and document RoundDoubleToAPInt.
...
llvm-svn: 34648
2007-02-27 01:28:10 +00:00
Reid Spencer
b31bffed96
For PR1205:
...
Implement the first step towards arbitrary precision integer support in
LLVM. The APInt class provides arbitrary precision arithmetic and value
representation. This patch changes ConstantInt to use APInt as its value
representation without supporting bit widths > 64 yet. That change will
come after ConstantFolding handles bit widths > 64 bits.
llvm-svn: 34647
2007-02-26 23:54:03 +00:00
Reid Spencer
7c16cd2746
1. Make sure all delete operators of arrays use the array form of delete.
...
2. Rewrite operator=(const APInt& RHS) to allow the RHS to be a different
bit width than the LHS. This makes it possible to use APInt as the key
of a DenseMap, as needed for the IntConstants map in Constants.cpp
3. Fix operator=(uint64_t) to clear unused bits in case the client assigns
a value that has more bits than the APInt allows.
4. Assert that bit widths are equal in operator==
5. Revise getHashValue() to put the bit width in the low order six bits.
This should help to make i1 0, i2 0, ... i64 0 all distinct in the
IntConstants DenseMap.
llvm-svn: 34646
2007-02-26 23:38:21 +00:00
Evan Cheng
bdec83e4d2
Joining an interval with a dead copy instruction. Shorten the live range to the last use.
...
llvm-svn: 34645
2007-02-26 21:37:37 +00:00
Reid Spencer
3d88599863
Fix indentation.
...
llvm-svn: 34643
2007-02-26 21:06:05 +00:00
Reid Spencer
b2bc985a4e
Implement the getHashValue method.
...
Fix toString use of getValue to use getZExtValue()
llvm-svn: 34642
2007-02-26 21:02:27 +00:00
Reid Spencer
eed186ee58
1. Split getValue() into getSExtValue() and getZExtValue() to match
...
ConstantInt better.
2. Add a getHashValue() method.
llvm-svn: 34641
2007-02-26 20:57:12 +00:00
Devang Patel
97517ff930
Use efficient container SmallPtrSet
...
llvm-svn: 34640
2007-02-26 20:22:50 +00:00
Chris Lattner
535bd6d3ba
always lower to RETFLAG, never leave it as just ret.
...
llvm-svn: 34639
2007-02-26 19:44:02 +00:00
Devang Patel
967b84c681
Do not unswitch loop on same value again and again.
...
llvm-svn: 34638
2007-02-26 19:31:58 +00:00
Chris Lattner
77f0a1553c
fix attribution
...
llvm-svn: 34637
2007-02-26 18:56:07 +00:00
Chris Lattner
5d00a0b8a9
Add a description of the X86-64 calling convention and the return
...
conventions. This doesn't do anything yet, but may in the future.
llvm-svn: 34636
2007-02-26 18:17:14 +00:00
Reid Spencer
62530f93b3
Implement inline methods that make transition of ConstantInt to use APInt
...
easier to comprehend and might be useful elsewhere.
llvm-svn: 34635
2007-02-26 17:50:32 +00:00
Reid Spencer
f09418d428
Re-enable this. The header was committed.
...
llvm-svn: 34634
2007-02-26 08:10:54 +00:00
Chris Lattner
ff19957468
switch to smallvector
...
llvm-svn: 34633
2007-02-26 07:59:53 +00:00
Chris Lattner
d9fc268035
another missing header :( :( :(
...
llvm-svn: 34632
2007-02-26 07:51:00 +00:00
Chris Lattner
294780829a
initial hack at splitting the x86-64 calling convention info out from the
...
mechanics that process it. I'm still not happy with this, but it's a step
in the right direction.
llvm-svn: 34631
2007-02-26 07:50:02 +00:00
Reid Spencer
862ee00550
Make isNegative() a const function since it doesn't modify the APInt.
...
llvm-svn: 34630
2007-02-26 07:45:40 +00:00
Reid Spencer
aa8dcfe441
1. Remove redundant calls to clearUsedBits().
...
2. Fix countTrailingZeros to use a faster algorithm.
3. Simplify sext() slightly by using isNegative().
4. Implement ashr using word-at-a-time logic instead of bit-at-a-time
5. Rename locals named isNegative so they don't clash with method name.
6. Fix fromString to compute negated value correctly.
llvm-svn: 34629
2007-02-26 07:44:38 +00:00
Chris Lattner
d41bff0f97
the truncate must always be done, it's only the assert that is conditional.
...
llvm-svn: 34628
2007-02-26 05:21:05 +00:00
Chris Lattner
dd89d9c648
reapply my previous patch with a bugfix.
...
llvm-svn: 34627
2007-02-26 05:02:39 +00:00
Chris Lattner
b5359f0994
revert my previous change, something strange is happening.
...
llvm-svn: 34626
2007-02-26 04:43:19 +00:00
Chris Lattner
74f5bcf8eb
add an accessor.
...
llvm-svn: 34625
2007-02-26 04:01:25 +00:00
Chris Lattner
68a8bcce99
emit an enum value for the # of target registers.
...
llvm-svn: 34624
2007-02-26 03:34:38 +00:00
Chris Lattner
1db979bae8
in X86-64 CCC, i8/i16 arguments are already properly zext/sext'd on input.
...
Capture this so that downstream zext/sext's are optimized out. This
compiles:
int test(short X) { return (int)X; }
to:
_test:
movl %edi, %eax
ret
instead of:
_test:
movswl %di, %eax
ret
GCC produces this bizarre code:
_test:
movw %di, -12(%rsp)
movswl -12(%rsp),%eax
ret
llvm-svn: 34623
2007-02-26 03:18:56 +00:00
Chris Lattner
900b4f62be
new testcase
...
llvm-svn: 34622
2007-02-26 03:16:20 +00:00
Chris Lattner
fce448f856
Fold (sext (truncate x)) more aggressively, by avoiding creation of a
...
sextinreg if not needed. This is useful in two cases: before legalize,
it avoids creating a sextinreg that will be trivially removed. After legalize
if the target doesn't support sextinreg, the trunc/sext would not have been
removed before.
llvm-svn: 34621
2007-02-26 03:13:59 +00:00
Chris Lattner
ab5d0ac02c
track signedness of formal argument, though we have a fixme here.
...
llvm-svn: 34620
2007-02-26 02:56:58 +00:00