[PATCH] Relax atomic restrictions on memory dependence analysis

Philip Reames listmail at philipreames.com
Mon Aug 18 15:02:50 PDT 2014


LGTM with minor comment clarification.

================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:411
@@ -410,1 +410,3 @@
+    // One exception is atomic loads: a value can depend on an atomic load that it
+    // does not alias with.
     if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
----------------
You should explain why.  This is the heart of the aliasing confusion.  

================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:431
@@ +430,3 @@
+      // While volatile access cannot be eliminated, they do not have to kill
+      // optimisation in that way.
+      if (LI->isVolatile())
----------------
This comment is unclear.  "in that way"?

http://reviews.llvm.org/D4797






More information about the llvm-commits mailing list