Reid Spencer [Tue, 27 Feb 2007 18:22:31 +0000 (18:22 +0000)]
Allow the RoundDoubleToAPInt function to specify a width to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34672
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 27 Feb 2007 17:21:09 +0000 (17:21 +0000)]
a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34670
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 27 Feb 2007 15:00:39 +0000 (15:00 +0000)]
Make getPassManagerType() const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34669
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Tue, 27 Feb 2007 13:10:41 +0000 (13:10 +0000)]
Fix parenthesis for BCTRL_{ELF|Macho} test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34668
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Tue, 27 Feb 2007 13:01:19 +0000 (13:01 +0000)]
Differentiate between the MachO and the ELF ABI the CALL instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34667
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Tue, 27 Feb 2007 11:55:45 +0000 (11:55 +0000)]
Duplicate use of LR, take 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34666
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Tue, 27 Feb 2007 10:44:42 +0000 (10:44 +0000)]
Added myself
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34665
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 27 Feb 2007 08:34:09 +0000 (08:34 +0000)]
Allow the AsmWriter to print out arbitrary precision integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34664
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 27 Feb 2007 07:57:53 +0000 (07:57 +0000)]
Correct the implelmentation of ConstantInt::getAllOnesValue() for bit
widths > 64 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34663
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 27 Feb 2007 07:35:18 +0000 (07:35 +0000)]
Get rid of extraneous // in file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34662
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 27 Feb 2007 06:59:52 +0000 (06:59 +0000)]
Add calling convention info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34661
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 27 Feb 2007 06:23:51 +0000 (06:23 +0000)]
For PR1205:
Implement constant folding via APInt instead of uint64_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34660
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 27 Feb 2007 05:57:32 +0000 (05:57 +0000)]
move target independent calling convention stuff to TargetCallingConv.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34659
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 27 Feb 2007 05:51:05 +0000 (05:51 +0000)]
fill in some holes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34658
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 27 Feb 2007 05:28:59 +0000 (05:28 +0000)]
switch x86-64 return value lowering over to using same mechanism as argument
lowering uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34657
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 27 Feb 2007 05:13:54 +0000 (05:13 +0000)]
Minor refactoring of CC Lowering interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34656
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 27 Feb 2007 04:43:02 +0000 (04:43 +0000)]
move CC Lowering stuff to its own public interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34655
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 27 Feb 2007 04:18:15 +0000 (04:18 +0000)]
refactor x86-64 argument lowering yet again, this time eliminating templates,
'clients', etc, and adding CCValAssign instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34654
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 27 Feb 2007 03:05:06 +0000 (03:05 +0000)]
ConstantFolding.cpp/h -> ConstantFold.cpp/h to avoid confusion with
lib/Analysis/ConstantFolding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34653
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 27 Feb 2007 02:55:29 +0000 (02:55 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34652
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 27 Feb 2007 02:45:12 +0000 (02:45 +0000)]
XFAIL this on x86-Linux until its fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34651
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 27 Feb 2007 02:34:02 +0000 (02:34 +0000)]
Remove test cases that produce undefined results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34650
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 27 Feb 2007 01:58:48 +0000 (01:58 +0000)]
forward() should not increment internal iterator. Its client may insert instruction between now and next forward() call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34649
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 27 Feb 2007 01:28:10 +0000 (01:28 +0000)]
Simplify and document RoundDoubleToAPInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34648
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 23:54:03 +0000 (23:54 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34647
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 23:38:21 +0000 (23:38 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34646
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 26 Feb 2007 21:37:37 +0000 (21:37 +0000)]
Joining an interval with a dead copy instruction. Shorten the live range to the last use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34645
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 21:06:05 +0000 (21:06 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34643
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 21:02:27 +0000 (21:02 +0000)]
Implement the getHashValue method.
Fix toString use of getValue to use getZExtValue()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34642
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 20:57:12 +0000 (20:57 +0000)]
1. Split getValue() into getSExtValue() and getZExtValue() to match
ConstantInt better.
2. Add a getHashValue() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34641
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 26 Feb 2007 20:22:50 +0000 (20:22 +0000)]
Use efficient container SmallPtrSet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34640
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 19:44:02 +0000 (19:44 +0000)]
always lower to RETFLAG, never leave it as just ret.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34639
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 26 Feb 2007 19:31:58 +0000 (19:31 +0000)]
Do not unswitch loop on same value again and again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34638
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 18:56:07 +0000 (18:56 +0000)]
fix attribution
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34637
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 18:17:14 +0000 (18:17 +0000)]
Add a description of the X86-64 calling convention and the return
conventions. This doesn't do anything yet, but may in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34636
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 17:50:32 +0000 (17:50 +0000)]
Implement inline methods that make transition of ConstantInt to use APInt
easier to comprehend and might be useful elsewhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34635
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 08:10:54 +0000 (08:10 +0000)]
Re-enable this. The header was committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34634
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 07:59:53 +0000 (07:59 +0000)]
switch to smallvector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34633
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 07:51:00 +0000 (07:51 +0000)]
another missing header :( :( :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34632
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 07:50:02 +0000 (07:50 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34631
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 07:45:40 +0000 (07:45 +0000)]
Make isNegative() a const function since it doesn't modify the APInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34630
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 07:44:38 +0000 (07:44 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34629
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 05:21:05 +0000 (05:21 +0000)]
the truncate must always be done, it's only the assert that is conditional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34628
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 05:02:39 +0000 (05:02 +0000)]
reapply my previous patch with a bugfix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34627
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 04:43:19 +0000 (04:43 +0000)]
revert my previous change, something strange is happening.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34626
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 04:01:25 +0000 (04:01 +0000)]
add an accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34625
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 03:34:38 +0000 (03:34 +0000)]
emit an enum value for the # of target registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34624
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 03:18:56 +0000 (03:18 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34623
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 03:16:20 +0000 (03:16 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34622
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 03:13:59 +0000 (03:13 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34621
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 26 Feb 2007 02:56:58 +0000 (02:56 +0000)]
track signedness of formal argument, though we have a fixme here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34620
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 01:20:59 +0000 (01:20 +0000)]
Add an isNegative method to determine if the APInt's value is negative.
This is much less expensive than a test against zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34619
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 26 Feb 2007 01:19:48 +0000 (01:19 +0000)]
Rewrite lshr to not do bit by bit copy but to copy and shift whole words.
This makes it much more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34618
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 25 Feb 2007 23:54:00 +0000 (23:54 +0000)]
Fix sext operation. Shifting by zero would leave an incorrect mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34617
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 25 Feb 2007 23:44:53 +0000 (23:44 +0000)]
1. Fix the flip() method to correctly flip all words of the APInt.
2. Implement the trunc, sext, and zext operations.
3. Improve fromString to accept negative values as input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34616
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 23:10:46 +0000 (23:10 +0000)]
Fix an X86-64 abi bug. We now compile:
void foo(short);
void bar(unsigned short A) {
foo(A);
}
into:
_bar:
subq $8, %rsp
movswl %di, %edi
call _foo
addq $8, %rsp
ret
instead of:
_bar:
subq $8, %rsp
call _foo
addq $8, %rsp
ret
Testcase here: test/CodeGen/X86/x86-64-shortint.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34615
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 23:08:29 +0000 (23:08 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34614
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 22:23:46 +0000 (22:23 +0000)]
fix CodeGen/X86/2007-02-25-FastCCStack.ll, a regression from my patch last
night: fastcc returns should only go in XMM0 if we have SSE2 or above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34613
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 22:23:15 +0000 (22:23 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34612
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 22:02:01 +0000 (22:02 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34611
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Sun, 25 Feb 2007 21:43:59 +0000 (21:43 +0000)]
Fix for PR1224.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34610
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Sun, 25 Feb 2007 21:43:21 +0000 (21:43 +0000)]
Test for PR1224.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34609
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 21:06:13 +0000 (21:06 +0000)]
Rework GlobalValue::removeDeadConstantUsers to always remove dead constant
exprs hanging off a global, even if the global is not otherwise dead. This
requires some tricky iterator gymnastics.
This implements Transforms/GlobalOpt/constantexpr-dangle.ll by deleting a
constantexpr that made it appear that the address of the function was taken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34608
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 21:04:39 +0000 (21:04 +0000)]
new testcase. @foo should be marked fastcc by globalopt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34607
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 20:42:59 +0000 (20:42 +0000)]
disable some noisy debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34606
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 20:01:40 +0000 (20:01 +0000)]
no really, this is the right patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34605
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 19:59:18 +0000 (19:59 +0000)]
always promote float varargs to double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34604
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 25 Feb 2007 19:32:03 +0000 (19:32 +0000)]
1. Provide more detail in file comment.
2. Move comments for methods to .h file, delete them in .cpp file.
3. All places that were doing manual clear of high order bits now call the
clearUnusedBits() method in order to not depend on undefined behavior
of the >> operator when the number of bits shifted equals the word size.
4. Reduced # of loc by using the new result of clearUnusedBits() method.
5. Simplified logic (decreased indentation) in a few places.
6. Added code comments to larger functions that needed them.
7. Added FIXME notes about weak implementations of things (e.g. bit-by-bit
shift right is sub-optimal).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34603
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 25 Feb 2007 19:26:01 +0000 (19:26 +0000)]
Fix clearUnusedBits to not depend on "undefined behavior" of >> operator
when the bit size is equal to the word size. This happens to work out okay
on x86, but might not on other platforms. The change just detects when
there are no bits to clear (because BitWidth is a multiple of the word size)
and returns early.
Also, move some comments from .cpp file into header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34602
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 19:20:53 +0000 (19:20 +0000)]
one important bugfix: PPC32 didn't have both elf and macho support for
external symbols and global addresses. Add the missing ones.
one important workaround: PPCISD::CALL is matched by both PPCcall_ELF
and PPCcall_Macho, disable the _ELF patterns for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34601
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 18:50:48 +0000 (18:50 +0000)]
add -enable-eh
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34600
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 18:40:32 +0000 (18:40 +0000)]
optimize duplicate ValueMap lookups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34599
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sun, 25 Feb 2007 18:31:31 +0000 (18:31 +0000)]
cosmetic changes from review of last patch. obvious
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34598
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 25 Feb 2007 09:51:27 +0000 (09:51 +0000)]
A couple of more places where a register liveness has been extended and its last kill should be updated accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34597
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 25 Feb 2007 09:47:31 +0000 (09:47 +0000)]
Add an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34596
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 25 Feb 2007 09:46:31 +0000 (09:46 +0000)]
Fix a couple of bugs related IsDead back propagation during coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34595
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 25 Feb 2007 09:41:59 +0000 (09:41 +0000)]
If the liveinterval of the source instruction has been extended, remove the IsKill marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34594
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 25 Feb 2007 09:39:02 +0000 (09:39 +0000)]
Only add liveinterval to livein set if it isn't assigned a stack slot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34593
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 09:31:16 +0000 (09:31 +0000)]
fastcc functions that return double values now return them in xmm0 on x86-32.
This implements CodeGen/X86/fp-stack-ret.ll:test[23]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34592
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 09:30:03 +0000 (09:30 +0000)]
verify that double is returned in XMM0 if the function is fastcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34591
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 09:14:25 +0000 (09:14 +0000)]
allow vectors to be passed to stdcall/fastcall functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34590
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 09:12:39 +0000 (09:12 +0000)]
move LowerRET into the 'Return Value Calling Convention Implementation'
section of the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34589
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 09:10:05 +0000 (09:10 +0000)]
make all Lower*CallTo implementations use LowerCallResult to handle their
result value stuff. This eliminates a bunch of duplicated code and now
GetRetValueLocs is the sole place that decides where a value is returned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34588
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 09:06:15 +0000 (09:06 +0000)]
pass the calling convention into Lower*CallTo, instead of using ad-hoc flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34587
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 08:59:22 +0000 (08:59 +0000)]
factor a bunch of code out of LowerCCCCallTo into a new LowerCallResult
function. This function now uses GetRetValueLocs to determine *where*
the result values are located and concerns itself with *how* to pull the
values out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34586
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 08:29:00 +0000 (08:29 +0000)]
move some code around, pass in calling conv, even though it is unused
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34585
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 08:24:27 +0000 (08:24 +0000)]
fold trivial token factor nodes. This allows us to compile
test/CodeGen/X86/fp-stack-ret.ll into:
movl 4(%esp), %eax
fldl (%eax)
ret
instead of:
subl $12, %esp
movl 16(%esp), %eax
movsd (%eax), %xmm0
movsd %xmm0, (%esp)
fldl (%esp)
addl $12, %esp
ret
by eliminating a token factor that blocked a check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34584
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 08:23:01 +0000 (08:23 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34583
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 08:15:11 +0000 (08:15 +0000)]
simplify result value lowering by splitting the selection of *where* to return
registers out from the logic of *how* to return them.
This changes X86-64 to mark EAX live out when returning a 32-bit value,
where before it marked RAX liveout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34582
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 25 Feb 2007 07:30:14 +0000 (07:30 +0000)]
Allow this to compile now that the header file is checked in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34581
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 25 Feb 2007 07:29:03 +0000 (07:29 +0000)]
Add a private constructor for efficiency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34580
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 07:18:38 +0000 (07:18 +0000)]
make void-return not a special case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34579
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 07:10:00 +0000 (07:10 +0000)]
eliminate a bunch more temporary vectors from X86 lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34578
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 06:40:16 +0000 (06:40 +0000)]
eliminate temporary vectors created during X86 lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34577
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 06:21:57 +0000 (06:21 +0000)]
remove std::vector's in RET lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34576
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 06:06:49 +0000 (06:06 +0000)]
verify i128 return on x86-64 continues to codegen optimally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34575
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 05:34:32 +0000 (05:34 +0000)]
implement support for the linux/ppc function call ABI. Patch by
Nicolas Geoffray!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34574
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 05:07:49 +0000 (05:07 +0000)]
Add XLForm_1_ext template, patch by Nicolas Geoffray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34573
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 05:04:13 +0000 (05:04 +0000)]
Improve JIT support for linux/ppc: Patch by Nicolas Geoffray!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34572
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Feb 2007 02:32:44 +0000 (02:32 +0000)]
this doesn't compile, disable it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34571
91177308-0d34-0410-b5e6-
96231b3b80d8