[PATCH] D111727: [DSE] Eliminates dead store of an exisiting value (PR16520)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 09:54:15 PDT 2021


nikic added a comment.

This looks reasonable to me.



================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1947
+  /// is already stored at the same location.
+  bool eliminateRedundantStoresOfExisitingValues() {
+    auto MadeChange = false;
----------------
Exisiting -> Existing


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1948
+  bool eliminateRedundantStoresOfExisitingValues() {
+    auto MadeChange = false;
+    LLVM_DEBUG(dbgs() << "Trying to eliminate MemoryDefs that write the "
----------------
This is a `bool`.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1950
+    LLVM_DEBUG(dbgs() << "Trying to eliminate MemoryDefs that write the "
+                         "already exisiting value\n");
+    for (auto *Def : MemDefs) {
----------------
Also exisiting -> existing


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1955
+        continue;
+      auto UpperDef = dyn_cast_or_null<MemoryDef>(Def->getDefiningAccess());
+      if (!UpperDef || MSSA.isLiveOnEntryDef(UpperDef))
----------------
`auto *`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111727/new/

https://reviews.llvm.org/D111727



More information about the llvm-commits mailing list