diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-11-30 18:35:03 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-11-30 18:35:03 +0000 |
commit | 15217e63bce6c161b355b63d6496c7c327d15817 (patch) | |
tree | 79b92778bd4803ab19b5437742f094c8a3c669e7 /lib/CodeGen/TailDuplication.cpp | |
parent | afa1df467b04182c959e6c3031df5377a0062153 (diff) | |
download | external_llvm-15217e63bce6c161b355b63d6496c7c327d15817.zip external_llvm-15217e63bce6c161b355b63d6496c7c327d15817.tar.gz external_llvm-15217e63bce6c161b355b63d6496c7c327d15817.tar.bz2 |
Remove isProfitableToDuplicateIndirectBranch target hook. It is profitable
for all the processors where I have tried it, and even when it might not help
performance, the cost is quite low. The opportunities for duplicating
indirect branches are limited by other factors so code size does not change
much due to tail duplicating indirect branches aggressively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TailDuplication.cpp')
-rw-r--r-- | lib/CodeGen/TailDuplication.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/TailDuplication.cpp b/lib/CodeGen/TailDuplication.cpp index 12610b0..68fa209 100644 --- a/lib/CodeGen/TailDuplication.cpp +++ b/lib/CodeGen/TailDuplication.cpp @@ -118,8 +118,7 @@ bool TailDuplicatePass::TailDuplicate(MachineBasicBlock *TailBB, unsigned MaxDuplicateCount; if (MF.getFunction()->hasFnAttr(Attribute::OptimizeForSize)) MaxDuplicateCount = 1; - else if (TII->isProfitableToDuplicateIndirectBranch() && - !TailBB->empty() && TailBB->back().getDesc().isIndirectBranch()) + else if (!TailBB->empty() && TailBB->back().getDesc().isIndirectBranch()) // If the target has hardware branch prediction that can handle indirect // branches, duplicating them can often make them predictable when there // are common paths through the code. The limit needs to be high enough |