Add inlining threshold to log output.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 9 Mar 2010 00:59:53 +0000 (00:59 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 9 Mar 2010 00:59:53 +0000 (00:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98024 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/Inliner.cpp

index 752a97c99c05ffd4ad31415ec471ffd0e104f0dc..3d0309f87cf950ba0d2ab258ab1bed72421df571 100644 (file)
@@ -219,8 +219,10 @@ bool Inliner::shouldInline(CallSite CS) {
   Function *Caller = CS.getCaller();
   int CurrentThreshold = getInlineThreshold(CS);
   float FudgeFactor = getInlineFudgeFactor(CS);
-  if (Cost >= (int)(CurrentThreshold * FudgeFactor)) {
+  int AdjThreshold = (int)(CurrentThreshold * FudgeFactor);
+  if (Cost >= AdjThreshold) {
     DEBUG(dbgs() << "    NOT Inlining: cost=" << Cost
+          << ", thres=" << AdjThreshold
           << ", Call: " << *CS.getInstruction() << "\n");
     return false;
   }
@@ -285,6 +287,7 @@ bool Inliner::shouldInline(CallSite CS) {
   }
 
   DEBUG(dbgs() << "    Inlining: cost=" << Cost
+        << ", thres=" << AdjThreshold
         << ", Call: " << *CS.getInstruction() << '\n');
   return true;
 }