[PATCH] D30929: NewGVN: Handle coercion of constant stores, loads, memory insts.

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 22:05:42 PDT 2017


dberlin added inline comments.


================
Comment at: lib/Transforms/Scalar/NewGVN.cpp:814
+    // Can't forward from non-atomic to atomic without violating memory model.
+    // Don't need to coerce if they are the same type
+    if (LI->isAtomic() > DepSI->isAtomic() ||
----------------
i'll fix the comment formatting.



================
Comment at: lib/Transforms/Scalar/NewGVN.cpp:818
+      return nullptr;
+    //    auto *LoadAddressLeader = lookupOperandLeader(LoadPtr);
+    int Offset = analyzeLoadFromClobberingStore(LoadType, LoadPtr, DepSI, DL);
----------------
waiting on a bootstrap to check this.


================
Comment at: lib/Transforms/Scalar/NewGVN.cpp:829
+    // Can't forward from non-atomic to atomic without violating memory model.
+    // FIXME: Check why DepLI == LI would occur
+    if (DepLI == LI || LI->isAtomic() > DepLI->isAtomic())
----------------
and this :)



https://reviews.llvm.org/D30929





More information about the llvm-commits mailing list