on RAUW of functions, this is a correctness issue instead of a mere memory
usage problem.
No testcase until the new MergeFunctions can land.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103653
91177308-0d34-0410-b5e6-
96231b3b80d8
/// has been inlined. If Callee is NULL it means a dead call has been
/// eliminated.
void growCachedCostInfo(Function* Caller, Function* Callee);
+
+ /// clear - empty the cache of inline costs
+ void clear();
};
/// callIsSmall - If a call is likely to lower to a single target instruction,
else
CallerMetrics.NumInsts = 0;
- // We are not updating the argumentweights. We have already determined that
+ // We are not updating the argument weights. We have already determined that
// Caller is a fairly large function, so we accept the loss of precision.
}
+
+/// clear - empty the cache of inline costs
+void InlineCostAnalyzer::clear() {
+ CachedFunctionInfo.clear();
+}
CA.growCachedCostInfo(Caller, Callee);
}
virtual bool doInitialization(CallGraph &CG);
+ void releaseMemory() {
+ CA.clear();
+ }
};
}