[llvm-commits] [llvm] r94590 - /llvm/trunk/lib/Analysis/InlineCost.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Jan 26 13:31:30 PST 2010


Author: stoklund
Date: Tue Jan 26 15:31:30 2010
New Revision: 94590

URL: http://llvm.org/viewvc/llvm-project?rev=94590&view=rev
Log:
Remove dead code.

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.

Modified:
    llvm/trunk/lib/Analysis/InlineCost.cpp

Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=94590&r1=94589&r2=94590&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Tue Jan 26 15:31:30 2010
@@ -31,9 +31,6 @@
       // 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;





More information about the llvm-commits mailing list