oota-llvm.git
17 years agoemit an enum value for the # of target registers.
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

17 years agoin X86-64 CCC, i8/i16 arguments are already properly zext/sext'd on input.
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

17 years agonew testcase
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

17 years agoFold (sext (truncate x)) more aggressively, by avoiding creation of a
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

17 years agotrack signedness of formal argument, though we have a fixme here.
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

17 years agoAdd an isNegative method to determine if the APInt's value is negative.
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

17 years agoRewrite lshr to not do bit by bit copy but to copy and shift whole words.
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

17 years agoFix sext operation. Shifting by zero would leave an incorrect mask.
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

17 years ago1. Fix the flip() method to correctly flip all words of the APInt.
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

17 years agoFix an X86-64 abi bug. We now compile:
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

17 years agonew testcase
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

17 years agofix CodeGen/X86/2007-02-25-FastCCStack.ll, a regression from my patch last
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

17 years agonew testcase
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

17 years agonew testcase
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

17 years agoFix for PR1224.
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

17 years agoTest for PR1224.
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

17 years agoRework GlobalValue::removeDeadConstantUsers to always remove dead constant
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

17 years agonew testcase. @foo should be marked fastcc by globalopt
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

17 years agodisable some noisy debug output
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

17 years agono really, this is the right patch
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

17 years agoalways promote float varargs to double.
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

17 years ago1. Provide more detail in file comment.
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

17 years agoFix clearUnusedBits to not depend on "undefined behavior" of >> operator
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

17 years agoone important bugfix: PPC32 didn't have both elf and macho support for
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

17 years agoadd -enable-eh
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

17 years agooptimize duplicate ValueMap lookups
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

17 years agocosmetic changes from review of last patch. obvious
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

17 years agoA couple of more places where a register liveness has been extended and its last...
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

17 years agoAdd an assertion.
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

17 years agoFix a couple of bugs related IsDead back propagation during coalescing.
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

17 years agoIf the liveinterval of the source instruction has been extended, remove the IsKill...
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

17 years agoOnly add liveinterval to livein set if it isn't assigned a stack slot.
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

17 years agofastcc functions that return double values now return them in xmm0 on x86-32.
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

17 years agoverify that double is returned in XMM0 if the function is fastcc.
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

17 years agoallow vectors to be passed to stdcall/fastcall functions
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

17 years agomove LowerRET into the 'Return Value Calling Convention Implementation'
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

17 years agomake all Lower*CallTo implementations use LowerCallResult to handle their
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

17 years agopass the calling convention into Lower*CallTo, instead of using ad-hoc flags.
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

17 years agofactor a bunch of code out of LowerCCCCallTo into a new LowerCallResult
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

17 years agomove some code around, pass in calling conv, even though it is unused
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

17 years agofold trivial token factor nodes. This allows us to compile
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

17 years agonew testcase
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

17 years agosimplify result value lowering by splitting the selection of *where* to return
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

17 years agoAllow this to compile now that the header file is checked in.
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

17 years agoAdd a private constructor for efficiency.
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

17 years agomake void-return not a special case
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

17 years agoeliminate a bunch more temporary vectors from X86 lowering.
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

17 years agoeliminate temporary vectors created during X86 lowering.
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

17 years agoremove std::vector's in RET lowering.
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

17 years agoverify i128 return on x86-64 continues to codegen optimally.
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

17 years agoimplement support for the linux/ppc function call ABI. Patch by
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

17 years agoAdd XLForm_1_ext template, patch by Nicolas Geoffray.
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

17 years agoImprove JIT support for linux/ppc: Patch by Nicolas Geoffray!
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

17 years agothis doesn't compile, disable it
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

