Commit Graph

17707 Commits

Author SHA1 Message Date
Reid Spencer 70cb5d4287 Improve APInt interface:
1. Add unsigned and signed versions of methods so a "bool" argument doesn't
   need to be passed in.
2. Make the various getMin/getMax functions all be inline since they are
   so simple.
3. Simplify sdiv and srem code.

llvm-svn: 34680
2007-02-27 20:24:31 +00:00
Reid Spencer 997d9e4585 Conform to single person attribution in file comment.
llvm-svn: 34678
2007-02-27 19:31:09 +00:00
Reid Spencer ac419b52ad For PR1205:
Implement review feedback:
1. Use new APInt::RoundDoubleToAPInt interface to specify the bit width so
   that we don't have to truncate or extend in constant folding.
2. Fix a pasteo in SDiv that prevented a check for overflow.
3. Fix the shift operators: undef happens when the shift amount is equal
   to the bitwidth.

llvm-svn: 34677
2007-02-27 19:29:54 +00:00
Reid Spencer 54abdcf30b 1. Fix three serious bugs in the comparison code.
2. Change RoundDoubleToAPInt to take a bit width parameter. Use that
   parameter to limit the bit width of the result.

llvm-svn: 34673
2007-02-27 18:23:40 +00:00
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
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
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 b2bc985a4e Implement the getHashValue method.
Fix toString use of getValue to use getZExtValue()

llvm-svn: 34642
2007-02-26 21:02:27 +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 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 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 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 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
Reid Spencer 44eef169fa Rewrite lshr to not do bit by bit copy but to copy and shift whole words.
This makes it much more efficient.

llvm-svn: 34618
2007-02-26 01:19:48 +00:00
Reid Spencer fb55b7b99d Fix sext operation. Shifting by zero would leave an incorrect mask.
llvm-svn: 34617
2007-02-25 23:54:00 +00:00
Reid Spencer b6b5cc3e2f 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.

llvm-svn: 34616
2007-02-25 23:44:53 +00:00
Chris Lattner 8924332e22 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

llvm-svn: 34615
2007-02-25 23:10:46 +00:00
Chris Lattner 3e0703357f 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.

llvm-svn: 34613
2007-02-25 22:23:46 +00:00
Jim Laskey 14059d958a Fix for PR1224.
llvm-svn: 34610
2007-02-25 21:43:59 +00:00
Chris Lattner 76ac8f82bd 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.

llvm-svn: 34608
2007-02-25 21:06:13 +00:00
Chris Lattner b377a7ca11 disable some noisy debug output
llvm-svn: 34606
2007-02-25 20:42:59 +00:00
Chris Lattner 1ee61ab414 no really, this is the right patch
llvm-svn: 34605
2007-02-25 20:01:40 +00:00
Chris Lattner 4d2f5f8740 always promote float varargs to double.
llvm-svn: 34604
2007-02-25 19:59:18 +00:00
Reid Spencer a41e93be3d 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).

llvm-svn: 34603
2007-02-25 19:32:03 +00:00
Chris Lattner 84ab9a556c 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.

llvm-svn: 34601
2007-02-25 19:20:53 +00:00
Chris Lattner 8c504cf9a0 optimize duplicate ValueMap lookups
llvm-svn: 34599
2007-02-25 18:40:32 +00:00
Dale Johannesen c2f3d015e0 cosmetic changes from review of last patch. obvious
llvm-svn: 34598
2007-02-25 18:31:31 +00:00
Evan Cheng 38fd9b074f A couple of more places where a register liveness has been extended and its last kill should be updated accordingly.
llvm-svn: 34597
2007-02-25 09:51:27 +00:00
Evan Cheng fb2333a333 Add an assertion.
llvm-svn: 34596
2007-02-25 09:47:31 +00:00
Evan Cheng 0577b51538 Fix a couple of bugs related IsDead back propagation during coalescing.
llvm-svn: 34595
2007-02-25 09:46:31 +00:00
Evan Cheng e54eb80720 If the liveinterval of the source instruction has been extended, remove the IsKill marker.
llvm-svn: 34594
2007-02-25 09:41:59 +00:00
Evan Cheng 220a7af107 Only add liveinterval to livein set if it isn't assigned a stack slot.
llvm-svn: 34593
2007-02-25 09:39:02 +00:00
Chris Lattner fcee9b5568 fastcc functions that return double values now return them in xmm0 on x86-32.
This implements CodeGen/X86/fp-stack-ret.ll:test[23]

