summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BranchFolding.h
Commit message (Collapse)AuthorAgeFilesLines
* Tail merging pass shall not break up IT blocks. rdar://8115404Evan Cheng2010-06-221-2/+3
| | | | llvm-svn: 106517
* Split tail duplication into a separate pass. This is needed to avoidBob Wilson2009-11-261-8/+0
| | | | | | | | | running tail duplication when doing branch folding for if-conversion, and we also want to be able to run tail duplication earlier to fix some reg alloc problems. Move the CanFallThrough function from BranchFolding to MachineBasicBlock so that it can be shared by TailDuplication. llvm-svn: 89904
* Perform tail duplication only once, after tail merging is complete.Bob Wilson2009-11-171-3/+2
| | | | | | | It was too difficult to keep the heuristics for merging and duplication consistent. llvm-svn: 89105
* Make the BranchFolderPass class local to BranchFolding.cpp.Dan Gohman2009-11-121-14/+1
| | | | llvm-svn: 86928
* Promote MergePotentialsElt and SameTailElt to be regular classesDan Gohman2009-11-111-2/+49
| | | | | | | instead of typedefs for std::pair. This simplifies the type of SameTails, which previously was std::vector<std::pair<std::vector<std::pair<unsigned, MachineBasicBlock *> >::iterator, MachineBasicBlock::iterator> llvm-svn: 86885
* Check in the changes to this file too.Dan Gohman2009-11-111-3/+9
| | | | llvm-svn: 86873
* Revert r85346 change to control tail merging by CodeGenOpt::Level.Bob Wilson2009-10-281-7/+3
| | | | | | I'm going to redo this using the OptimizeForSize function attribute. llvm-svn: 85426
* Record CodeGen optimization level in the BranchFolding pass so that we canBob Wilson2009-10-271-3/+7
| | | | | | | | | | | | | | | | use it to control tail merging when there is a tradeoff between performance and code size. When there is only 1 instruction in the common tail, we have been merging. That can be good for code size but is a definite loss for performance. Now we will avoid tail merging in that case when the optimization level is "Aggressive", i.e., "-O3". Radar 7338114. Since the IfConversion pass invokes BranchFolding, it too needs to know the optimization level. Note that I removed the RegisterPass instantiation for IfConversion because it required a default constructor. If someone wants to keep that for some reason, we can add a default constructor with a hard-wired optimization level. llvm-svn: 85346
* Run branch folding if if-converter make some transformations.Evan Cheng2009-09-041-0/+84
llvm-svn: 80994
OpenPOWER on IntegriCloud