[llvm-commits] [llvm] r98024 - /llvm/trunk/lib/Transforms/IPO/Inliner.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Mar 8 16:59:53 PST 2010
Author: stoklund
Date: Mon Mar 8 18:59:53 2010
New Revision: 98024
URL: http://llvm.org/viewvc/llvm-project?rev=98024&view=rev
Log:
Add inlining threshold to log output.
Modified:
llvm/trunk/lib/Transforms/IPO/Inliner.cpp
Modified: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Inliner.cpp?rev=98024&r1=98023&r2=98024&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Inliner.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp Mon Mar 8 18:59:53 2010
@@ -219,8 +219,10 @@
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 @@
}
DEBUG(dbgs() << " Inlining: cost=" << Cost
+ << ", thres=" << AdjThreshold
<< ", Call: " << *CS.getInstruction() << '\n');
return true;
}
More information about the llvm-commits
mailing list