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

Eric Christopher echristo at apple.com
Sat Jan 22 13:56:53 PST 2011


Author: echristo
Date: Sat Jan 22 15:56:53 2011
New Revision: 124045

URL: http://llvm.org/viewvc/llvm-project?rev=124045&view=rev
Log:
Add a FIXME explaining the move to a single indirect call bonus per function
that we can change from indirect to direct.

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=124045&r1=124044&r2=124045&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Sat Jan 22 15:56:53 2011
@@ -189,6 +189,11 @@
     }
   }
   
+  // FIXME: The only reason we're applying the bonus once is while it's great
+  // to devirtualize calls the magnitude of the bonus x number of call sites
+  // can lead to a huge code explosion when we prefer to inline 1000 instruction
+  // functions that have 10 call sites. This should be made a function of the
+  // estimated inline penalty/benefit + the indirect call bonus.
   if (indirectCallBonus) Bonus += InlineConstants::IndirectCallBonus;
   
   return Bonus;





More information about the llvm-commits mailing list