summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/IfConversion.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update gcc 4.3 warnings fix patch with recent head changesAnton Korobeynikov2008-02-201-1/+2
| | | | llvm-svn: 47368
* Use empty() instead of comparing size() with zero.Dan Gohman2008-01-291-3/+3
| | | | llvm-svn: 46514
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-7/+7
| | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
* simplify some code using new predicatesChris Lattner2008-01-071-21/+19
| | | | llvm-svn: 45689
* Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflectsChris Lattner2008-01-071-10/+8
| | | | | | | | | | | | | | | that it is cheap and efficient to get. Move a variety of predicates from TargetInstrInfo into TargetInstrDescriptor, which makes it much easier to query a predicate when you don't have TII around. Now you can use MI->getDesc()->isBranch() instead of going through TII, and this is much more efficient anyway. Not all of the predicates have been moved over yet. Update old code that used MI->getInstrDescriptor()->Flags to use the new predicates in many places. llvm-svn: 45674
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Somehow this wasn't committed last time. M_CLOBBERS_PRED is gone.Evan Cheng2007-07-101-2/+5
| | | | llvm-svn: 38495
* Teach if-conversion about instructions that were already predicated, e.g. ↵Evan Cheng2007-07-061-3/+14
| | | | | | conditional move. llvm-svn: 37964
* Avoid if-converting simple block that ends with unconditional branch or ↵Evan Cheng2007-06-191-1/+4
| | | | | | fallthrough unless it branches / falls to the 'false' block. Not profitable, may end up increasing code size. llvm-svn: 37660
* Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit.Evan Cheng2007-06-191-2/+2
| | | | llvm-svn: 37643
* Fix some fragile code wrt CFG edge updating.Evan Cheng2007-06-181-74/+39
| | | | llvm-svn: 37634
* Properly remove duplicate instructions as result of diamond if-conversion. ↵Evan Cheng2007-06-181-103/+176
| | | | | | Other bug fixes. llvm-svn: 37623
* Really turn if-converter loose:Evan Cheng2007-06-161-166/+211
| | | | | | | | | | 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. llvm-svn: 37613
* Not every predicable block can be safely duplicated.Evan Cheng2007-06-151-8/+35
| | | | llvm-svn: 37607
* MachineInstr::isPredicable() is no longer needed.Evan Cheng2007-06-151-6/+5
| | | | llvm-svn: 37599
* Extra edges are deleted later if needed.Evan Cheng2007-06-151-1/+0
| | | | llvm-svn: 37593
* Allow small blocks to be duplicated to enable if-conversion.Evan Cheng2007-06-151-25/+99
| | | | llvm-svn: 37590
* No really, clear predcessors states.Evan Cheng2007-06-141-7/+8
| | | | llvm-svn: 37581
* If BB is predicated, invalidate its predecessor(s) which would if-convert ↵Evan Cheng2007-06-141-3/+7
| | | | | | it. It needs to be re-analyzed. llvm-svn: 37580
* Fix typo.Evan Cheng2007-06-141-1/+1
| | | | llvm-svn: 37577
* Fix some stupid bugs that have effectively disabled if-conversion.Evan Cheng2007-06-141-1/+7
| | | | llvm-svn: 37575
* TypoEvan Cheng2007-06-131-1/+1
| | | | llvm-svn: 37566
* Now if-converting all 4 variants of triangles.Evan Cheng2007-06-121-24/+40
| | | | llvm-svn: 37565
* Restructure code to reduce ifcvt compile time cost.Evan Cheng2007-06-111-155/+193
| | | | llvm-svn: 37543
* Fix the build.Reid Spencer2007-06-101-1/+2
| | | | llvm-svn: 37537
* Don't change CFG during analysis stage. Do so during ifcvt and invalidate ↵Evan Cheng2007-06-091-56/+106
| | | | | | predecessors accordingly. llvm-svn: 37531
* Carefully remove extraneous CFG edges after each ifcvt.Evan Cheng2007-06-081-24/+51
| | | | llvm-svn: 37529
* Correct transfer predicate information.Evan Cheng2007-06-081-8/+6
| | | | llvm-svn: 37524
* Hidden options to help debugging ifcvt issues.Evan Cheng2007-06-081-2/+32
| | | | llvm-svn: 37523
* Allow more cmp / bcc to be predicated; clean up triangle ifcvt checking code.Evan Cheng2007-06-081-144/+135
| | | | llvm-svn: 37518
* Only remove the edge from entry to false if false block is merged.Evan Cheng2007-06-071-2/+2
| | | | llvm-svn: 37503
* ifcvt a triangle: don't merge ifcvt block with rejoin block if it can fall ↵Evan Cheng2007-06-071-17/+29
| | | | | | through to it. If merged, the resulting block is not a candidate for iterative ifcvting since it contains both predicated and non-predicated code. llvm-svn: 37487
* Lots of bug fixes. Now finally in a reasonable state.Evan Cheng2007-06-071-78/+104
| | | | llvm-svn: 37485
* Quick patch to fix the build, based on what it appears Evan meant to write.Owen Anderson2007-06-061-1/+1
| | | | | | Evan, please check that this is in fact correct. llvm-svn: 37471
* Lots of bug fixes.Evan Cheng2007-06-061-40/+76
| | | | llvm-svn: 37467
* If a unconditional branch is added to branch to the false path during ifcvt, ↵Evan Cheng2007-06-061-6/+33
| | | | | | the predicated block cannot be iteratively ifcvted. llvm-svn: 37456
* Minor statistics counting bug.Evan Cheng2007-06-061-3/+5
| | | | llvm-svn: 37451
* Fix a couple of typos and be smarter about order of blocks when ifcvt a diamond.Evan Cheng2007-06-061-17/+30
| | | | llvm-svn: 37449
* Fix diamond shape ifcvt bugs.Evan Cheng2007-06-051-61/+41
| | | | llvm-svn: 37444
* ReplaceUsesOfBlockWith() can modify the predecessors list.Evan Cheng2007-06-051-3/+4
| | | | llvm-svn: 37441
* Do not ifcvt if either true / false path is a backedge. Not profitable in ↵Evan Cheng2007-06-051-0/+3
| | | | | | almost all cases. llvm-svn: 37440
* I had a senior moment.Evan Cheng2007-06-051-3/+4
| | | | llvm-svn: 37433
* If the predicated block requires an early exit, end the block there and add ↵Evan Cheng2007-06-051-2/+3
| | | | | | a unconditional branch to false block. AnalyzeBranch() does not understand early exits. llvm-svn: 37430
* Fix some subtle bugs: bug during succeessor copying; incorrectly updating ↵Evan Cheng2007-06-051-20/+19
| | | | | | states of ifcvted blocks. llvm-svn: 37429
* Forgot to check for if iterator reached the end.Evan Cheng2007-06-041-1/+2
| | | | llvm-svn: 37420
* Let IfConverter loose. Allow more aggressive subsumptions; reorder basic ↵Evan Cheng2007-06-041-196/+264
| | | | | | blocks to expose more ifcvt opportunities; code clean up and fixes. llvm-svn: 37409
* Correctly mark early-exit on the false path.Evan Cheng2007-06-011-8/+9
| | | | llvm-svn: 37387
* Ifcvt triangle: don't ifcvt 'true' BB if it has other predecessors; don't ↵Evan Cheng2007-06-011-3/+18
| | | | | | merge 'false' BB if it has other predecessors. llvm-svn: 37382
* Remove a bogus check. Even terminators in a ifcvt need to be predicated. ↵Evan Cheng2007-06-011-3/+1
| | | | | | Unconditional branches can usually be converted to conditional ones. llvm-svn: 37380
* Allow multiple ifcvt candidates to share children blocks; add some debugging ↵Evan Cheng2007-06-011-7/+20
| | | | | | code. llvm-svn: 37379
OpenPOWER on IntegriCloud