[polly] r238645 - Dump YAML schedule tree as properly indented tree in DEBUG output

Tobias Grosser tobias at grosser.es
Fri May 29 23:46:59 PDT 2015


Author: grosser
Date: Sat May 30 01:46:59 2015
New Revision: 238645

URL: http://llvm.org/viewvc/llvm-project?rev=238645&view=rev
Log:
Dump YAML schedule tree as properly indented tree in DEBUG output

Modified:
    polly/trunk/lib/Transform/ScheduleOptimizer.cpp

Modified: polly/trunk/lib/Transform/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ScheduleOptimizer.cpp?rev=238645&r1=238644&r2=238645&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/Transform/ScheduleOptimizer.cpp Sat May 30 01:46:59 2015
@@ -30,6 +30,7 @@
 #include "isl/constraint.h"
 #include "isl/map.h"
 #include "isl/options.h"
+#include "isl/printer.h"
 #include "isl/schedule.h"
 #include "isl/schedule_node.h"
 #include "isl/space.h"
@@ -454,7 +455,13 @@ bool IslScheduleOptimizer::runOnScop(Sco
   if (!Schedule)
     return false;
 
-  DEBUG(dbgs() << "Schedule := " << stringFromIslObj(Schedule) << ";\n");
+  DEBUG({
+    auto *P = isl_printer_to_str(S.getIslCtx());
+    P = isl_printer_set_yaml_style(P, ISL_YAML_STYLE_BLOCK);
+    P = isl_printer_print_schedule(P, Schedule);
+    dbgs() << "NewScheduleTree: \n" << isl_printer_get_str(P) << "\n";
+    isl_printer_free(P);
+  });
 
   isl_union_map *NewSchedule = getScheduleMap(Schedule);
 





More information about the llvm-commits mailing list