llvm.org GIT mirror llvm / 210c690
include function name in dot filename Differential Revision: http://reviews.llvm.org/D29975 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295220 91177308-0d34-0410-b5e6-96231b3b80d8 Xinliang David Li 3 years ago
5 changed file(s) with 10 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
6161
6262 const MachineFunction *getFunction() const;
6363 const MachineBranchProbabilityInfo *getMBPI() const;
64 void view(bool isSimple = true) const;
64 void view(const Twine &Name, bool isSimple = true) const;
6565
6666 // Print the block frequency Freq to OS using the current functions entry
6767 // frequency to convert freq into a relative decimal form.
496496 return MBFI.printBlockFreq(OS, Freq);
497497 }
498498
499 void BranchFolder::MBFIWrapper::view(bool isSimple) { MBFI.view(isSimple); }
499 void BranchFolder::MBFIWrapper::view(const Twine &Name, bool isSimple) {
500 MBFI.view(Name, isSimple);
501 }
500502
501503 uint64_t
502504 BranchFolder::MBFIWrapper::getEntryFreq() const {
121121 const MachineBasicBlock *MBB) const;
122122 raw_ostream &printBlockFreq(raw_ostream &OS,
123123 const BlockFrequency Freq) const;
124 void view(bool isSimple = true);
124 void view(const Twine &Name, bool isSimple = true);
125125 uint64_t getEntryFreq() const;
126126
127127 private:
180180 if (ViewMachineBlockFreqPropagationDAG != GVDT_None &&
181181 (ViewBlockFreqFuncName.empty() ||
182182 F.getName().equals(ViewBlockFreqFuncName))) {
183 view();
183 view("MachineBlockFrequencyDAGS." + F.getName());
184184 }
185185 }
186186
196196
197197 /// Pop up a ghostview window with the current block frequency propagation
198198 /// rendered using dot.
199 void MachineBlockFrequencyInfo::view(bool isSimple) const {
200 // This code is only for debugging.
201 ViewGraph(const_cast(this),
202 "MachineBlockFrequencyDAGs", isSimple);
199 void MachineBlockFrequencyInfo::view(const Twine &Name, bool isSimple) const {
200 // This code is only for debugging.
201 ViewGraph(const_cast(this), Name, isSimple);
203202 }
204203
205204 BlockFrequency
23802380 if (ViewBlockLayoutWithBFI != GVDT_None &&
23812381 (ViewBlockFreqFuncName.empty() ||
23822382 F->getFunction()->getName().equals(ViewBlockFreqFuncName))) {
2383 MBFI->view(false);
2383 MBFI->view("MBP." + MF.getName(), false);
23842384 }
23852385
23862386