summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/Inliner.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-01-09 01:30:11 +0000
committerDale Johannesen <dalej@apple.com>2009-01-09 01:30:11 +0000
commit4755d9df786f8fd699fc4aee988c74af4c8ea8f6 (patch)
treeb996f491b4cbf0da17e925b4ec3137d355858254 /llvm/lib/Transforms/IPO/Inliner.cpp
parentf4c6616d9dd65a0c364d80ade1dd5618457e8d82 (diff)
downloadbcm5719-llvm-4755d9df786f8fd699fc4aee988c74af4c8ea8f6.tar.gz
bcm5719-llvm-4755d9df786f8fd699fc4aee988c74af4c8ea8f6.zip
Adjustments to last patch based on review.
llvm-svn: 61969
Diffstat (limited to 'llvm/lib/Transforms/IPO/Inliner.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index f97fce6e06c..639f3a84cb5 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -185,9 +185,14 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
// try to do so.
CallSite CS = CallSites[CSi];
if (shouldInline(CS)) {
+ Function *Caller = CS.getCaller();
// Attempt to inline the function...
if (InlineCallIfPossible(CS, CG, SCCFunctions,
getAnalysis<TargetData>())) {
+ // Remove any cached cost info for this caller, as inlining the callee
+ // has increased the size of the caller.
+ resetCachedCostInfo(Caller);
+
// Remove this call site from the list. If possible, use
// swap/pop_back for efficiency, but do not use it if doing so would
// move a call site to a function in this SCC before the
OpenPOWER on IntegriCloud