From 15217e63bce6c161b355b63d6496c7c327d15817 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Mon, 30 Nov 2009 18:35:03 +0000 Subject: 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 --- lib/CodeGen/TailDuplication.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/TailDuplication.cpp b/lib/CodeGen/TailDuplication.cpp index 12610b0271..68fa2099c8 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 -- cgit v1.2.3-70-g09d2