diff options
author | Diego Novillo <dnovillo@google.com> | 2015-11-23 16:30:17 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@google.com> | 2015-11-23 16:30:17 +0000 |
commit | 1ca881c4bbbe32213e435c050255b02764ea2004 (patch) | |
tree | 4a9586483da1e8d73e483dda8065a3c4e0cf24b3 | |
parent | 3280793234d1feb348596726ef2ee0cf1e6593d2 (diff) | |
download | bcm5719-llvm-1ca881c4bbbe32213e435c050255b02764ea2004.tar.gz bcm5719-llvm-1ca881c4bbbe32213e435c050255b02764ea2004.zip |
SamplePGO - Clear coverage tracking when clearing per-function data.
llvm-svn: 253877
-rw-r--r-- | llvm/lib/Transforms/IPO/SampleProfile.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index 20bfac954a5..de4170692fe 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -188,6 +188,7 @@ public: unsigned computeCoverage(unsigned Used, unsigned Total) const; unsigned countUsedSamples(const FunctionSamples *Samples) const; unsigned countBodySamples(const FunctionSamples *Samples) const; + void clear() { SampleCoverage.clear(); } private: typedef DenseMap<LineLocation, unsigned> BodySampleCoverageMap; @@ -285,6 +286,7 @@ void SampleProfileLoader::clearFunctionData() { LI = nullptr; Predecessors.clear(); Successors.clear(); + CoverageTracker.clear(); } /// \brief Returns the offset of lineno \p L to head_lineno \p H |