summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Clean up this code and fix subtract miscompile.Nick Lewycky2007-03-181-18/+22
| | | | llvm-svn: 35146
* 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
* Add value ranges. Currently inefficient in both execution time andNick Lewycky2007-03-101-219/+397
| | | | | | optimization power. llvm-svn: 35058
* Unbreak VC++ build.Jeff Cohen2007-03-051-1/+1
| | | | llvm-svn: 34917
* Translate bit operations to English.Nick Lewycky2007-03-031-1/+2
| | | | llvm-svn: 34868
* APIntify this pass.Reid Spencer2007-03-031-28/+36
| | | | llvm-svn: 34863
* Fix indenting, remove tabs.Nick Lewycky2007-02-041-32/+90
| | | | | | | | | | | | Learn from sext and zext. The destination value falls within the range of the source type. Generalize properties regarding constant ints. Get smarter about marking blocks as unreachable. If 1 >= 2 in order for this block to execute, then it isn't reachable. llvm-svn: 33889
* For PR1163:Reid Spencer2007-02-041-1/+1
| | | | | | | Make the Module's dependent library use a std::vector instead of SetVector adjust #includes in .cpp files because SetVector.h is no longer included. llvm-svn: 33855
* Simplify names of lattice values. SGTUNE becomes SGT, for example.Nick Lewycky2007-01-291-71/+127
| | | | | | | | | | | | | Fix initializeConstant, now initializeInt. Fixes major performance bottleneck. X == Y || X->DominatedBy(Y) is redundant. Remove the X == Y part. Fix crasher in makeEqual where getOrInsertNode would add a new constant, producing an NE relationship between the two members we're trying to make equal. This now allows us to mark more BBs as unreachable. llvm-svn: 33612
* For PR1094:Reid Spencer2007-01-171-4/+4
| | | | | | | Adjust the use of SetVector for changes in SetVector's interface. Patch by Gordon Henriksen. llvm-svn: 33280
* Don't print address of ETNode. Print the DFSNumIn which uniquely identifiesNick Lewycky2007-01-151-34/+65
| | | | | | | | | | | | | | | the basic block and is stable across runs in gdb or valgrind. Make Node::update handle edges which dominate and are tighter than existing edges. Replace makeEqual's "squeeze theorem" code. Fixes miscompilation. Gate the calls to defToOps and opsToDef. Before this, we were getting IG edges about values which weren't even defined in the dominated area. This reduces the size of the IG by about half. llvm-svn: 33236
* "Default context" blocks can occur after a non-default one. This meantNick Lewycky2007-01-131-8/+12
| | | | | | | | | that properties were being applied where they didn't belong. Fixes crash in new MiBench testcase. Also mark debugging code as such in #ifdef. llvm-svn: 33177
* If we know that it's a constant being casted, propagate through the castNick Lewycky2007-01-121-1/+10
| | | | | | | instruction. Doesn't work the other way though (can't recover bits that have been truncated). llvm-svn: 33104
* Clean up logic after ConstantBool removal.Nick Lewycky2007-01-121-20/+14
| | | | llvm-svn: 33096
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-3/+3
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-111-26/+31
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* Quiet compiler warning. The only reason the function is marked virtualNick Lewycky2007-01-111-0/+2
| | | | | | is so that it can be called from inside a debugger. llvm-svn: 33067
* New predicate simplifier!Nick Lewycky2007-01-111-974/+1155
| | | | | | Please do not enable, there is still some known miscompile problem. llvm-svn: 33066
* For PR950:Reid Spencer2006-12-231-97/+247
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* Convert more Statistic's over to STATISTICChris Lattner2006-12-191-7/+4
| | | | llvm-svn: 32692
* Removing even more <iostream> includes.Bill Wendling2006-12-071-33/+29
| | | | llvm-svn: 32320
* add missing #includeChris Lattner2006-12-061-0/+1
| | | | llvm-svn: 32280
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-3/+3
| | | | | | is 'unsigned'. llvm-svn: 32279
* Unbreak VC++ build.Jeff Cohen2006-12-021-7/+7
| | | | llvm-svn: 32113
* Update to new predicate simplifier VRP design. Fixes PR966 and PR967.Nick Lewycky2006-11-221-574/+1105
| | | | | | | | Remove predicate simplifier from default gcc3 pipeline. New design is too slow to enable by default. Add new testcases for problems encountered in development. llvm-svn: 31895
* Unbreak VC++ build.Jeff Cohen2006-11-051-3/+3
| | | | llvm-svn: 31464
* Remove commented line from earlier debugging.Nick Lewycky2006-11-051-2/+0
| | | | llvm-svn: 31460
* For PR950:Reid Spencer2006-11-021-1/+3
| | | | | | Replace the REM instruction with UREM, SREM and FREM. llvm-svn: 31369
* For PR950:Reid Spencer2006-10-261-1/+3
| | | | | | | | Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. llvm-svn: 31195
* Fix 2006-10-25-AddSetCC. A relational operator (like setlt) can neverNick Lewycky2006-10-261-27/+46
| | | | | | produce an EQ property. llvm-svn: 31193
* Resurrect r1.25.Nick Lewycky2006-10-251-117/+154
| | | | | | Fix and comment the "or", "and" and "xor" transformations. llvm-svn: 31189
* hide symbols properlyChris Lattner2006-10-251-1/+1
| | | | llvm-svn: 31184
* Revert back to r1.21, which was the last revision of predsimplify thatChris Lattner2006-10-241-134/+109
| | | | | | passes llvm-gcc bootstrap. llvm-svn: 31146
* Remove the Backwards operation. Resolving now works at the time when aNick Lewycky2006-10-231-90/+102
| | | | | | | property is added by running through the list of uses of the value and adding resolved properties to the property set. llvm-svn: 31126
* Fix similar missing optimization opportunity in XOR.Nick Lewycky2006-10-221-13/+22
| | | | llvm-svn: 31123
* Whoops! Add missing NULL check.Nick Lewycky2006-10-221-0/+1
| | | | llvm-svn: 31121
* Handle "if ((x|y) != 0)" for ints like we do for bools. Fixes missedNick Lewycky2006-10-221-10/+13
| | | | | | optimization opportunity pointed out by Chris Lattner. llvm-svn: 31118
* AllocaInst can't return a null pointer. Fixes missed optimizationNick Lewycky2006-10-221-0/+6
| | | | | | opportunity pointed out by Andrew Lewycky. llvm-svn: 31115
* Replace custom dispatch code with two uses of InstVisitor. ImprovesNick Lewycky2006-10-121-93/+113
| | | | | | compile-time performance. llvm-svn: 30896
* Simplify logic further.Nick Lewycky2006-10-031-17/+8
| | | | | | | Ensure that we copy KnownProperties before calling visitBasicBlock, else we may leak properties into blocks where they don't belong. llvm-svn: 30705
* Simplify, now that predsimplify depends on break-crit-edges.Nick Lewycky2006-10-031-26/+8
| | | | | | Fix SwitchInst where dest-block is the same as one of the cases. llvm-svn: 30700
* Move break-crit-edges before the predicate simplifier. Allows us toNick Lewycky2006-10-031-7/+3
| | | | | | optimize in more cases. llvm-svn: 30699
* Eliminate ConstantBool::True and ConstantBool::False. Instead, provideChris Lattner2006-09-281-40/+33
| | | | | | ConstantBool::getTrue() and ConstantBool::getFalse(). llvm-svn: 30665
* Style changes only. Remove dead code, fix a comment.Nick Lewycky2006-09-231-11/+4
| | | | llvm-svn: 30588
* Don't rewrite ConstantExpr::get.Nick Lewycky2006-09-211-44/+20
| | | | llvm-svn: 30552
* Once we're down to "setcc type constant1, constant2", at least come upNick Lewycky2006-09-201-18/+14
| | | | | | with the right answer. llvm-svn: 30550
* Use a total ordering to compare instructions.Nick Lewycky2006-09-201-87/+101
| | | | | | Fixes infinite loop in resolve(). llvm-svn: 30540
OpenPOWER on IntegriCloud