summaryrefslogtreecommitdiff
path: root/lib/Analysis/PHITransAddr.cpp
Commit message (Collapse)AuthorAge
* Strip trailing whitespace.Dan Gohman2010-11-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119706 91177308-0d34-0410-b5e6-96231b3b80d8
* Use llvm_unreachable for "impossible" situations.Dan Gohman2010-11-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119705 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for PHI-translating sext, zext, and trunc instructions,Dan Gohman2010-11-18
| | | | | | | enabling more PRE. PR8586. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119704 91177308-0d34-0410-b5e6-96231b3b80d8
* In which I discover the existence of loops. Threading an operationDuncan Sands2010-11-16
| | | | | | | | | | | | over a phi node by applying it to each operand may be wrong if the operation and the phi node are mutually interdependent (the testcase has a simple example of this). So only do this transform if it would be correct to perform the operation in each predecessor of the block containing the phi, i.e. if the other operands all dominate the phi. This should fix the FFMPEG snow.c regression reported by İsmail Dönmez. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119347 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r97010, the speculative revert failed.Daniel Dunbar2010-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97036 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert r97010, "Add an argument to PHITranslateValue to specifyDaniel Dunbar2010-02-24
| | | | | | the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97027 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an argument to PHITranslateValue to specify the DominatorTree. If thisBob Wilson2010-02-24
| | | | | | | | | | | | | | | | | | | | | argument is non-null, pass it along to PHITranslateSubExpr so that it can prefer using existing values that dominate the PredBB, instead of just blindly picking the first equivalent value that it finds on a uselist. Also when the DominatorTree is specified, have PHITranslateValue filter out any result that does not dominate the PredBB. This is basically just refactoring the check that used to be in GetAvailablePHITranslatedSubExpr and also in GVN. Despite my initial expectations, this change does not affect the results of GVN for any testcases that I could find, but it should help compile time. Before this change, if PHITranslateSubExpr picked a value that does not dominate, PHITranslateWithInsertion would then insert a new value, which GVN would later determine to be redundant and would replace. By picking a good value to begin with, we save GVN the extra work of inserting and then replacing a new value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97010 91177308-0d34-0410-b5e6-96231b3b80d8
* Change dbgs() back to errs() as Chris requested.David Greene2009-12-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92085 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert debug messages to use dbgs(). Generally this meansDavid Greene2009-12-23
| | | | | | | s/errs/dbgs/g except for certain special cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92046 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a minor optimization: if we haven't changed the operands of anChris Lattner2009-12-09
| | | | | | | | | | | | add, there is no need to scan the world to find the same add again. This invalidates the previous testcase, which wasn't wonderful anyway, because it needed a run of instcombine to permute the use-lists in just the right way to before GVN was run (so it was really fragile). Not a big loss. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90973 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR5733, a case where we'd replace an add with a lexically identical Chris Lattner2009-12-09
| | | | | | | binary operator that wasn't an add. In this case, a xor. Whoops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90971 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a nasty variable that was shadowing the real CurBB but with the wrong value.Chris Lattner2009-12-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90920 91177308-0d34-0410-b5e6-96231b3b80d8
* fix many input tracking bugs.Chris Lattner2009-12-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90915 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PHI translation to take the PHI out of the instinputs set and addChris Lattner2009-12-09
| | | | | | | the translated value back to it if an instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90909 91177308-0d34-0410-b5e6-96231b3b80d8
* instructions defined in CurBB may be intermediate nodes of the computation.Chris Lattner2009-12-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90908 91177308-0d34-0410-b5e6-96231b3b80d8
* add dumping and sanity checking support.Chris Lattner2009-12-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90906 91177308-0d34-0410-b5e6-96231b3b80d8
* make sure that PHITransAddr keeps its 'InstInputs' list up toChris Lattner2009-12-08
| | | | | | | date when instsimplify kicks in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90901 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a typo (and -> add) and fix GetAvailablePHITranslatedSubExpr to not Chris Lattner2009-12-08
| | | | | | | side-effect the current object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90837 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typoChris Lattner2009-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90793 91177308-0d34-0410-b5e6-96231b3b80d8
* add accessor, improve comment.Chris Lattner2009-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90792 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for phi translation and incorpation of new expression.Chris Lattner2009-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90782 91177308-0d34-0410-b5e6-96231b3b80d8
* checkpoint of the new PHITransAddr code, still not done and not used byChris Lattner2009-12-07
| | | | | | | anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90779 91177308-0d34-0410-b5e6-96231b3b80d8
* add the start of a class used to handle phi translation in memdep andChris Lattner2009-12-04
gvn (this is just a skeleton so far). This will ultimately be used to fix a nasty miscompilation with GVN. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90518 91177308-0d34-0410-b5e6-96231b3b80d8