[PATCH] D11143: [RFC] Cross Block DSE

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 00:23:18 PDT 2015


hfinkel added inline comments.

================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:111
@@ +110,3 @@
+          FindFunctionBackedges(F, BackEdges);
+          for (unsigned i = 0, e = BackEdges.size(); i != e; ++i)
+            BackEdgesMap.insert(BackEdges[i]);
----------------
Range-based for

================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:946
@@ +945,3 @@
+  Value *Pointer = SI->getPointerOperand();
+  uint64_t PtrSize = SI->getModule()->getDataLayout().getTypeStoreSize(Pointer->getType());
+  BasicBlock::iterator BBI(SI);
----------------
Line too long.

================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:959
@@ +958,3 @@
+      Value *MemPtr = CSI->getPointerOperand();
+      uint64_t MemSize = CSI->getModule()->getDataLayout().getTypeStoreSize(MemPtr->getType());
+      AliasResult R = AA->alias(Pointer, PtrSize, MemPtr, MemSize);
----------------
Line too long.

================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:990
@@ +989,3 @@
+        Value *MemPtr = CSI->getPointerOperand();
+        uint64_t MemSize = CSI->getModule()->getDataLayout().getTypeStoreSize(MemPtr->getType());
+        AliasResult R = AA->alias(Pointer, PtrSize, MemPtr, MemSize);
----------------
Line too long.

================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:1017
@@ +1016,3 @@
+/// isStoreDead - Return true is the StoreInst 'SI' is already marked dead.
+bool DSE::isStoreDead(StoreInst *SI) {
+  for (auto &I : DeadStores) {
----------------
Remove this function and instead call:

  DeadStores.count(SI)


================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:1032
@@ +1031,3 @@
+  Value *Pointer = SI->getPointerOperand();
+  uint64_t PtrSize = SI->getModule()->getDataLayout().getTypeStoreSize(Pointer->getType());
+  DomTreeNode *DTNode = PDT->getNode(BB);
----------------
Line is too long.

================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:1049
@@ +1048,3 @@
+        continue;
+      uint64_t MemSize = CandidateSI->getModule()->getDataLayout().getTypeStoreSize(MemPtr->getType());
+      AliasResult R = AA->alias(Pointer, PtrSize, MemPtr, MemSize);
----------------
Line too long.


http://reviews.llvm.org/D11143





More information about the llvm-commits mailing list