diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-05-13 21:42:09 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-05-13 21:42:09 +0000 |
commit | ab0d23396a79022051e5699ef26bd0367ce11a5d (patch) | |
tree | 7bf0924e0742a7ea2798b6a16326d22967be2dd7 /llvm/lib/CodeGen | |
parent | ffe4e63b408582f55b273224ba3a92309758ef6a (diff) | |
download | bcm5719-llvm-ab0d23396a79022051e5699ef26bd0367ce11a5d.tar.gz bcm5719-llvm-ab0d23396a79022051e5699ef26bd0367ce11a5d.zip |
Run code placement optimization for targets that want it (arm and x86 for now).
llvm-svn: 71726
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/CodePlacementOpt.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/CodePlacementOpt.cpp b/llvm/lib/CodeGen/CodePlacementOpt.cpp index 61a8b12860a..919ee54fb3f 100644 --- a/llvm/lib/CodeGen/CodePlacementOpt.cpp +++ b/llvm/lib/CodeGen/CodePlacementOpt.cpp @@ -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; diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index d7abd32727b..1bb3959e68f 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -483,6 +483,7 @@ TargetLowering::TargetLowering(TargetMachine &tm) memset(TargetDAGCombineArray, 0, array_lengthof(TargetDAGCombineArray)); maxStoresPerMemset = maxStoresPerMemcpy = maxStoresPerMemmove = 8; allowUnalignedMemoryAccesses = false; + benefitFromCodePlacementOpt = false; UseUnderscoreSetJmp = false; UseUnderscoreLongJmp = false; SelectIsExpensive = false; |