[PATCH] D49154: Extend CFGPrinter and CallPrinter with Heat Colors: Polly changes

Rodrigo Caetano Rocha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 10 14:32:41 PDT 2018


rcorcs created this revision.
rcorcs added a reviewer: sfertile.
Herald added a reviewer: bollu.
Herald added a subscriber: llvm-commits.

This patch has the necessary changes to Polly in order to support the new CFGPrinter with Profiling Heat Colors.

Reference to the Heat Color patch: https://reviews.llvm.org/rL336000


Repository:
  rPLO Polly

https://reviews.llvm.org/D49154

Files:
  lib/Analysis/ScopGraphPrinter.cpp
  lib/Support/RegisterPasses.cpp


Index: lib/Support/RegisterPasses.cpp
===================================================================
--- lib/Support/RegisterPasses.cpp
+++ lib/Support/RegisterPasses.cpp
@@ -514,9 +514,6 @@
 
   assert(!DumpAfter && "This option is not implemented");
   assert(DumpAfterFile.empty() && "This option is not implemented");
-
-  if (CFGPrinter)
-    PM.addPass(llvm::CFGPrinterPass());
 }
 
 /// Register Polly to be available as an optimizer
@@ -690,6 +687,9 @@
   if (VerifyEachPass)
     MPM.addPass(VerifierPass());
 
+  if (CFGPrinter)
+    MPM.addPass(llvm::CFGPrinterPass());
+
   return true;
 }
 
Index: lib/Analysis/ScopGraphPrinter.cpp
===================================================================
--- lib/Analysis/ScopGraphPrinter.cpp
+++ lib/Analysis/ScopGraphPrinter.cpp
@@ -69,11 +69,9 @@
       BasicBlock *BB = Node->getNodeAs<BasicBlock>();
 
       if (isSimple())
-        return DOTGraphTraits<const Function *>::getSimpleNodeLabel(
-            BB, BB->getParent());
+        return DOTGraphTraits<CFGDOTInfo*>::getSimpleNodeLabel(BB, nullptr);
       else
-        return DOTGraphTraits<const Function *>::getCompleteNodeLabel(
-            BB, BB->getParent());
+        return DOTGraphTraits<CFGDOTInfo*>::getCompleteNodeLabel(BB, nullptr);
     }
 
     return "Not implemented";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49154.154883.patch
Type: text/x-patch
Size: 1315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180710/d70332b8/attachment.bin>


More information about the llvm-commits mailing list