From 1ca881c4bbbe32213e435c050255b02764ea2004 Mon Sep 17 00:00:00 2001 From: Diego Novillo Date: Mon, 23 Nov 2015 16:30:17 +0000 Subject: SamplePGO - Clear coverage tracking when clearing per-function data. llvm-svn: 253877 --- llvm/lib/Transforms/IPO/SampleProfile.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Transforms') 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 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 -- cgit v1.2.3