aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/IPO/InlinerPass.h5
-rw-r--r--include/llvm/Transforms/Utils/InlineCost.h5
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;
+ }
};
}