llvm-svn: 34592
2007-02-25 09:31:16 +00:00
Chris Lattner 9d9cc84f5b allow vectors to be passed to stdcall/fastcall functions
llvm-svn: 34590
2007-02-25 09:14:25 +00:00
Chris Lattner 2fc0d70392 move LowerRET into the 'Return Value Calling Convention Implementation'
section of the file.

llvm-svn: 34589
2007-02-25 09:12:39 +00:00
Chris Lattner ba474f58a4 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.

llvm-svn: 34588
2007-02-25 09:10:05 +00:00
Chris Lattner 7802f3e2ea pass the calling convention into Lower*CallTo, instead of using ad-hoc flags.
llvm-svn: 34587
2007-02-25 09:06:15 +00:00
Chris Lattner 0cd9960fe7 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.

llvm-svn: 34586
2007-02-25 08:59:22 +00:00
Chris Lattner 3c76309a5b move some code around, pass in calling conv, even though it is unused
llvm-svn: 34585
2007-02-25 08:29:00 +00:00
Chris Lattner 387f464121 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.

llvm-svn: 34584
2007-02-25 08:24:27 +00:00
Chris Lattner dfda38f7dc 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.

llvm-svn: 34582
2007-02-25 08:15:11 +00:00
Reid Spencer 28555779b4 Allow this to compile now that the header file is checked in.
llvm-svn: 34581
2007-02-25 07:30:14 +00:00
Chris Lattner d6b853ad1b make void-return not a special case
llvm-svn: 34579
2007-02-25 07:18:38 +00:00
Chris Lattner 35a08551a5 eliminate a bunch more temporary vectors from X86 lowering.
llvm-svn: 34578
2007-02-25 07:10:00 +00:00
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
Evan Cheng b68a774fd9 How the heck did I forget patterns for llvm.x86.sse2.cmp.sd?
llvm-svn: 34434
2007-02-20 00:39:09 +00:00
Reid Spencer b6d01caf22 Simplify some code by moving variable declarations into the only block that
uses them.

llvm-svn: 34432
2007-02-19 23:30:10 +00:00
Reid Spencer 421bad0dc5 Implement support for non-standard integer bit widths of any size. The
rules alignment is to pick the alignment that corresponds to the smallest
specified alignment that is larger than the bit width of the type or the
largest specified integer alignment if none are larger than the bitwidth
of the type. For the byte size, the size returned is the next larger
multiple of the alignment for that type (using the above rule). This patch
also changes bit widths from "short" to "uint32_t" to ensure there are
enough bits to specify any bit width that LLVM can handle (currently 2^23);
16-bits isn't enough.

llvm-svn: 34431
2007-02-19 22:35:00 +00:00
Evan Cheng f7ed82da10 Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.
llvm-svn: 34428
2007-02-19 21:49:54 +00:00
Chris Lattner b5d703018b llvm-gcc issue fixed, revert reversal :)
llvm-svn: 34425
2007-02-19 20:01:23 +00:00
Chris Lattner 86358635e5 remove warning
llvm-svn: 34424
2007-02-19 19:46:17 +00:00
Evan Cheng 0a02f82767 Temporarily reverting the patch. It's breaking llvm-gcc build.
llvm-svn: 34423
2007-02-19 19:23:41 +00:00
Reid Spencer 887ae70af5 Add a FIXME for unwritten code.
llvm-svn: 34422
2007-02-19 19:00:29 +00:00
Chris Lattner 4669b0bf54 remove dead methods
llvm-svn: 34419
2007-02-19 07:44:24 +00:00
Chris Lattner b5f6d0c15a eliminate use of deprecated apis
llvm-svn: 34417
2007-02-19 07:34:47 +00:00
Reid Spencer da81bf4d3e For PR1207:
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.

llvm-svn: 34399
2007-02-19 03:20:00 +00:00
Reid Spencer 861c1cb67a 1. Fix some indentation and variable names in the get{Min,Max}Value methods.
2. Implement toString for power-of-2 radix without using divide and always
   printing full words. This allows hex/binary to look at the bit
   respresentation of the APInt as well as avoid bugs in divide.

