From: Chandler Carruth Date: Sun, 22 Jan 2017 10:33:54 +0000 (+0000) Subject: [PM] Improve the debug logging to always include the IR unit's name when X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71ffb16af64936a7c6ec911655512dc8f0f55c4d;p=llvm [PM] Improve the debug logging to always include the IR unit's name when logging pass and analyses information. This is particularly useful when filtering the debug log for a particular function or loop where something got inappropriately cached. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292755 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/PassManager.h b/include/llvm/IR/PassManager.h index 0825ed713ac..61b6278ea0b 100644 --- a/include/llvm/IR/PassManager.h +++ b/include/llvm/IR/PassManager.h @@ -791,7 +791,7 @@ public: if (DebugLogging) dbgs() << "Invalidating analysis: " << this->lookUpPass(ID).name() - << "\n"; + << " on " << IR.getName() << "\n"; I = ResultsList.erase(I); AnalysisResults.erase({ID, &IR}); @@ -832,7 +832,8 @@ private: if (Inserted) { auto &P = this->lookUpPass(ID); if (DebugLogging) - dbgs() << "Running analysis: " << P.name() << "\n"; + dbgs() << "Running analysis: " << P.name() << " on " << IR.getName() + << "\n"; AnalysisResultListT &ResultList = AnalysisResultLists[&IR]; ResultList.emplace_back(ID, P.run(IR, *this, ExtraArgs...)); @@ -863,7 +864,7 @@ private: if (DebugLogging) dbgs() << "Invalidating analysis: " << this->lookUpPass(ID).name() - << "\n"; + << " on " << IR.getName() << "\n"; AnalysisResultLists[&IR].erase(RI->second); AnalysisResults.erase(RI); }