summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* For PR1248:Reid Spencer2007-03-211-18/+26
| | | | | | | | | | | | * Fix some indentation and comments in InsertRangeTest * Add an "IsSigned" parameter to AddWithOverflow and make it handle signed additions. Also, APIntify this function so it works with any bitwidth. * For the icmp pred ([us]div %X, C1), C2 transforms, exit early if the div instruction's RHS is zero. * Finally, for icmp pred (sdiv %X, C1), -C2, fix an off-by-one error. The HiBound needs to be incremented in order to get the range test correct. llvm-svn: 35247
* do not share old induction variables when this would result in invalidDale Johannesen2007-03-201-18/+26
| | | | | | instructions (that would have to be split later) llvm-svn: 35227
* Fix some VC++ warnings.Jeff Cohen2007-03-201-1/+1
| | | | llvm-svn: 35224
* LoopSimplify::FindPHIToPartitionLoops()Devang Patel2007-03-201-4/+6
| | | | | | Use ETForest instead of DominatorSet. llvm-svn: 35221
* Simplify isHighOnes().Zhou Sheng2007-03-201-9/+1
| | | | llvm-svn: 35211
* use types of loads and stores, not address, in CheckForIVReuseDale Johannesen2007-03-201-7/+28
| | | | llvm-svn: 35197
* Make isOneBitSet faster by using APInt::isPowerOf2. Thanks Chris.Reid Spencer2007-03-201-1/+1
| | | | llvm-svn: 35194
* APIntify the isHighOnes utility function.Reid Spencer2007-03-191-5/+6
| | | | llvm-svn: 35190
* Implement isMaxValueMinusOne in terms of APInt instead of uint64_t.Reid Spencer2007-03-191-5/+4
| | | | | | Patch by Sheng Zhou. llvm-svn: 35188
* Implement isMinValuePlusOne using facilities of APInt instead of uint64_tReid Spencer2007-03-191-5/+4
| | | | | | Patch by Zhou Sheng. llvm-svn: 35187
* Implement isOneBitSet in terms of APInt::countPopulation.Reid Spencer2007-03-191-2/+1
| | | | llvm-svn: 35186
* 1. Use APInt::getSignBit to reduce clutter (patch by Sheng Zhou)Reid Spencer2007-03-191-8/+4
| | | | | | 2. Replace uses of the "isPositive" utility function with APInt::isPositive llvm-svn: 35185
* Remove a redundant clause in an if statement.Reid Spencer2007-03-191-1/+0
| | | | | | Patch by Sheng Zhou. llvm-svn: 35184
* fix ScalarRepl/2007-03-19-CanonicalizeMemcpy.llChris Lattner2007-03-191-1/+2
| | | | llvm-svn: 35169
* implement the next chunk of SROA with memset/memcpy's of aggregates. ThisChris Lattner2007-03-191-36/+107
| | | | | | implements Transforms/ScalarRepl/memset-aggregate-byte-leader.ll llvm-svn: 35150
* Clean up this code and fix subtract miscompile.Nick Lewycky2007-03-181-18/+22
| | | | llvm-svn: 35146
* Implement InstCombine/and-xor-merge.ll:test[12].Chris Lattner2007-03-181-54/+96
| | | | | | Rearrange some code to simplify it now that shifts are binops llvm-svn: 35145
* Propagate ValueRanges across equality.Nick Lewycky2007-03-181-67/+159
| | | | | | Add some more micro-optimizations: x * 0 = 0, a - x = a --> x = 0. llvm-svn: 35138
* Silence warningAnton Korobeynikov2007-03-171-2/+2
| | | | llvm-svn: 35137
* Add more comments and update to new asm syntax.Nick Lewycky2007-03-161-28/+130
| | | | | | | | | | Add new micro-optimizations. Add icmp predicate snuggling. Given %x ULT 4, "icmp ugt %x, 2" becomes "icmp eq %x, 3". This doesn't apply in any non-trivial cases yet due to missing support for NE values in ValueRanges. llvm-svn: 35119
* ShiftAmt might equal to zero. Handle this situation.Zhou Sheng2007-03-141-7/+9
| | | | llvm-svn: 35094
* Enable KnownZero/One.clear().Zhou Sheng2007-03-141-2/+2
| | | | llvm-svn: 35093
* Correct type info for isLegalAddressImmediate() check.Evan Cheng2007-03-131-12/+18
| | | | llvm-svn: 35086
* ifdef out some dead code.Chris Lattner2007-03-131-2/+8
| | | | | | Fix PR1244 and Transforms/InstCombine/2007-03-13-CompareMerge.ll llvm-svn: 35082
* For expression likeZhou Sheng2007-03-131-3/+3
| | | | | | | | "APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth)", to handle ShiftAmt == BitWidth situation, use zextOrCopy() instead of zext(). llvm-svn: 35080
* In APInt version ComputeMaskedBits():Zhou Sheng2007-03-131-15/+28
| | | | | | | 1. Ensure VTy, KnownOne and KnownZero have same bitwidth. 2. Make code more efficient. llvm-svn: 35078
* Use new TargetLowering addressing modes hooks.Evan Cheng2007-03-121-20/+18
| | | | llvm-svn: 35072
* Unbreak VC++ build. Do not use identifiers starting with _ as they are ↵Jeff Cohen2007-03-121-3/+3
| | | | | | | | reserved and can collide with system defined names. Windows defines _BB, for example. llvm-svn: 35066
* Add an APInt version of SimplifyDemandedBits.Reid Spencer2007-03-121-1/+524
| | | | | | Patch by Zhou Sheng. llvm-svn: 35064
* Add an APInt version of ShrinkDemandedConstant.Reid Spencer2007-03-121-0/+24
| | | | | | Patch by Zhou Sheng. llvm-svn: 35063
* Avoid to assert on "(KnownZero & KnownOne) == 0".Zhou Sheng2007-03-121-1/+1
| | | | llvm-svn: 35062
* In function ComputeMaskedBits():Zhou Sheng2007-03-121-6/+6
| | | | | | | | 1. Replace getSignedMinValue() with getSignBit() for better code readability. 2. Replace APIntOps::shl() with operator<<= for convenience. 3. Make APInt construction more effective. llvm-svn: 35060
* Add value ranges. Currently inefficient in both execution time andNick Lewycky2007-03-101-219/+397
| | | | | | optimization power. llvm-svn: 35058
* Use range tests in LowerSwitch, where possibleAnton Korobeynikov2007-03-101-31/+114
| | | | llvm-svn: 35057
* Remove dead comments.Devang Patel2007-03-091-3/+0
| | | | llvm-svn: 35053
* Avoid recursion. Use iterative algorithm for RenamePass().Devang Patel2007-03-091-4/+31
| | | | llvm-svn: 35052
* Increment iterator now because IVUseShouldUsePostIncValue may removeDevang Patel2007-03-091-2/+6
| | | | | | User from the list of I users. llvm-svn: 35051
* Fix a bug in function ComputeMaskedBits().Zhou Sheng2007-03-081-2/+2
| | | | llvm-svn: 35027
* This appears correct, enable it so we can see perf changes on testersChris Lattner2007-03-081-1/+1
| | | | llvm-svn: 35024
* Second half of PR1226. This is currently still disabled, until I have a ↵Chris Lattner2007-03-081-9/+67
| | | | | | | | chance to do the correctness/performance analysis testing. llvm-svn: 35023
* Fix a bug in APIntified ComputeMaskedBits().Zhou Sheng2007-03-081-8/+4
| | | | llvm-svn: 35022
* For PR1205:Reid Spencer2007-03-081-0/+10
| | | | | | | | | | Provide an APIntified version of MaskedValueIsZero. This will (temporarily) cause a "defined but not used" message from the compiler. It will be used in the next patch in this series. Patch by Sheng Zhou. llvm-svn: 35019
* For PR1205:Reid Spencer2007-03-081-1/+206
| | | | | | | | Add a new ComputeMaskedBits function that is APIntified. We'll slowly convert things over to use this version. When its all done, we'll remove the existing version. llvm-svn: 35018
* Now IndVarSimplify is a LoopPass.Devang Patel2007-03-071-27/+32
| | | | llvm-svn: 35003
* Now LICM is a LoopPass.Devang Patel2007-03-071-30/+26
| | | | llvm-svn: 35001
* Now LoopUnroll is a LoopPass.Devang Patel2007-03-071-36/+7
| | | | llvm-svn: 34996
* Now LoopUnswitch is a LoopPass.Devang Patel2007-03-071-86/+17
| | | | llvm-svn: 34992
* Now LoopStrengthReduce is a LoopPass.Devang Patel2007-03-061-23/+14
| | | | llvm-svn: 34984
* Remove an unnecessary if statement and adjust indentation.Reid Spencer2007-03-051-23/+21
| | | | llvm-svn: 34939
* This is the first major step of implementing PR1226. We now successfullyChris Lattner2007-03-051-5/+156
| | | | | | | scalarrepl things down to elements, but mem2reg can't promote elements that are memset/memcpy'd. Until then, the code is disabled "0 &&". llvm-svn: 34924
OpenPOWER on IntegriCloud