Run code placement optimization for targets that want it (arm and x86 for now).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2009-05-13 21:42:09 +00:00
parent be1be5ef0d
commit 6ebf7bc740
5 changed files with 17 additions and 0 deletions

View File

@ -104,6 +104,9 @@ FunctionPass *llvm::createCodePlacementOptPass() {
/// jcc <cond> C, [exit]
///
bool CodePlacementOpt::OptimizeIntraLoopEdges() {
if (!TLI->shouldOptimizeCodePlacement())
return false;
bool Changed = false;
for (unsigned i = 0, e = UncondJmpMBBs.size(); i != e; ++i) {
MachineBasicBlock *MBB = UncondJmpMBBs[i].first;