summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Walk down the dominator tree instead of the control flow graph. That meansNick Lewycky2006-09-181-150/+90
| | | | | | | that we can't modify the CFG any more, at least not until it's possible to update the dominator tree (PR217). llvm-svn: 30469
* Add some more consistency checks.Nick Lewycky2006-09-131-1/+20
| | | | llvm-svn: 30305
* Fix unionSets so that it can merge correctly.Nick Lewycky2006-09-131-22/+34
| | | | llvm-svn: 30304
* Erase dead instructions.Nick Lewycky2006-09-131-2/+3
| | | | llvm-svn: 30298
* Skip the linear search if the answer is already known.Nick Lewycky2006-09-111-20/+22
| | | | llvm-svn: 30251
* Replace EquivalenceClasses with a custom-built data structure. Many commonNick Lewycky2006-09-101-133/+259
| | | | | | | | | operations (like findProperties) should be faster, at the expense of unionSets being slower in cases that are rare in practise. Don't erase a dead Instruction. This fixes a memory corruption issue. llvm-svn: 30235
* Improve handling of SelectInst.Nick Lewycky2006-09-021-31/+44
| | | | | | | | Reorder operations to remove duplicated work. Fix to leave floating-point types out of the optimization. Add tests to predsimplify.ll for SwitchInst and SelectInst handling. llvm-svn: 30055
* Don't confuse canonicalize and lookup. Fixes predsimplify.reg4.ll. AlsoNick Lewycky2006-09-011-21/+20
| | | | | | corrects missing optimization opportunity removing cases from a switch. llvm-svn: 30009
* Properties where both Values weren't in the union (as being equal toNick Lewycky2006-08-311-24/+18
| | | | | | | | another Value) weren't being found by findProperties. This fixes predsimplify.ll test6, a missed optimization opportunity. llvm-svn: 29991
* Move to using the EquivalenceClass ADT. Removes SynSets.Nick Lewycky2006-08-301-165/+92
| | | | | | | | | If a branch's condition has become a ConstantBool, simplify it immediately. Removing the edge saves work and exposes up more optimization opportunities in the pass. Add support for SelectInst. llvm-svn: 29970
* Add PredicateSimplifier pass. Collapses equal variables into one formNick Lewycky2006-08-281-0/+744
and simplifies expressions. This implements the optimization described in PR807. llvm-svn: 29947
OpenPOWER on IntegriCloud