summaryrefslogtreecommitdiff
path: root/lib/CodeGen/IfConversion.cpp
Commit message (Collapse)AuthorAge
* Somehow this wasn't committed last time. M_CLOBBERS_PRED is gone.Evan Cheng2007-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38495 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach if-conversion about instructions that were already predicated, e.g. ↵Evan Cheng2007-07-06
| | | | | | conditional move. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37964 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid if-converting simple block that ends with unconditional branch or ↵Evan Cheng2007-06-19
| | | | | | fallthrough unless it branches / falls to the 'false' block. Not profitable, may end up increasing code size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37660 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit.Evan Cheng2007-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37643 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some fragile code wrt CFG edge updating.Evan Cheng2007-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37634 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly remove duplicate instructions as result of diamond if-conversion. ↵Evan Cheng2007-06-18
| | | | | | Other bug fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37623 91177308-0d34-0410-b5e6-96231b3b80d8
* Really turn if-converter loose:Evan Cheng2007-06-16
| | | | | | | | | | | 1. Consider all possible ifcvt cases at once. No longer restricted to bottom up iterative approach. 2. Sort all possible cases based on a cost function. Perform the most profitable ones first invalidate others that target the same blocks. 3. Fixed a number of bugs related to block duplication. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37613 91177308-0d34-0410-b5e6-96231b3b80d8
* Not every predicable block can be safely duplicated.Evan Cheng2007-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37607 91177308-0d34-0410-b5e6-96231b3b80d8
* MachineInstr::isPredicable() is no longer needed.Evan Cheng2007-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37599 91177308-0d34-0410-b5e6-96231b3b80d8
* Extra edges are deleted later if needed.Evan Cheng2007-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37593 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow small blocks to be duplicated to enable if-conversion.Evan Cheng2007-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37590 91177308-0d34-0410-b5e6-96231b3b80d8
* No really, clear predcessors states.Evan Cheng2007-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37581 91177308-0d34-0410-b5e6-96231b3b80d8
* If BB is predicated, invalidate its predecessor(s) which would if-convert ↵Evan Cheng2007-06-14
| | | | | | it. It needs to be re-analyzed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37580 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Evan Cheng2007-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37577 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some stupid bugs that have effectively disabled if-conversion.Evan Cheng2007-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37575 91177308-0d34-0410-b5e6-96231b3b80d8
* TypoEvan Cheng2007-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37566 91177308-0d34-0410-b5e6-96231b3b80d8
* Now if-converting all 4 variants of triangles.Evan Cheng2007-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37565 91177308-0d34-0410-b5e6-96231b3b80d8
* Restructure code to reduce ifcvt compile time cost.Evan Cheng2007-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37543 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the build.Reid Spencer2007-06-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37537 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't change CFG during analysis stage. Do so during ifcvt and invalidate ↵Evan Cheng2007-06-09
| | | | | | predecessors accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37531 91177308-0d34-0410-b5e6-96231b3b80d8
* Carefully remove extraneous CFG edges after each ifcvt.Evan Cheng2007-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37529 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct transfer predicate information.Evan Cheng2007-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37524 91177308-0d34-0410-b5e6-96231b3b80d8
* Hidden options to help debugging ifcvt issues.Evan Cheng2007-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37523 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow more cmp / bcc to be predicated; clean up triangle ifcvt checking code.Evan Cheng2007-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37518 91177308-0d34-0410-b5e6-96231b3b80d8
* Only remove the edge from entry to false if false block is merged.Evan Cheng2007-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37503 91177308-0d34-0410-b5e6-96231b3b80d8
* ifcvt a triangle: don't merge ifcvt block with rejoin block if it can fall ↵Evan Cheng2007-06-07
| | | | | | through to it. If merged, the resulting block is not a candidate for iterative ifcvting since it contains both predicated and non-predicated code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37487 91177308-0d34-0410-b5e6-96231b3b80d8
* Lots of bug fixes. Now finally in a reasonable state.Evan Cheng2007-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37485 91177308-0d34-0410-b5e6-96231b3b80d8
* Quick patch to fix the build, based on what it appears Evan meant to write.Owen Anderson2007-06-06
| | | | | | | Evan, please check that this is in fact correct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37471 91177308-0d34-0410-b5e6-96231b3b80d8
* Lots of bug fixes.Evan Cheng2007-06-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37467 91177308-0d34-0410-b5e6-96231b3b80d8
* If a unconditional branch is added to branch to the false path during ifcvt, ↵Evan Cheng2007-06-06
| | | | | | the predicated block cannot be iteratively ifcvted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37456 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor statistics counting bug.Evan Cheng2007-06-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37451 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a couple of typos and be smarter about order of blocks when ifcvt a diamond.Evan Cheng2007-06-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37449 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix diamond shape ifcvt bugs.Evan Cheng2007-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37444 91177308-0d34-0410-b5e6-96231b3b80d8
* ReplaceUsesOfBlockWith() can modify the predecessors list.Evan Cheng2007-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37441 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not ifcvt if either true / false path is a backedge. Not profitable in ↵Evan Cheng2007-06-05
| | | | | | almost all cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37440 91177308-0d34-0410-b5e6-96231b3b80d8
* I had a senior moment.Evan Cheng2007-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37433 91177308-0d34-0410-b5e6-96231b3b80d8
* If the predicated block requires an early exit, end the block there and add ↵Evan Cheng2007-06-05
| | | | | | a unconditional branch to false block. AnalyzeBranch() does not understand early exits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37430 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some subtle bugs: bug during succeessor copying; incorrectly updating ↵Evan Cheng2007-06-05
| | | | | | states of ifcvted blocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37429 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot to check for if iterator reached the end.Evan Cheng2007-06-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37420 91177308-0d34-0410-b5e6-96231b3b80d8
* Let IfConverter loose. Allow more aggressive subsumptions; reorder basic ↵Evan Cheng2007-06-04
| | | | | | blocks to expose more ifcvt opportunities; code clean up and fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37409 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly mark early-exit on the false path.Evan Cheng2007-06-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37387 91177308-0d34-0410-b5e6-96231b3b80d8
* Ifcvt triangle: don't ifcvt 'true' BB if it has other predecessors; don't ↵Evan Cheng2007-06-01
| | | | | | merge 'false' BB if it has other predecessors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37382 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a bogus check. Even terminators in a ifcvt need to be predicated. ↵Evan Cheng2007-06-01
| | | | | | Unconditional branches can usually be converted to conditional ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37380 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow multiple ifcvt candidates to share children blocks; add some debugging ↵Evan Cheng2007-06-01
| | | | | | code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37379 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo.Evan Cheng2007-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37374 91177308-0d34-0410-b5e6-96231b3b80d8
* Change traversal order to bottom up in preparation for more aggressive ↵Evan Cheng2007-05-30
| | | | | | if-conversion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37365 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't merge in tail block of a diamond if it has more than one predecessors ↵Evan Cheng2007-05-29
| | | | | | after if-conversion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37353 91177308-0d34-0410-b5e6-96231b3b80d8
* If there is an empty block between a source and its successor block, it ↵Evan Cheng2007-05-29
| | | | | | still requires a unconditional branch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37344 91177308-0d34-0410-b5e6-96231b3b80d8
* Silly boog.Evan Cheng2007-05-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37328 91177308-0d34-0410-b5e6-96231b3b80d8
* Preliminary iterative if-conversion support.Evan Cheng2007-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37309 91177308-0d34-0410-b5e6-96231b3b80d8