diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2010-05-12 21:48:15 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2010-05-12 21:48:15 +0000 |
| commit | 5804e5ec731ecf58212bf0125d80ac313315fcc3 (patch) | |
| tree | 0885d4ca5d9e5568f0b25ebd0b0d087bf9dfb9ea /lib/Analysis | |
| parent | 0356a779697358a276908a05ea39ada829bc8336 (diff) | |
| download | external_llvm-5804e5ec731ecf58212bf0125d80ac313315fcc3.zip external_llvm-5804e5ec731ecf58212bf0125d80ac313315fcc3.tar.gz external_llvm-5804e5ec731ecf58212bf0125d80ac313315fcc3.tar.bz2 | |
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
Diffstat (limited to 'lib/Analysis')
| -rw-r--r-- | lib/Analysis/InlineCost.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp index 6271371..10c2d79 100644 --- a/lib/Analysis/InlineCost.cpp +++ b/lib/Analysis/InlineCost.cpp @@ -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(); +} |
