[PATCH] D12992: invariant.group handling in GVN

Nick Lewycky via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 12:59:04 PDT 2015


nlewycky accepted this revision.
nlewycky added a comment.
This revision is now accepted and ready to land.

LGTM, thanks for the extensive gvn test!


================
Comment at: include/llvm/Analysis/MemoryDependenceAnalysis.h:422
@@ +421,3 @@
+    /// This analysis looks for other loads and stores with invariant.group
+    /// metadata and the same pointer operand. Returns Unknown if does not find
+    /// anything, and Def if it can be assumed that 2 instructions load or store
----------------
... if *it* does not find ...

================
Comment at: include/llvm/Analysis/MemoryDependenceAnalysis.h:426
@@ +425,3 @@
+    /// FIXME: This analysis works only on single block because of restrictions
+    /// on caller site.
+    MemDepResult getInvariantGroupPointerDependency(LoadInst *LI,
----------------
Either "on the caller" or "at the call site".

================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:398
@@ +397,3 @@
+                                                             BasicBlock *BB) {
+
+  Value *LoadOperand = LI->getPointerOperand();
----------------
Extra newline.

================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:411
@@ +410,3 @@
+  llvm::SmallSet<Value *, 14> Seen;
+  // Queue to process all pointers that are equavalent to load operand.
+  llvm::SmallVector<Value *, 8> LoadOperandsQueue;
----------------
"equivalent"


http://reviews.llvm.org/D12992





More information about the llvm-commits mailing list