llvm-svn: 34396
2007-02-18 22:29:05 +00:00
Chris Lattner 9f4707eb04 fix comment
llvm-svn: 34395
2007-02-18 22:10:58 +00:00
Chris Lattner a6f54c0e2c simplify pass, delete dead gvar protos as well.
llvm-svn: 34394
2007-02-18 22:10:34 +00:00
Reid Spencer be4ddf6856 1. Use APINT_WORD_SIZE instead of sizeof(uint64_t)
2. Teach slt about signedness.
3. Teach roundToDouble to properly sign extend.

llvm-svn: 34391
2007-02-18 20:09:41 +00:00
Reid Spencer a856b6e985 1. Remove dead code (lshift function).
2. Consolidate memory allocation into just two inline functions.
3. Convert "unsigned" to uint32_t to gaurantee its size.
4. Eliminate magic constants and replace with symbolic equivalent.
5. Improve code documentation slightly.
6. Simplify the logical operator code because bitwidths must be the same.
7. Fix indentation per coding standards.
8. Use exit-early style to reduce indentation in several functions.

llvm-svn: 34389
2007-02-18 18:38:44 +00:00
Reid Spencer ee0a685ea1 Make add_1 exit early if carry is 0.
Fix line breaks and 80 cols violation.
Simplify operator^= since bitwidths must be the same.

llvm-svn: 34388
2007-02-18 06:39:42 +00:00
Reid Spencer fbd48a566a Implement signed output for toString.
Fix bugs in countLeadingZeros and countTrailingZeros.

llvm-svn: 34386
2007-02-18 00:44:22 +00:00
Chris Lattner 9df8be40fe temporarily revert Devang's most recent patch, which caused a large
compile-time regression in LLC.

llvm-svn: 34385
2007-02-17 23:14:24 +00:00
Reid Spencer 26c6616e4b Fix some bugs in division logic.
llvm-svn: 34384
2007-02-17 22:38:07 +00:00
Evan Cheng 2605082f0e - Changes how function livein's are handled, they now have a start index of 0.
- When coalescing a copy MI, if its destination is "dead", propagate the
  property to the source MI's destination if there are no intervening uses.
- Detect dead function live-in's and remove them.

llvm-svn: 34383
2007-02-17 11:15:40 +00:00
Evan Cheng a3d3599210 Do not add livein's to entry MBB twice.
llvm-svn: 34382
2007-02-17 11:11:27 +00:00
Evan Cheng 41d2a1d8bf Added removeLiveIn.
llvm-svn: 34381
2007-02-17 11:10:48 +00:00
Evan Cheng 6accd480a2 Added findRegisterDefOperand().
llvm-svn: 34380
2007-02-17 11:10:18 +00:00
Evan Cheng ef932b067d - Use MRegister::regsOverlap().
- Allow LiveVariables to track liveness of more registers.

llvm-svn: 34379
2007-02-17 11:09:47 +00:00
Evan Cheng 9865be6d40 Added getReservedRegs().
llvm-svn: 34376
2007-02-17 11:06:00 +00:00
Chris Lattner 1f7d60262e Fix ixaddrs as well, allowing ppc64 to compile to:
_test2:
        li r2, 0
        lis r3, 1
        std r2, 9024(r3)
        blr

instead of:

_test2:
        lis r2, 1
        li r3, 0
        ori r2, r2, 9024
        std r3, 0(r2)
        blr

This implements CodeGen/PowerPC/LargeAbsoluteAddr.ll:test2

llvm-svn: 34373
2007-02-17 06:57:26 +00:00
Chris Lattner 4a9c0bb147 Compile test/CodeGen/PowerPC/LargeAbsoluteAddr.ll to:
_test:
        lis r2, 743
        li r3, 0
        stw r3, 32751(r2)
        blr

instead of:

_test:
        li r2, 0
        stw r2, 32751(48693248)
        blr

Implement support for ppc64 as well, allowing it to produce better code.

llvm-svn: 34371
2007-02-17 06:44:03 +00:00
Chris Lattner 56e5fea163 print target nodes nicely
llvm-svn: 34369
2007-02-17 06:38:37 +00:00
Chris Lattner a9f917af59 Implement i/n/s constraints correctly. This fixes
test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll

