aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/IPO/InlineSimple.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-03-09 22:17:11 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-03-09 22:17:11 +0000
commitb6c1eccaf3026398325efd7ccb7dbdeae543f281 (patch)
tree5f9ace0d4d1020a7c8ee1823facc4e56147ede6b /lib/Transforms/IPO/InlineSimple.cpp
parent2349265ef44c9b457069e066c08dd5ee23e0a537 (diff)
downloadexternal_llvm-b6c1eccaf3026398325efd7ccb7dbdeae543f281.zip
external_llvm-b6c1eccaf3026398325efd7ccb7dbdeae543f281.tar.gz
external_llvm-b6c1eccaf3026398325efd7ccb7dbdeae543f281.tar.bz2
Try to keep the cached inliner costs around for a bit longer for big functions.
The Caller cost info would be reset everytime a callee was inlined. If the caller has lots of calls and there is some mutual recursion going on, the caller cost info could be calculated many times. This patch reduces inliner runtime from 240s to 0.5s for a function with 20000 small function calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98089 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp
index 598043d..46cf4b2 100644
--- a/lib/Transforms/IPO/InlineSimple.cpp
+++ b/lib/Transforms/IPO/InlineSimple.cpp
@@ -45,6 +45,9 @@ namespace {
void resetCachedCostInfo(Function *Caller) {
CA.resetCachedCostInfo(Caller);
}
+ void growCachedCostInfo(Function* Caller, Function* Callee) {
+ CA.growCachedCostInfo(Caller, Callee);
+ }
virtual bool doInitialization(CallGraph &CG);
};
}