summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-03-09 00:59:53 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-03-09 00:59:53 +0000
commitd62c2f554c742e3113adb1d4b02e43d1332f172c (patch)
treede07087da76953067354f28b4f2060a99dbbd420
parent1d9eb4667dad56d624649d3fd1635f157efe7d4d (diff)
downloadbcm5719-llvm-d62c2f554c742e3113adb1d4b02e43d1332f172c.tar.gz
bcm5719-llvm-d62c2f554c742e3113adb1d4b02e43d1332f172c.zip
Add inlining threshold to log output.
llvm-svn: 98024
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 752a97c99c0..3d0309f87cf 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -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;
}
OpenPOWER on IntegriCloud