summaryrefslogtreecommitdiff
path: root/lib/Transforms
Commit message (Collapse)AuthorAge
...
* Move code to update dominator information after basic block is splitDevang Patel2007-06-21
| | | | | | | from LoopSimplify.cpp to Dominator.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37689 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate a redundant check. This speeds up optimization of 253.perlbmk ↵Owen Anderson2007-06-21
| | | | | | from 13.5 seconds to 10.9 seconds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37683 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment-ize the functions in GVNPRE.Owen Anderson2007-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37681 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor a bunch of code out of visitICmpInstWithInstAndIntCst into its ownChris Lattner2007-06-20
| | | | | | | routine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37679 91177308-0d34-0410-b5e6-96231b3b80d8
* Split runOnFunction into many smaller functions. This make it easier to get ↵Owen Anderson2007-06-20
| | | | | | accurate performance analysis of GVNPRE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37678 91177308-0d34-0410-b5e6-96231b3b80d8
* Make GVNPRE accurate report whether it modified the function or not.Owen Anderson2007-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37673 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of an unneeded helper function.Owen Anderson2007-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37670 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a DenseMap instead of an std::map for the value numbering. This reduces ↵Owen Anderson2007-06-19
| | | | | | the time to optimize lencod on a PPC Debug build from ~300s to ~140s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37668 91177308-0d34-0410-b5e6-96231b3b80d8
* Make dependsOnInvoke much more specific in what it tests, which in turn make ↵Owen Anderson2007-06-19
| | | | | | it much faster to run. This reduces the time to optimize lencondwith a debug build on PPC from ~450s to ~300s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37667 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved Inliner.h to include/llvm/Transforms/IPO/InlinerPass.hTanya Lattner2007-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37666 91177308-0d34-0410-b5e6-96231b3b80d8
* Inliner pass header file was moved.Tanya Lattner2007-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37665 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ScalarEvolution::deleteInstructionFromRecords toDan Gohman2007-06-19
| | | | | | | | | | deleteValueFromRecords and loosen the types to all it to accept Value* instead of just Instruction*, since this is what ScalarEvolution uses internally anyway. This allows more flexibility for future uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37657 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle constants in phi nodes properly. This fixes ↵Owen Anderson2007-06-19
| | | | | | test/Transforms/GVNPRE/2007-06-18-ConstantInPhi.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37655 91177308-0d34-0410-b5e6-96231b3b80d8
* silence a bogus warning Duraid ran into.Chris Lattner2007-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37649 91177308-0d34-0410-b5e6-96231b3b80d8
* Be careful to erase values from all of the appropriate sets when they're not ↵Owen Anderson2007-06-19
| | | | | | needed anymore. This fixes a few more memory-related issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37647 91177308-0d34-0410-b5e6-96231b3b80d8
* Remember to clear the maximal sets between functions.Owen Anderson2007-06-19
| | | | | | | Thanks to Nicholas for valgrinding this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37646 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor GVNPRE to use a much smart method of uniquing value sets, and ↵Owen Anderson2007-06-19
| | | | | | centralize a lot of the value numbering information. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37645 91177308-0d34-0410-b5e6-96231b3b80d8
* Cache the results of dependsOnInvoke()Owen Anderson2007-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37622 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indentation.Owen Anderson2007-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37621 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't perform an expensive check if it's not necessary.Owen Anderson2007-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37620 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test/Transforms/GVNPRE/2007-06-15-InvokeInst.ll by ignoring all ↵Owen Anderson2007-06-16
| | | | | | instructions that depend on invokes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37610 91177308-0d34-0410-b5e6-96231b3b80d8
* Use SCEVConstant::get instead of SCEVUnknown::get to create anDan Gohman2007-06-15
| | | | | | | integer constant SCEV. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37596 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test/Transforms/GVNPRE/2007-06-15-Looping.llOwen Anderson2007-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37595 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a SCEV class and supporting code for sign-extend expressions.Dan Gohman2007-06-15
| | | | | | | | | | | This created an ambiguity for expandInTy to decide when to use sign-extension or zero-extension, but it turns out that most of its callers don't actually need a type conversion, now that LLVM types don't have explicit signedness. Drop expandInTy in favor of plain expand, and change the few places that actually need a type conversion to do it themselves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37591 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize many transforms to work on ~ of vectors in addition to ~ ofChris Lattner2007-06-15
| | | | | | | | integer ops. This implements Transforms/InstCombine/and-or-not.ll test3/test4, and finishes off PR1510 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37589 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement two xforms:Chris Lattner2007-06-15
| | | | | | | | | | | | 1. ~(~X | Y) === (X & ~Y) 2. (A|B) & ~(A&B) -> A^B This allows us to transform ~(~(a|b) | (a&b)) -> a^b. This implements PR1510 for scalar values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37584 91177308-0d34-0410-b5e6-96231b3b80d8
* delete some obviously dead vector operations, which deletes a few thousandChris Lattner2007-06-15
| | | | | | | operations from Duraids example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37582 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test/Transforms/GVNPRE/2007-06-12-PhiTranslate.llOwen Anderson2007-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37564 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor some code, and fix test/Transforms/GVNPRE/2007-06-12-NoExit.ll by ↵Owen Anderson2007-06-12
| | | | | | | | | being more careful when using post-dominator information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37556 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink CmpInst's to their uses to reduce register pressure.Dale Johannesen2007-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37554 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few more bugs, including an instance of walking in reverse topological ↵Owen Anderson2007-06-12
| | | | | | | | | rather than topological order. This fixes a testcase extracted from llvm-test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37550 91177308-0d34-0410-b5e6-96231b3b80d8
* Add and use DominatorTreeBase::findNearestCommonDominator().Devang Patel2007-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37545 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify.Devang Patel2007-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37542 91177308-0d34-0410-b5e6-96231b3b80d8
* simplifyDevang Patel2007-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37541 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify. Dominator Tree is required so always available.Devang Patel2007-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37540 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle functions with multiple exit blocks properly.Owen Anderson2007-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37539 91177308-0d34-0410-b5e6-96231b3b80d8
* Perform PRE of comparison operators.Owen Anderson2007-06-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37536 91177308-0d34-0410-b5e6-96231b3b80d8
* Collect statistics from GVN-PRE.Owen Anderson2007-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37530 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in a comment.Owen Anderson2007-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37526 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug that was causing the elimination phase not to replace values when ↵Owen Anderson2007-06-08
| | | | | | | | | | | it should be. With this patch, GVN-PRE now correctly optimizes the example from the thesis. Many thanks to Daniel Berlin for helping me find errors in this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37525 91177308-0d34-0410-b5e6-96231b3b80d8
* Small bugfix, and const-ify some methods (Thanks, Bill).Owen Anderson2007-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37513 91177308-0d34-0410-b5e6-96231b3b80d8
* Update LoopSimplify to require and preserve DominatorTree only.Devang Patel2007-06-08
| | | | | | | Now LoopSimplify does not require nor preserve ETForest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37512 91177308-0d34-0410-b5e6-96231b3b80d8
* Add partial redundancy elimination.Owen Anderson2007-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37510 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not preserve ETForest.Devang Patel2007-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37506 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not require ETForest. Now it is unused by LICM.Devang Patel2007-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37502 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use ETForest as well as DomiantorTree. DominatorTree is sufficient.Devang Patel2007-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37501 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DominatorTree instead of ETForest.Devang Patel2007-06-07
| | | | | | | This allows faster immediate domiantor walk. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37500 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DominatorTree instead of ETForest.Devang Patel2007-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37499 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DominatorTree instead of ETForest.Devang Patel2007-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37498 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DominatorTree instead of ETForest.Devang Patel2007-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37495 91177308-0d34-0410-b5e6-96231b3b80d8