summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* For PR1205:Reid Spencer2007-03-231-762/+37
| | | | | | | | | | | | * APIntify visitAdd and visitSelectInst * Remove unused uint64_t versions of utility functions that have been replaced with APInt versions. This completes most of the changes for APIntification of InstCombine. This passes llvm-test and llvm/test/Transforms/InstCombine/APInt. Patch by Zhou Sheng. llvm-svn: 35287
* For PR1205:Reid Spencer2007-03-231-25/+22
| | | | | | | | APIntify visitDiv, visitMul and visitRem. Patch by Zhou Sheng. llvm-svn: 35283
* switch AddReachableCodeToWorklist from being recursive to being iterative.Chris Lattner2007-03-231-46/+54
| | | | llvm-svn: 35282
* For PR1205:Reid Spencer2007-03-231-37/+39
| | | | | | | | | APIntify several utility functions supporting logical operators and shift operators. Patch by Zhou Sheng. llvm-svn: 35281
* Make the "KnownZero ^ TypeMask" computation just once.Zhou Sheng2007-03-231-3/+4
| | | | llvm-svn: 35276
* Simplify the code.Zhou Sheng2007-03-231-1/+1
| | | | llvm-svn: 35275
* For PR1205:Reid Spencer2007-03-221-21/+25
| | | | | | | | APInt support for logical operators in visitAnd, visitOr, and visitXor. Patch by Zhou Sheng. llvm-svn: 35273
* For PR1205:Reid Spencer2007-03-221-16/+17
| | | | | | | | | | * APIntify commonIntCastTransforms * APIntify visitTrunc * APIntify visitZExt Patch by Zhou Sheng. llvm-svn: 35271
* For PR1205:Reid Spencer2007-03-221-63/+63
| | | | | | | | * Re-enable the APInt version of MaskedValueIsZero. * APIntify the Comput{Un}SignedMinMaxValuesFromKnownBits functions * APIntify visitICmpInst. llvm-svn: 35270
* Change uses of Function::front to Function::getEntryBlock for readability.Dan Gohman2007-03-228-10/+13
| | | | llvm-svn: 35265
* Fix broken optimization disabled by a logic bug.Nick Lewycky2007-03-221-10/+51
| | | | | | | | | Analyze GEPs. If the indices are all zero, transfer whether the pointer is known to be not null through the GEP. Add a few more cases for xor and shift instructions. llvm-svn: 35257
* 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
OpenPOWER on IntegriCloud