llvm-svn: 34368
2007-02-17 06:00:35 +00:00
Devang Patel 98354dabc1 Use inverted map to speedup collectLastUses().
llvm-svn: 34364
2007-02-17 03:53:44 +00:00
Reid Spencer 100502d256 Move static functions closer to their usage.
llvm-svn: 34363
2007-02-17 03:16:00 +00:00
Reid Spencer 3986776fbd Clean up the divide and remainder logic a bit (exit early). Use more
meaningful variable names. Add comments to document the flow.

llvm-svn: 34362
2007-02-17 02:07:07 +00:00
Dale Johannesen 12920dda9e Fixes PR 1200
llvm-svn: 34359
2007-02-17 00:44:34 +00:00
Chris Lattner 04eb16b415 Do not dereference invalid ranges. Generalize targetdata alignment model.
This fixes the UnitTests/Vector/sumarray-dbl regressions.

llvm-svn: 34358
2007-02-17 00:41:42 +00:00
Reid Spencer a32372d110 Fix bugs introduced by constructor parameter order change.
llvm-svn: 34357
2007-02-17 00:18:01 +00:00
Chris Lattner dc64b9d379 Fix CodeGen/PowerPC/2007-02-16-AlignPacked.ll
llvm-svn: 34356
2007-02-16 23:11:51 +00:00
Reid Spencer e4ff249d26 Remove an unnecessary predicate.
Patch by Scott Michel.

llvm-svn: 34354
2007-02-16 22:42:40 +00:00
Reid Spencer 1d0721209d Review changes:
1. Function style changes.
2. 80-col violations.
3. Better names for things.
4. Arrange constructors so they all take bit width first.
5. Add named signed and unsigned comparison functions and remove the
   corresponding operators.
6. Remove operator&& and operator|| but provide a getBoolValue function which
   converts to bool as comparison against 0. This allows the normal && and
   || operators to be used as if (X.getBoolValue() && Y.getBoolValue())

Note: this still doesn't function 100% yet. I'm working on the bugs now.
llvm-svn: 34353
2007-02-16 22:36:51 +00:00
Chris Lattner f9122c4512 simplify some code, ensure that packed structures get abi alignment of 1.
llvm-svn: 34352
2007-02-16 22:25:34 +00:00
Chris Lattner 8091f28d1a fix incorrect encoding of vminsw.
llvm-svn: 34351
2007-02-16 21:20:09 +00:00
Anton Korobeynikov d01defedf6 Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688

llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Evan Cheng 66cb162f92 Print <dead> def operands.
llvm-svn: 34343
2007-02-16 09:49:18 +00:00
Evan Cheng 7238410766 Add live-ins to every BB.
llvm-svn: 34342
2007-02-16 09:05:02 +00:00
Andrew Lenharth 9d4819be08 fix build
llvm-svn: 34339
2007-02-16 02:25:55 +00:00
Andrew Lenharth b8d6fa20bb This was done recently
llvm-svn: 34338
2007-02-16 02:11:59 +00:00
Dale Johannesen 915e15481e test commit (blank line)
llvm-svn: 34337
2007-02-16 01:54:53 +00:00
Chris Lattner c992e18f8d make mayWriteToMemory a non-virtual function
llvm-svn: 34334
2007-02-15 23:15:00 +00:00
Chris Lattner 99c6cf60f1 convert more vectors to smallvectors, 2.8% speedup
llvm-svn: 34333
2007-02-15 22:52:10 +00:00
Chris Lattner af6094fe3f change some vectors to smallvectors. This speeds up instcombine on 447.dealII
by 5%.

llvm-svn: 34332
2007-02-15 22:48:32 +00:00
Reid Spencer 03d4a8a368 For PR1195:
PACKED_ALIGN -> VECTOR_ALIGN

llvm-svn: 34330
2007-02-15 22:07:05 +00:00
Chris Lattner cf835ff85a rewrite Value::takeName to take advantage of the new symtab stuff. This
causes it to require no allocations and no symtab lookups in the common
case.  This speeds up instcombine 9.2% on 447.dealII.

