aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* RegScavenger interface change to make it more flexible.Evan Cheng2007-02-271-16/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34690 91177308-0d34-0410-b5e6-96231b3b80d8
* implement CCMatchIfCC in terms of CCMatchIfChris Lattner2007-02-271-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34685 91177308-0d34-0410-b5e6-96231b3b80d8
* build cc infoChris Lattner2007-02-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34684 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to changes in the APInt interface.Reid Spencer2007-02-272-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34681 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve APInt interface:Reid Spencer2007-02-271-34/+1
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34680 91177308-0d34-0410-b5e6-96231b3b80d8
* Conform to single person attribution in file comment.Reid Spencer2007-02-271-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34678 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1205:Reid Spencer2007-02-271-14/+5
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34677 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Fix three serious bugs in the comparison code.Reid Spencer2007-02-271-18/+22
| | | | | | | | 2. Change RoundDoubleToAPInt to take a bit width parameter. Use that parameter to limit the bit width of the result. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34673 91177308-0d34-0410-b5e6-96231b3b80d8
* a noteChris Lattner2007-02-271-0/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34670 91177308-0d34-0410-b5e6-96231b3b80d8
* Make getPassManagerType() const.Devang Patel2007-02-272-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34669 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix parenthesis for BCTRL_{ELF|Macho} test.Nicolas Geoffray2007-02-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34668 91177308-0d34-0410-b5e6-96231b3b80d8
* Differentiate between the MachO and the ELF ABI the CALL instruction.Nicolas Geoffray2007-02-274-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34667 91177308-0d34-0410-b5e6-96231b3b80d8
* Duplicate use of LR, take 2.Jim Laskey2007-02-273-26/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34666 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the AsmWriter to print out arbitrary precision integers.Reid Spencer2007-02-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34664 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct the implelmentation of ConstantInt::getAllOnesValue() for bitReid Spencer2007-02-271-1/+1
| | | | | | | widths > 64 bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34663 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of extraneous // in file comment.Reid Spencer2007-02-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34662 91177308-0d34-0410-b5e6-96231b3b80d8
* Add calling convention infoChris Lattner2007-02-272-2/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34661 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1205:Reid Spencer2007-02-271-102/+135
| | | | | | | 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
* move target independent calling convention stuff to TargetCallingConv.tdChris Lattner2007-02-272-56/+71
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34659 91177308-0d34-0410-b5e6-96231b3b80d8
* fill in some holesChris Lattner2007-02-271-7/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34658 91177308-0d34-0410-b5e6-96231b3b80d8
* switch x86-64 return value lowering over to using same mechanism as argumentChris Lattner2007-02-271-68/+88
| | | | | | | lowering uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34657 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor refactoring of CC Lowering interfacesChris Lattner2007-02-272-23/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34656 91177308-0d34-0410-b5e6-96231b3b80d8
* move CC Lowering stuff to its own public interfaceChris Lattner2007-02-272-146/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34655 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor x86-64 argument lowering yet again, this time eliminating templates,Chris Lattner2007-02-271-166/+179
| | | | | | | 'clients', etc, and adding CCValAssign instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34654 91177308-0d34-0410-b5e6-96231b3b80d8
* ConstantFolding.cpp/h -> ConstantFold.cpp/h to avoid confusion withChris Lattner2007-02-273-55/+2
| | | | | | | lib/Analysis/ConstantFolding. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34653 91177308-0d34-0410-b5e6-96231b3b80d8
* Backing out Jim's LR spill changes. This was causing llvm-gcc bootstrappingEvan Cheng2007-02-273-19/+2
| | | | | | | | | | 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
* forward() should not increment internal iterator. Its client may insert ↵Evan Cheng2007-02-272-5/+26
| | | | | | instruction between now and next forward() call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34649 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify and document RoundDoubleToAPInt.Reid Spencer2007-02-271-3/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34648 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1205:Reid Spencer2007-02-261-16/+49
| | | | | | | | | | | 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
* 1. Make sure all delete operators of arrays use the array form of delete.Reid Spencer2007-02-261-19/+45
| | | | | | | | | | | | | | | 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
* Joining an interval with a dead copy instruction. Shorten the live range to ↵Evan Cheng2007-02-261-20/+46
| | | | | | the last use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34645 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the getHashValue method.Reid Spencer2007-02-261-1/+16
| | | | | | | 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
* Use efficient container SmallPtrSetDevang Patel2007-02-261-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34640 91177308-0d34-0410-b5e6-96231b3b80d8
* always lower to RETFLAG, never leave it as just ret.Chris Lattner2007-02-262-11/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34639 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not unswitch loop on same value again and again.Devang Patel2007-02-261-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34638 91177308-0d34-0410-b5e6-96231b3b80d8
* fix attributionChris Lattner2007-02-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34637 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a description of the X86-64 calling convention and the returnChris Lattner2007-02-262-0/+143
| | | | | | | 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
* Re-enable this. The header was committed.Reid Spencer2007-02-261-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34634 91177308-0d34-0410-b5e6-96231b3b80d8
* switch to smallvectorChris Lattner2007-02-261-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34633 91177308-0d34-0410-b5e6-96231b3b80d8
* another missing header :( :( :(Chris Lattner2007-02-261-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34632 91177308-0d34-0410-b5e6-96231b3b80d8
* initial hack at splitting the x86-64 calling convention info out from theChris Lattner2007-02-261-271/+299
| | | | | | | | 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
* 1. Remove redundant calls to clearUsedBits().Reid Spencer2007-02-261-44/+79
| | | | | | | | | | | 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
* the truncate must always be done, it's only the assert that is conditional.Chris Lattner2007-02-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34628 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply my previous patch with a bugfix.Chris Lattner2007-02-261-21/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34627 91177308-0d34-0410-b5e6-96231b3b80d8
* revert my previous change, something strange is happening.Chris Lattner2007-02-261-29/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34626 91177308-0d34-0410-b5e6-96231b3b80d8
* add an accessor.Chris Lattner2007-02-261-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34625 91177308-0d34-0410-b5e6-96231b3b80d8
* in X86-64 CCC, i8/i16 arguments are already properly zext/sext'd on input.Chris Lattner2007-02-261-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fold (sext (truncate x)) more aggressively, by avoiding creation of aChris Lattner2007-02-261-10/+34
| | | | | | | | | | 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
* track signedness of formal argument, though we have a fixme here.Chris Lattner2007-02-261-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34620 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite lshr to not do bit by bit copy but to copy and shift whole words.Reid Spencer2007-02-261-15/+42
| | | | | | | This makes it much more efficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34618 91177308-0d34-0410-b5e6-96231b3b80d8