aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms/IPO
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
commit9e5d87d568498db251de19cd3c26d02cc74bb2e1 (patch)
tree5f9ace0d4d1020a7c8ee1823facc4e56147ede6b /include/llvm/Transforms/IPO
parent74a684222d45b4d9eb3986a10c92c9ec67378568 (diff)
downloadexternal_llvm-9e5d87d568498db251de19cd3c26d02cc74bb2e1.zip
external_llvm-9e5d87d568498db251de19cd3c26d02cc74bb2e1.tar.gz
external_llvm-9e5d87d568498db251de19cd3c26d02cc74bb2e1.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 'include/llvm/Transforms/IPO')
-rw-r--r--include/llvm/Transforms/IPO/InlinerPass.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Transforms/IPO/InlinerPass.h b/include/llvm/Transforms/IPO/InlinerPass.h
index 30ece0e..c5be59a 100644
--- a/include/llvm/Transforms/IPO/InlinerPass.h
+++ b/include/llvm/Transforms/IPO/InlinerPass.h
@@ -75,6 +75,10 @@ struct Inliner : public CallGraphSCCPass {
///
virtual void resetCachedCostInfo(Function* Caller) = 0;
+ /// growCachedCostInfo - update the cached cost info for Caller after Callee
+ /// has been inlined.
+ virtual void growCachedCostInfo(Function* Caller, Function* Callee) = 0;
+
/// removeDeadFunctions - Remove dead functions that are not included in
/// DNR (Do Not Remove) list.
bool removeDeadFunctions(CallGraph &CG,