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 | 6ebf7bc7405ee79d27d50b70f0c1a474cbea820d (patch) | |
tree | fd3f08887870223c52e3eb8cb257c4377eaeb8bd /lib/CodeGen | |
parent | be1be5ef0d5a2bb52746b6bd69d4b1e88513c81a (diff) | |
download | external_llvm-6ebf7bc7405ee79d27d50b70f0c1a474cbea820d.zip external_llvm-6ebf7bc7405ee79d27d50b70f0c1a474cbea820d.tar.gz external_llvm-6ebf7bc7405ee79d27d50b70f0c1a474cbea820d.tar.bz2 |
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
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CodePlacementOpt.cpp | 3 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/TargetLowering.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CodePlacementOpt.cpp b/lib/CodeGen/CodePlacementOpt.cpp index 61a8b12..919ee54 100644 --- a/lib/CodeGen/CodePlacementOpt.cpp +++ b/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/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index d7abd32..1bb3959 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/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; |