[polly] r210926 - [Refactor] Simplify dependency map dump

Johannes Doerfert jdoerfert at codeaurora.org
Fri Jun 13 11:00:23 PDT 2014


Author: jdoerfert
Date: Fri Jun 13 13:00:22 2014
New Revision: 210926

URL: http://llvm.org/viewvc/llvm-project?rev=210926&view=rev
Log:
[Refactor] Simplify dependency map dump

Modified:
    polly/trunk/lib/Analysis/Dependences.cpp

Modified: polly/trunk/lib/Analysis/Dependences.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/Dependences.cpp?rev=210926&r1=210925&r2=210926&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/Dependences.cpp (original)
+++ polly/trunk/lib/Analysis/Dependences.cpp Fri Jun 13 13:00:22 2014
@@ -298,24 +298,20 @@ bool Dependences::isParallelDimension(__
   return IsParallel;
 }
 
-void Dependences::printScop(raw_ostream &OS) const {
-  OS << "\tRAW dependences:\n\t\t";
-  if (RAW)
-    OS << RAW << "\n";
+static void printDependencyMap(raw_ostream &OS, __isl_keep isl_union_map *DM) {
+  if (DM)
+    OS << DM << "\n";
   else
     OS << "n/a\n";
+}
 
+void Dependences::printScop(raw_ostream &OS) const {
+  OS << "\tRAW dependences:\n\t\t";
+  printDependencyMap(OS, RAW);
   OS << "\tWAR dependences:\n\t\t";
-  if (WAR)
-    OS << WAR << "\n";
-  else
-    OS << "n/a\n";
-
+  printDependencyMap(OS, WAR);
   OS << "\tWAW dependences:\n\t\t";
-  if (WAW)
-    OS << WAW << "\n";
-  else
-    OS << "n/a\n";
+  printDependencyMap(OS, WAW);
 }
 
 void Dependences::releaseMemory() {





More information about the llvm-commits mailing list