mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-01 08:12:12 +00:00
Clear CachedFunctionInfo upon Pass::releaseMemory. Because ValueMap will abort
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
This commit is contained in:
parent
bd4fa2efd3
commit
9a1581b910
@ -198,6 +198,9 @@ namespace llvm {
|
||||
/// 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,
|
||||
|
@ -455,6 +455,11 @@ InlineCostAnalyzer::growCachedCostInfo(Function *Caller, Function *Callee) {
|
||||
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();
|
||||
}
|
||||
|
@ -49,6 +49,9 @@ namespace {
|
||||
CA.growCachedCostInfo(Caller, Callee);
|
||||
}
|
||||
virtual bool doInitialization(CallGraph &CG);
|
||||
void releaseMemory() {
|
||||
CA.clear();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user