From: David Callahan Date: Wed, 9 Jan 2019 19:12:38 +0000 (+0000) Subject: refactor BlockFrequencyInfo::view to take a title parameter X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e6a4a6f5c98613d029e3e6f28bd4b8a8568b3b6;p=llvm refactor BlockFrequencyInfo::view to take a title parameter Summary: All a non-default title for the debugging this debugging aide Reviewers: twoh, Kader, modocache Reviewed By: twoh Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56499 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350749 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/BlockFrequencyInfo.h b/include/llvm/Analysis/BlockFrequencyInfo.h index ca12db6208b..0b261873569 100644 --- a/include/llvm/Analysis/BlockFrequencyInfo.h +++ b/include/llvm/Analysis/BlockFrequencyInfo.h @@ -56,7 +56,7 @@ public: const Function *getFunction() const; const BranchProbabilityInfo *getBPI() const; - void view() const; + void view(StringRef = "BlockFrequencyDAGs") const; /// getblockFreq - Return block frequency. Return 0 if we don't have the /// information. Please note that initial frequency is equal to ENTRY_FREQ. It diff --git a/lib/Analysis/BlockFrequencyInfo.cpp b/lib/Analysis/BlockFrequencyInfo.cpp index 41c29589521..ef27c36517e 100644 --- a/lib/Analysis/BlockFrequencyInfo.cpp +++ b/lib/Analysis/BlockFrequencyInfo.cpp @@ -252,8 +252,8 @@ void BlockFrequencyInfo::setBlockFreqAndScale( /// Pop up a ghostview window with the current block frequency propagation /// rendered using dot. -void BlockFrequencyInfo::view() const { - ViewGraph(const_cast(this), "BlockFrequencyDAGs"); +void BlockFrequencyInfo::view(StringRef title) const { + ViewGraph(const_cast(this), title); } const Function *BlockFrequencyInfo::getFunction() const {