[polly] r235588 - JScoP Import/Export: Ensure parameters have the same isl_id

Tobias Grosser tobias at grosser.es
Thu Apr 23 05:23:57 PDT 2015


Author: grosser
Date: Thu Apr 23 07:23:56 2015
New Revision: 235588

URL: http://llvm.org/viewvc/llvm-project?rev=235588&view=rev
Log:
JScoP Import/Export: Ensure parameters have the same isl_id

When reading parameters from a JSON file parameters with identical names
may be related to different isl_ids, which then causes isl to treat them
as differnet objects. This does not cause issues at the moment, but has
shown problematic in subsequent schedule tree changes.

This commit will be tested by the following changes.

Modified:
    polly/trunk/lib/Exchange/JSONExporter.cpp

Modified: polly/trunk/lib/Exchange/JSONExporter.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Exchange/JSONExporter.cpp?rev=235588&r1=235587&r2=235588&view=diff
==============================================================================
--- polly/trunk/lib/Exchange/JSONExporter.cpp (original)
+++ polly/trunk/lib/Exchange/JSONExporter.cpp Thu Apr 23 07:23:56 2015
@@ -236,6 +236,10 @@ bool JSONImporter::runOnScop(Scop &S) {
     // that stores the reference to the ScopStmt this schedule belongs to.
     m = isl_map_set_tuple_id(m, isl_dim_in,
                              isl_space_get_tuple_id(Space, isl_dim_set));
+    for (unsigned i = 0; i < isl_space_dim(Space, isl_dim_param); i++) {
+      isl_id *id = isl_space_get_dim_id(Space, isl_dim_param, i);
+      m = isl_map_set_dim_id(m, isl_dim_param, i, id);
+    }
     isl_space_free(Space);
     NewSchedule[*SI] = m;
     index++;





More information about the llvm-commits mailing list