[PATCH] D21574: Add an internal option to specify the function of interest to display MBFI

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 16:49:57 PDT 2016


davidxl created this revision.
davidxl added reviewers: danielcdh, silvas.
davidxl added a subscriber: llvm-commits.

http://reviews.llvm.org/D21574

Files:
  lib/CodeGen/MachineBlockFrequencyInfo.cpp

Index: lib/CodeGen/MachineBlockFrequencyInfo.cpp
===================================================================
--- lib/CodeGen/MachineBlockFrequencyInfo.cpp
+++ lib/CodeGen/MachineBlockFrequencyInfo.cpp
@@ -42,6 +42,9 @@
                           "integer fractional block frequency representation."),
                clEnumValEnd));
 
+static cl::opt<std::string> ViewMachineBlockFreqFuncName("view-mbfi-func-name",
+                                                         cl::Hidden);
+
 namespace llvm {
 
 template <> struct GraphTraits<MachineBlockFrequencyInfo *> {
@@ -137,7 +140,9 @@
     MBFI.reset(new ImplType);
   MBFI->calculate(F, MBPI, MLI);
 #ifndef NDEBUG
-  if (ViewMachineBlockFreqPropagationDAG != GVDT_None) {
+  if (ViewMachineBlockFreqPropagationDAG != GVDT_None &&
+      (ViewMachineBlockFreqFuncName.empty() ||
+       F.getName().equals(ViewMachineBlockFreqFuncName))) {
     view();
   }
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21574.61461.patch
Type: text/x-patch
Size: 932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160621/23d63845/attachment.bin>


More information about the llvm-commits mailing list