[PATCH] D18546: Prevent X86IselLowering from merging volatile loads

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 13:44:34 PDT 2016


jyknight added inline comments.

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6962
@@ -6961,7 +6961,3 @@
 
-
-/// isConsecutiveLoad - Return true if LD is loading 'Bytes' bytes from a
-/// location that is 'Dist' units away from the location that the 'Base' load
-/// is loading from.
-bool SelectionDAG::isConsecutiveLoad(LoadSDNode *LD, LoadSDNode *Base,
-                                     unsigned Bytes, int Dist) const {
+/// areNonVolatileConsecutiveLoads - Return true loads are next to
+/// each other and can be merged. Check that both are nonvolatile and
----------------
The coding style changed somewhat recently to not have the name of the function repeated at the beginning of the doc. So, if you're changing a function with that, you can/should remove it.

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6970
@@ +6969,3 @@
+                                                  int Dist) const {
+  if (LD->isVolatile() != Base->isVolatile())
+    return false;
----------------
Um, you mean to check if both are !isVolatile, not if their volatility is equal, right?


http://reviews.llvm.org/D18546





More information about the llvm-commits mailing list