diff options
author | Dale Johannesen <dalej@apple.com> | 2009-01-09 01:30:11 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-01-09 01:30:11 +0000 |
commit | e345566f8eaeeda45e29e3709114a42209a360cc (patch) | |
tree | f8b39f7bf252361ce3898f38b9c38ca9b5b0d11e /include/llvm/Transforms | |
parent | 24c047fa6b754df69f33295fd74fd408532d7beb (diff) |
Adjustments to last patch based on review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r-- | include/llvm/Transforms/IPO/InlinerPass.h | 5 | ||||
-rw-r--r-- | include/llvm/Transforms/Utils/InlineCost.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Transforms/IPO/InlinerPass.h b/include/llvm/Transforms/IPO/InlinerPass.h index 7c3632fdce..3aed6494b7 100644 --- a/include/llvm/Transforms/IPO/InlinerPass.h +++ b/include/llvm/Transforms/IPO/InlinerPass.h @@ -61,6 +61,11 @@ struct Inliner : public CallGraphSCCPass { /// virtual float getInlineFudgeFactor(CallSite CS) = 0; + /// resetCachedCostInfo - erase any cached cost data from the derived class. + /// If the derived class has no such data this can be empty. + /// + virtual void resetCachedCostInfo(Function* Caller) = 0; + /// removeDeadFunctions - Remove dead functions that are not included in /// DNR (Do Not Remove) list. bool removeDeadFunctions(CallGraph &CG, diff --git a/include/llvm/Transforms/Utils/InlineCost.h b/include/llvm/Transforms/Utils/InlineCost.h index 415fc1e91b..d78a0f0818 100644 --- a/include/llvm/Transforms/Utils/InlineCost.h +++ b/include/llvm/Transforms/Utils/InlineCost.h @@ -128,6 +128,11 @@ namespace llvm { /// getInlineFudgeFactor - Return a > 1.0 factor if the inliner should use a /// higher threshold to determine if the function call should be inlined. float getInlineFudgeFactor(CallSite CS); + + /// resetCachedFunctionInfo - erase any cached cost info for this function. + void resetCachedCostInfo(Function* Caller) { + CachedFunctionInfo[Caller].NumBlocks = 0; + } }; } |