Add inlining threshold to log output.

llvm-svn: 98024
This commit is contained in:
Jakob Stoklund Olesen 2010-03-09 00:59:53 +00:00
parent 1d9eb4667d
commit d62c2f554c
1 changed files with 4 additions and 1 deletions

View 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;
}