[PATCH] D34982: [Polly][WIP] Fully-Indexed static expansion

Andreas Simbuerger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 09:18:05 PDT 2017


simbuerg added inline comments.


================
Comment at: lib/Transform/MaximalStaticExpansion.cpp:181
+          errs() << "MSE ERROR : " << SAI->getName()
+                 << " has more than 1 write access. \n";
+          return false;
----------------
Reminder: These should/will become diagnostics


================
Comment at: lib/Transform/MaximalStaticExpansion.cpp:252
+
+  auto NewAccessMap = isl::map::from_union_map(CurrentReadWriteDependences);
+
----------------
As far as I remember, this will fail, if there are more than one map in the union_map. I would check that with at least an assert.


================
Comment at: lib/Transform/MaximalStaticExpansion.cpp:258
+  std::string CurrentOutIdString =
+      MA->getScopArrayInfo()->getName() + "_" + CurrentStmtName + "_expanded";
+
----------------
Where do you use this name?


================
Comment at: lib/Transform/MaximalStaticExpansion.cpp:314
+  auto ExpandedSAI =
+      S.createScopArrayInfo(ElementType, CurrentOutIdString.c_str(), Sizes);
+  ExpandedSAI->setIsOnHeap(true);
----------------
This takes a const string &, no need to go over the c_str().


================
Comment at: lib/Transform/MaximalStaticExpansion.cpp:342
+  auto Loc = BB->getTerminator()->getDebugLoc();
+  ORE->emit(OptimizationRemarkAnalysis(DEBUG_TYPE, "AssumpRestrict", Loc, BB)
+            << Msg);
----------------
Why 'AssumpRestrict'?


https://reviews.llvm.org/D34982





More information about the llvm-commits mailing list