llvm-svn: 34324
2007-02-15 20:01:43 +00:00
Chris Lattner 7907e5fe07 switch an std::set to a SmallPtr set, this speeds up instcombine by 9.5%
on 447.dealII

llvm-svn: 34323
2007-02-15 19:41:52 +00:00
Chris Lattner 1e92e06779 Implement Function::getIntrinsicID without it needing to call Value::getName,
which allocates a string.  This speeds up instcombine on 447.dealII by 5%.

llvm-svn: 34318
2007-02-15 19:17:16 +00:00
Chris Lattner fd27ed9733 Add a new Value::getNameStr method, which is preferred over getName.
llvm-svn: 34310
2007-02-15 18:53:54 +00:00
Reid Spencer 40aa2fdac6 For PR1202:
Make sure we found an existing Alignment before overwriting it.

llvm-svn: 34308
2007-02-15 18:34:36 +00:00
Chris Lattner 68dcec6fea fix indentation
llvm-svn: 34307
2007-02-15 18:19:15 +00:00
Chris Lattner 21ebae3394 Apply B Scott Michel's patch for PR1184, which improves diagnostics in an
abort case.

llvm-svn: 34306
2007-02-15 18:17:56 +00:00
Zhou Sheng cfa2ac0592 Fix some buges:
1. Make getMinValue() returns the right value.
2. Fix the ByteSwap() crash problem.
3. Make Postfix increment work correctly.
4. Fix some bugs in LogBase2, Hi/LoBits and UDiv.

llvm-svn: 34304
2007-02-15 06:36:31 +00:00
Evan Cheng 14edd1989b Use BitVector instead of vector<bool> which can be extremely slow.
llvm-svn: 34302
2007-02-15 05:59:24 +00:00
Reid Spencer 09575bac2e For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.

llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Reid Spencer d4a0b7bb7b For PR1195:
Change a comment: Packed Type -> Vector Type

llvm-svn: 34299
2007-02-15 03:11:50 +00:00
Reid Spencer 537ee02f89 Change an assert that mentions Packed Type -> Vector Type.
llvm-svn: 34298
2007-02-15 03:11:20 +00:00
Reid Spencer d84d35ba70 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Reid Spencer dad84a7c02 Fixed packed structure breakage from earlier TargetData patch; applied
Chris Lattner's code style suggestions.

Patch by Scott Michel!

llvm-svn: 34292
2007-02-15 02:11:06 +00:00
Chris Lattner ab1812f806 fix a warning
llvm-svn: 34272
2007-02-14 07:34:56 +00:00
Chris Lattner 1cf84d2745 Refix CodeGen/Generic/switch-lower.ll. In contrast to my previous patch,
this doesn't miscompile lots of programs :)

llvm-svn: 34268
2007-02-14 07:18:16 +00:00
Chris Lattner 4da5e17cfc From Dan Gohman:
While preparing http://llvm.org/PR1198 I noticed several asserts
protecting unprepared code from i128 types that weren't actually failing
when they should because they were written as assert("foo") instead of
something like assert(0 && "foo"). This patch fixes all the cases that a
quick grep found.

llvm-svn: 34267
2007-02-14 06:20:04 +00:00
Chris Lattner 945e437c65 Generalize TargetData strings, to support more interesting forms of data.
Patch by Scott Michel.

llvm-svn: 34266
2007-02-14 05:52:17 +00:00
Reid Spencer 0c5db23119 Use brute-force algorithm for to_string. It doesn't have to be efficient
at this point, it just needs to work so we can test things reliably.

llvm-svn: 34262
2007-02-14 02:52:25 +00:00
Chris Lattner 084c4ca591 better support for i128.
llvm-svn: 34258
2007-02-13 23:57:55 +00:00
Chris Lattner 59b27fa371 implement expand of truncate. This allows truncates from i128 to i64 to
be supported on 32-bit hosts.

llvm-svn: 34257
2007-02-13 23:55:16 +00:00
Chris Lattner d08d31f68a Fix PR1198, by adding initial i128 support. Patch by Dan Gohman.
llvm-svn: 34256
2007-02-13 23:41:38 +00:00
Andrew Lenharth 6719d3d0a2 Well this isn't as ugly and it works better. At least gcc bootstraps again
llvm-svn: 34254
2007-02-13 23:41:16 +00:00