[PATCH] D17238: [Refactor] Eliminate the global variable "InsnToMemAcc".

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 13 06:37:17 PST 2016


jdoerfert added a comment.

Comments are inlined.


================
Comment at: include/polly/ScopDetection.h:225
@@ +224,3 @@
+  ///        instructions.
+  mutable MapInsnToMemAcc InsnToMemAcc;
+
----------------
Why mutable? If you try to modify it but the "const" state of almost all methods in the ScopDetection is blocking you, put the InstToMemAcc into the DetectionContext, that is what we always did and what makes it clear it belongs to this detection context.

================
Comment at: include/polly/ScopDetection.h:523
@@ +522,3 @@
+  ///        function
+  MapInsnToMemAcc &getInsnToMemAccMap() const { return InsnToMemAcc; }
+
----------------
In methods like "getBoxedLoops" you can easily see how you can access the "correct" InstToMemAcc once it is moved to the DetectionContext.

================
Comment at: lib/Analysis/ScopDetection.cpp:505
@@ -504,3 +504,1 @@
-MapInsnToMemAcc InsnToMemAcc;
-
 /// @brief Remove smax of smax(0, size) expressions from a SCEV expression and
----------------
**Thank you sooo much!** Finally, somebody removed that thing...


Repository:
  rL LLVM

http://reviews.llvm.org/D17238





More information about the llvm-commits mailing list