summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/InlineSimple.cpp
diff options
context:
space:
mode:
authorEaswaran Raman <eraman@google.com>2017-01-20 22:44:04 +0000
committerEaswaran Raman <eraman@google.com>2017-01-20 22:44:04 +0000
commit12585b0148a104dad35feed91f440836b2a97623 (patch)
treea006d63085616b0253c1e68b99116de08fce9c95 /llvm/lib/Transforms/IPO/InlineSimple.cpp
parent760ad4da6006422c5a6097232b5ffc72d6b906dd (diff)
downloadbcm5719-llvm-12585b0148a104dad35feed91f440836b2a97623.tar.gz
bcm5719-llvm-12585b0148a104dad35feed91f440836b2a97623.zip
Improve PGO support for the new inliner
This adds the following to the new PM based inliner in PGO mode: * Use block frequency analysis to derive callsite's profile count and use that to adjust thresholds of hot and cold callsites. * Incrementally update the BFI of the caller after a callee gets inlined into it. This incremental update is only within an invocation of the run method - BFI is not preserved across calls to run. Update the function entry count of the callee after inlining it into a caller. * I've tuned the thresholds for the hot and cold callsites using a hacked up version of the old inliner that explicitly computes BFI on a set of internal benchmarks and spec. Once the new PM based pipeline stabilizes (IIRC Chandler mentioned there are known issues) I'll benchmark this again and adjust the thresholds if required. Inliner PGO support. Differential revision: https://reviews.llvm.org/D28331 llvm-svn: 292666
Diffstat (limited to 'llvm/lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/InlineSimple.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp
index cdb04c19736..514baa81090 100644
--- a/llvm/lib/Transforms/IPO/InlineSimple.cpp
+++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp
@@ -61,7 +61,8 @@ public:
[&](Function &F) -> AssumptionCache & {
return ACT->getAssumptionCache(F);
};
- return llvm::getInlineCost(CS, Params, TTI, GetAssumptionCache, PSI);
+ return llvm::getInlineCost(CS, Params, TTI, GetAssumptionCache,
+ /*GetBFI=*/None, PSI);
}
bool runOnSCC(CallGraphSCC &SCC) override;
OpenPOWER on IntegriCloud