[PATCH] D36578: [JSON][PM] Port json import/export over to new pm

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 06:43:01 PDT 2017


Meinersbur accepted this revision.
Meinersbur added a comment.
This revision is now accepted and ready to land.

There are multiple changes in this patch:

- Fixing some broken regression tests
- Add import/export to new PM
- Hard error on jscop import fail (cool!)
- Make some private methods of `JSONImporter` free functions.

I'd wish for a clearer commit message about these changes, if not even committing separately.



================
Comment at: lib/Exchange/JSONExporter.cpp:212
+/// @returns True if the import succeeded, otherwise False.
+bool importContext(Scop &S, Json::Value &JScop) {
   isl_set *OldContext = S.getContext().release();
----------------
[Style] Make `static`?


================
Comment at: lib/Exchange/JSONExporter.cpp:391-392
 
-    // Check whether the number of indices equals the number of memory accesses
+    // Check whether the number of indices equals the number of memory
+    // accesses
     if (Stmt.size() != statements[StatementIdx]["accesses"].size()) {
----------------
unrelated?


================
Comment at: lib/Exchange/JSONExporter.cpp:434-435
       // must be the same as before.
-      // If it has at least one dimension, it's an array access; search for its
-      // ScopArrayInfo.
+      // If it has at least one dimension, it's an array access; search for
+      // its ScopArrayInfo.
       if (isl_map_dim(NewAccessMap, isl_dim_out) >= 1) {
----------------
unrelated?


https://reviews.llvm.org/D36578





More information about the llvm-commits mailing list