Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Teach ComputeMaskedBits about nsw on add. I don't think there's anything we can | Nick Lewycky | 2011-03-11 | 1 | -0/+14 | |
| | | | | | | | do with nuw here, but sub and mul should be given similar treatment. Fixes PR9343 #15! llvm-svn: 127463 | |||||
* | Fix PR9331. Simplified version of a patch by Jakub Staszak. | Duncan Sands | 2011-03-08 | 1 | -0/+4 | |
| | | | | llvm-svn: 127243 | |||||
* | Add more analysis of the sign bit of an srem instruction. If the LHS is negative | Nick Lewycky | 2011-03-07 | 1 | -0/+13 | |
| | | | | | | | then the result could go either way. If it's provably positive then so is the srem. Fixes PR9343 #7! llvm-svn: 127146 | |||||
* | Fix comment. | Nick Lewycky | 2011-02-28 | 1 | -1/+1 | |
| | | | | llvm-svn: 126645 | |||||
* | srem doesn't actually have the same resulting sign as its numerator, you could | Nick Lewycky | 2011-02-28 | 1 | -12/+0 | |
| | | | | | | | also have a zero when numerator = denominator. Reverts parts of r126635 and r126637. llvm-svn: 126644 | |||||
* | Teach value tracking to make use of flags in more situations. | Nick Lewycky | 2011-02-28 | 1 | -0/+25 | |
| | | | | llvm-svn: 126642 | |||||
* | Teach ValueTracking to look at the dividend when determining the sign bit of an | Nick Lewycky | 2011-02-28 | 1 | -0/+12 | |
| | | | | | | srem instruction. llvm-svn: 126637 | |||||
* | Stores of null pointers should turn into memset, we weren't recognizing | Chris Lattner | 2011-02-19 | 1 | -0/+5 | |
| | | | | | | them as splat values. llvm-svn: 126041 | |||||
* | Tolerate degenerate phi nodes that can occur in the middle of optimization | Nick Lewycky | 2011-02-10 | 1 | -0/+4 | |
| | | | | | | passes. Fixes PR9112. Patch by Jakub Staszak! llvm-svn: 125319 | |||||
* | Add a m_SignBit pattern for convenience. | Duncan Sands | 2011-02-01 | 1 | -3/+1 | |
| | | | | llvm-svn: 124656 | |||||
* | Fix typo: should have been testing that X was odd, not V. | Duncan Sands | 2011-01-29 | 1 | -3/+3 | |
| | | | | llvm-svn: 124533 | |||||
* | APInt has a method for determining whether a number is a power of 2 | Duncan Sands | 2011-01-26 | 1 | -1/+1 | |
| | | | | | | which is more efficient than countPopulation - use it. llvm-svn: 124283 | |||||
* | In which I discover that zero+zero is zero, d'oh! | Duncan Sands | 2011-01-25 | 1 | -3/+3 | |
| | | | | llvm-svn: 124188 | |||||
* | See if this fixes llvm-gcc bootstrap. | Duncan Sands | 2011-01-25 | 1 | -1/+2 | |
| | | | | llvm-svn: 124184 | |||||
* | According to my auto-simplifier the most common missed simplifications in | Duncan Sands | 2011-01-25 | 1 | -1/+164 | |
| | | | | | | | | | | | optimized code are: (non-negative number)+(power-of-two) != 0 -> true and (x | 1) != 0 -> true Instcombine knows about the second one of course, but only does it if X|1 has only one use. These fire thousands of times in the testsuite. llvm-svn: 124183 | |||||
* | Give GetUnderlyingObject a TargetData, to keep it in sync | Dan Gohman | 2011-01-24 | 1 | -3/+4 | |
| | | | | | | | | | | | with BasicAA's DecomposeGEPExpression, which recently began using a TargetData. This fixes PR8968, though the testcase is awkward to reduce. Also, update several off GetUnderlyingObject's users which happen to have a TargetData handy to pass it in. llvm-svn: 124134 | |||||
* | fix an off-by-one bug that caused a crash analyzing | Chris Lattner | 2011-01-04 | 1 | -1/+1 | |
| | | | | | | ashr's with huge shift amounts, PR8896 llvm-svn: 122814 | |||||
* | move isBytewiseValue out to ValueTracking.h/cpp | Chris Lattner | 2010-12-26 | 1 | -0/+69 | |
| | | | | llvm-svn: 122565 | |||||
* | Add vector versions of some existing scalar transforms to aid codegen in ↵ | Nate Begeman | 2010-12-17 | 1 | -0/+7 | |
| | | | | | | matching psign & pblend operations to the IR produced by clang/gcc for their C idioms. llvm-svn: 122105 | |||||
* | Reapply r121886, and also update DecomposeGEPExpression to keep | Dan Gohman | 2010-12-15 | 1 | -0/+8 | |
| | | | | | | it in sync. llvm-svn: 121895 | |||||
* | Revert r121886. DecomposeGEPExpression needs to be kept | Dan Gohman | 2010-12-15 | 1 | -8/+0 | |
| | | | | | | in sync. llvm-svn: 121892 | |||||
* | Strengthen GetUnderlyingObject using InstructionSimplify. | Dan Gohman | 2010-12-15 | 1 | -0/+9 | |
| | | | | | | | | | | While LLVM's main design is that analysis code shouldn't go out of its way to understand code which hasn't been InstCombined, analysis utility routines like this can find themselves being called in the middle of transform passes when instcombine hasn't had a chance to run. llvm-svn: 121886 | |||||
* | Move Value::getUnderlyingObject to be a standalone | Dan Gohman | 2010-12-15 | 1 | -0/+20 | |
| | | | | | | | function so that it can live in Analysis instead of VMCore. llvm-svn: 121885 | |||||
* | PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and | Jay Foad | 2010-12-07 | 1 | -12/+10 | |
| | | | | | | | | zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121120 | |||||
* | PR5207: Rename overloaded APInt methods set(), clear(), flip() to | Jay Foad | 2010-12-01 | 1 | -11/+11 | |
| | | | | | | setAllBits(), setBit(unsigned), etc. llvm-svn: 120564 | |||||
* | move GetPointerBaseWithConstantOffset out of GVN into ValueTracking.h | Chris Lattner | 2010-11-30 | 1 | -0/+41 | |
| | | | | llvm-svn: 120476 | |||||
* | PR5207: Make APInt::set(), APInt::clear() and APInt::flip() return void. | Jay Foad | 2010-11-30 | 1 | -2/+3 | |
| | | | | llvm-svn: 120413 | |||||
* | fix PR8063, a crash in globalopt in the malloc analysis code. | Chris Lattner | 2010-09-05 | 1 | -20/+29 | |
| | | | | llvm-svn: 113109 | |||||
* | move gep decomposition out of ValueTracking into BasicAA. The form of | Chris Lattner | 2010-08-18 | 1 | -189/+0 | |
| | | | | | | | | | decomposition that it is doing is very basicaa specific and is only used by basicaa. Now with less tree breakingness. llvm-svn: 111433 | |||||
* | Revert r111375, "move gep decomposition out of ValueTracking into BasicAA. The | Daniel Dunbar | 2010-08-18 | 1 | -0/+188 | |
| | | | | | | form of", it doesn't pass tests. llvm-svn: 111385 | |||||
* | move gep decomposition out of ValueTracking into BasicAA. The form of | Chris Lattner | 2010-08-18 | 1 | -188/+0 | |
| | | | | | | | decomposition that it is doing is very basicaa specific and is only used by basicaa. llvm-svn: 111375 | |||||
* | fix PR7589: In brief: | Chris Lattner | 2010-08-18 | 1 | -3/+3 | |
| | | | | | | | | | gep P, (zext x) != gep P, (sext x) DecomposeGEPExpression was getting this wrong, confusing basicaa. llvm-svn: 111352 | |||||
* | use ArgOperand accessors | Gabor Greif | 2010-06-23 | 1 | -2/+2 | |
| | | | | llvm-svn: 106697 | |||||
* | Revert 101465, it broke internal OpenGL testing. | Eric Christopher | 2010-04-16 | 1 | -2/+2 | |
| | | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579 | |||||
* | reapply r101434 | Gabor Greif | 2010-04-16 | 1 | -2/+2 | |
| | | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465 | |||||
* | back out r101423 and r101397, they break llvm-gcc self-host on darwin10 | Gabor Greif | 2010-04-16 | 1 | -2/+2 | |
| | | | | llvm-svn: 101434 | |||||
* | reapply r101364, which has been backed out in r101368 | Gabor Greif | 2010-04-15 | 1 | -2/+2 | |
| | | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397 | |||||
* | back out r101364, as it trips the linux nightlybot on some clang C++ tests | Gabor Greif | 2010-04-15 | 1 | -2/+2 | |
| | | | | llvm-svn: 101368 | |||||
* | rotate CallInst operands, i.e. move callee to the back | Gabor Greif | 2010-04-15 | 1 | -2/+2 | |
| | | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364 | |||||
* | Constify GetConstantStringInfo. | Dan Gohman | 2010-04-14 | 1 | -12/+13 | |
| | | | | llvm-svn: 101298 | |||||
* | Fix a typo in ValueTracking that's causing instcombine to delete needed ↵ | Evan Cheng | 2010-03-13 | 1 | -1/+1 | |
| | | | | | | shift instructions. llvm-svn: 98416 | |||||
* | Move GetStringLength and helper from SimplifyLibCalls to ValueTracking. | Eric Christopher | 2010-03-05 | 1 | -0/+129 | |
| | | | | | | No functionality change. llvm-svn: 97793 | |||||
* | There are two ways of checking for a given type, for example isa<PointerType>(T) | Duncan Sands | 2010-02-16 | 1 | -6/+6 | |
| | | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344 | |||||
* | Uniformize the names of type predicates: rather than having isFloatTy and | Duncan Sands | 2010-02-15 | 1 | -8/+8 | |
| | | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223 | |||||
* | It looks like the changes to the SRem logic of SimplifyDemandedUseBits | Duncan Sands | 2010-01-29 | 1 | -8/+17 | |
| | | | | | | (fix for PR6165) are needed here too. llvm-svn: 94801 | |||||
* | teach ComputeNumSignBits to look through PHI nodes. | Chris Lattner | 2010-01-07 | 1 | -4/+19 | |
| | | | | llvm-svn: 92964 | |||||
* | Move remaining stuff to the isInteger predicate. | Benjamin Kramer | 2010-01-05 | 1 | -3/+2 | |
| | | | | llvm-svn: 92771 | |||||
* | Fix GetConstantStringInfo to not look into MDString (it works on | Chris Lattner | 2009-12-15 | 1 | -5/+0 | |
| | | | | | | | real data, not metadata) and fix DbgInfoPrinter to not abuse GetConstantStringInfo. llvm-svn: 91444 | |||||
* | Fixed an assertion failure for tracking sext of a vector of integers | Mon P Wang | 2009-12-02 | 1 | -1/+1 | |
| | | | | llvm-svn: 90290 | |||||
* | implement a FIXME: limit the depth that DecomposeGEPExpression goes the same | Chris Lattner | 2009-11-28 | 1 | -3/+8 | |
| | | | | | | | | | way that getUnderlyingObject does it. This fixes the 'DecomposeGEPExpression and getUnderlyingObject disagree!' assertion on sqlite3. llvm-svn: 90038 |