[PATCH] D29975: Include func name in dot file name.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 11:32:44 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL295220: include function name in dot filename (authored by davidxl).

Changed prior to commit:
  https://reviews.llvm.org/D29975?vs=88470&id=88583#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29975

Files:
  llvm/trunk/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
  llvm/trunk/lib/CodeGen/BranchFolding.cpp
  llvm/trunk/lib/CodeGen/BranchFolding.h
  llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp
  llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp


Index: llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp
+++ llvm/trunk/lib/CodeGen/MachineBlockFrequencyInfo.cpp
@@ -181,7 +181,7 @@
   if (ViewMachineBlockFreqPropagationDAG != GVDT_None &&
       (ViewBlockFreqFuncName.empty() ||
        F.getName().equals(ViewBlockFreqFuncName))) {
-    view();
+    view("MachineBlockFrequencyDAGS." + F.getName());
   }
 }
 
@@ -197,10 +197,9 @@
 
 /// Pop up a ghostview window with the current block frequency propagation
 /// rendered using dot.
-void MachineBlockFrequencyInfo::view(bool isSimple) const {
-// This code is only for debugging.
-  ViewGraph(const_cast<MachineBlockFrequencyInfo *>(this),
-            "MachineBlockFrequencyDAGs", isSimple);
+void MachineBlockFrequencyInfo::view(const Twine &Name, bool isSimple) const {
+  // This code is only for debugging.
+  ViewGraph(const_cast<MachineBlockFrequencyInfo *>(this), Name, isSimple);
 }
 
 BlockFrequency
Index: llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
+++ llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
@@ -2381,7 +2381,7 @@
   if (ViewBlockLayoutWithBFI != GVDT_None &&
       (ViewBlockFreqFuncName.empty() ||
        F->getFunction()->getName().equals(ViewBlockFreqFuncName))) {
-    MBFI->view(false);
+    MBFI->view("MBP." + MF.getName(), false);
   }
 
 
Index: llvm/trunk/lib/CodeGen/BranchFolding.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp
@@ -497,7 +497,9 @@
   return MBFI.printBlockFreq(OS, Freq);
 }
 
-void BranchFolder::MBFIWrapper::view(bool isSimple) { MBFI.view(isSimple); }
+void BranchFolder::MBFIWrapper::view(const Twine &Name, bool isSimple) {
+  MBFI.view(Name, isSimple);
+}
 
 uint64_t
 BranchFolder::MBFIWrapper::getEntryFreq() const {
Index: llvm/trunk/lib/CodeGen/BranchFolding.h
===================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.h
+++ llvm/trunk/lib/CodeGen/BranchFolding.h
@@ -122,7 +122,7 @@
                                   const MachineBasicBlock *MBB) const;
       raw_ostream &printBlockFreq(raw_ostream &OS,
                                   const BlockFrequency Freq) const;
-      void view(bool isSimple = true);
+      void view(const Twine &Name, bool isSimple = true);
       uint64_t getEntryFreq() const;
 
     private:
Index: llvm/trunk/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
===================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
+++ llvm/trunk/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
@@ -62,7 +62,7 @@
 
   const MachineFunction *getFunction() const;
   const MachineBranchProbabilityInfo *getMBPI() const;
-  void view(bool isSimple = true) const;
+  void view(const Twine &Name, bool isSimple = true) const;
 
   // Print the block frequency Freq to OS using the current functions entry
   // frequency to convert freq into a relative decimal form.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29975.88583.patch
Type: text/x-patch
Size: 3250 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170215/75d4b1f9/attachment.bin>


More information about the llvm-commits mailing list