Remove dead code.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 26 Jan 2010 21:31:30 +0000 (21:31 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 26 Jan 2010 21:31:30 +0000 (21:31 +0000)
Functions containing indirectbr are marked NeverInline by analyzeBasicBlock(),
so there is no point in giving indirectbr special treatment in
CountCodeReductionForConstant. It is never called.

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94590 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/InlineCost.cpp

index 595d41c3418399333e3af9b28c2a2f7031573d34..ddf78a2ac0c4115349dabbd369f08ed111b8a152 100644 (file)
@@ -31,9 +31,6 @@ unsigned InlineCostAnalyzer::FunctionInfo::
       // Eliminating a switch is a big win, proportional to the number of edges
       // deleted.
       Reduction += (SI->getNumSuccessors()-1) * 40;
-    else if (isa<IndirectBrInst>(*UI))
-      // Eliminating an indirect branch is a big win.
-      Reduction += 200;
     else if (CallInst *CI = dyn_cast<CallInst>(*UI)) {
       // Turning an indirect call into a direct call is a BIG win
       Reduction += CI->getCalledValue() == V ? 500 : 0;