17 years agoremove these.
Chris Lattner [Sun, 25 Feb 2007 02:28:21 +0000 (02:28 +0000)]
remove these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34570 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoClean up lshr and ashr to coding standards.
Reid Spencer [Sun, 25 Feb 2007 01:56:07 +0000 (01:56 +0000)]
Clean up lshr and ashr to coding standards.
Handle the single word cases for shiftAmt == BitWidth.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34569 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove crediting of Evan Cheng and me.
Dale Johannesen [Sun, 25 Feb 2007 01:42:36 +0000 (01:42 +0000)]
remove crediting of Evan Cheng and me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34568 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoinitialize a instance variable
Chris Lattner [Sun, 25 Feb 2007 01:28:05 +0000 (01:28 +0000)]
initialize a instance variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34567 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoupdate this for llvm-gcc4
Chris Lattner [Sun, 25 Feb 2007 01:11:36 +0000 (01:11 +0000)]
update this for llvm-gcc4

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34566 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoWhoops, last word with bits in large shift left wasn't correct.
Reid Spencer [Sun, 25 Feb 2007 01:08:58 +0000 (01:08 +0000)]
Whoops, last word with bits in large shift left wasn't correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34565 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix the > 64 bits case for left shift.
Reid Spencer [Sun, 25 Feb 2007 00:56:44 +0000 (00:56 +0000)]
Fix the > 64 bits case for left shift.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34564 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemoved WaterListOffset, inserted BBOffsets. Remove TODO item about this
Dale Johannesen [Sun, 25 Feb 2007 00:47:03 +0000 (00:47 +0000)]
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.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34563 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix the remainder shifting in KnuthDiv.
Reid Spencer [Sat, 24 Feb 2007 20:38:01 +0000 (20:38 +0000)]
Fix the remainder shifting in KnuthDiv.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34562 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago1. Fix a bug in fromString for the <= 64bits case
Reid Spencer [Sat, 24 Feb 2007 20:19:37 +0000 (20:19 +0000)]
1. Fix a bug in fromString for the <= 64bits case
2. Fix shl when shiftAmount == BitWidth.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34560 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago1. Fix last bug in KnuthDiv. All divide tests pass up to 1024 bits now.
Reid Spencer [Sat, 24 Feb 2007 10:01:42 +0000 (10:01 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34559 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImprove documentation.
Reid Spencer [Sat, 24 Feb 2007 09:50:13 +0000 (09:50 +0000)]
Improve documentation.
Make divide function internal (it was briefly external for testing).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34557 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDeal with cases when MMI is not requested.
Jim Laskey [Sat, 24 Feb 2007 09:45:44 +0000 (09:45 +0000)]
Deal with cases when MMI is not requested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34556 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDrop unused operand.
Jim Laskey [Sat, 24 Feb 2007 09:44:17 +0000 (09:44 +0000)]
Drop unused operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34555 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago1. Make internal functions take const arguments where they should, just
Reid Spencer [Sat, 24 Feb 2007 03:58:46 +0000 (03:58 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34554 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded some more information on how to use "delta" to reduce testcases.
Bill Wendling [Sat, 24 Feb 2007 03:46:42 +0000 (03:46 +0000)]
Added some more information on how to use "delta" to reduce testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34553 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix PR1216 by cleaning up the ownership of JITResolver.
Chris Lattner [Sat, 24 Feb 2007 02:57:03 +0000 (02:57 +0000)]
Fix PR1216 by cleaning up the ownership of JITResolver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34552 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll and PR1219
Chris Lattner [Sat, 24 Feb 2007 02:09:29 +0000 (02:09 +0000)]
Fix CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll and PR1219

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34551 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotestcase for PR1219
Chris Lattner [Sat, 24 Feb 2007 02:08:00 +0000 (02:08 +0000)]
testcase for PR1219

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34550 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove folding set debug output
Chris Lattner [Sat, 24 Feb 2007 01:41:48 +0000 (01:41 +0000)]
remove folding set debug output

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34549 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix Transforms/ConstProp/2007-02-23-sdiv.ll and PR1215
Chris Lattner [Sat, 24 Feb 2007 01:19:50 +0000 (01:19 +0000)]
Fix Transforms/ConstProp/2007-02-23-sdiv.ll and PR1215

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34548 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotestcase for pr1215
Chris Lattner [Sat, 24 Feb 2007 01:16:39 +0000 (01:16 +0000)]
testcase for pr1215

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34547 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix InstCombine/2007-02-23-PhiFoldInfLoop.ll and PR1217
Chris Lattner [Sat, 24 Feb 2007 01:03:45 +0000 (01:03 +0000)]
Fix InstCombine/2007-02-23-PhiFoldInfLoop.ll and PR1217

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34546 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotestcase for pr1217
Chris Lattner [Sat, 24 Feb 2007 01:03:11 +0000 (01:03 +0000)]
testcase for pr1217

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34545 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRefactor the setName stuff, moving it down the inheritance hierarchy, to
Chris Lattner [Sat, 24 Feb 2007 00:55:48 +0000 (00:55 +0000)]
Refactor the setName stuff, moving it down the inheritance hierarchy, to
solve a crash in -instcombine -debug that was hit while investigating PR1217

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34544 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake the testcase correct.
Bill Wendling [Fri, 23 Feb 2007 23:23:41 +0000 (23:23 +0000)]
Make the testcase correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34543 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTestcase for PR1164
Bill Wendling [Fri, 23 Feb 2007 23:19:32 +0000 (23:19 +0000)]
Testcase for PR1164

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34542 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPR1164:
Bill Wendling [Fri, 23 Feb 2007 22:45:08 +0000 (22:45 +0000)]
PR1164:
Generate local names with a "llvm_cbe_" prefix using the actual name of the
variable instead of a temporary name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34540 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAvoid TBAA issue.
Chris Lattner [Fri, 23 Feb 2007 22:31:24 +0000 (22:31 +0000)]
Avoid TBAA issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34539 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNew test - practically wrote itself.
Jim Laskey [Fri, 23 Feb 2007 22:12:08 +0000 (22:12 +0000)]
New test - practically wrote itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34538 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agobugfix: SP wasn't updated for varargs when frame pointer was eliminated.
Lauro Ramos Venancio [Fri, 23 Feb 2007 21:53:48 +0000 (21:53 +0000)]
bugfix: SP wasn't updated for varargs when frame pointer was eliminated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34537 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReuse extends the liveness of a register. Transfer the kill to the operand that reuse it.
Evan Cheng [Fri, 23 Feb 2007 21:47:50 +0000 (21:47 +0000)]
Reuse extends the liveness of a register. Transfer the kill to the operand that reuse it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34536 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoHandle improper cast.
Jim Laskey [Fri, 23 Feb 2007 21:45:01 +0000 (21:45 +0000)]
Handle improper cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34535 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoHandle cases when joining live intervals of two virtual registers.
Evan Cheng [Fri, 23 Feb 2007 20:40:13 +0000 (20:40 +0000)]
Handle cases when joining live intervals of two virtual registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34534 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDon't spill LR as a callee saved register.
Jim Laskey [Fri, 23 Feb 2007 20:34:16 +0000 (20:34 +0000)]
Don't spill LR as a callee saved register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34533 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix stack alignment in functions with varargs.
Lauro Ramos Venancio [Fri, 23 Feb 2007 20:32:57 +0000 (20:32 +0000)]
Fix stack alignment in functions with varargs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34532 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix an obscure and tricky bug the inliner can hit sometimes.
Chris Lattner [Fri, 23 Feb 2007 19:54:30 +0000 (19:54 +0000)]
fix an obscure and tricky bug the inliner can hit sometimes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34531 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix this testcase
Chris Lattner [Fri, 23 Feb 2007 19:39:24 +0000 (19:39 +0000)]
fix this testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34530 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agocrtend is only for llvm-gcc3, remove it.
Chris Lattner [Fri, 23 Feb 2007 19:34:09 +0000 (19:34 +0000)]
crtend is only for llvm-gcc3, remove it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34529 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix thinko.
Devang Patel [Fri, 23 Feb 2007 18:05:55 +0000 (18:05 +0000)]
Fix thinko.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34528 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoLoop passes are set up to accept pointer.
Devang Patel [Fri, 23 Feb 2007 17:53:17 +0000 (17:53 +0000)]
Loop passes are set up to accept pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34527 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMark livein registers as being in used.
Evan Cheng [Fri, 23 Feb 2007 08:41:19 +0000 (08:41 +0000)]
Mark livein registers as being in used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34525 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoclarify.
Chris Lattner [Fri, 23 Feb 2007 06:53:06 +0000 (06:53 +0000)]
clarify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34524 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agorewrite of constant islands
Dale Johannesen [Fri, 23 Feb 2007 05:02:36 +0000 (05:02 +0000)]
rewrite of constant islands

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34523 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago-march=arm -enable-thumb => -march=thumb
Evan Cheng [Fri, 23 Feb 2007 03:15:39 +0000 (03:15 +0000)]
-march=arm -enable-thumb => -march=thumb

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34522 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded -march=thumb; removed -enable-thumb.
Evan Cheng [Fri, 23 Feb 2007 03:14:31 +0000 (03:14 +0000)]
Added -march=thumb; removed -enable-thumb.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34521 91177308-0d34-0410-b5e6-96231b3b80d8