[llvm] [NFC] [DSE] Refactor DSE (PR #100956)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 04:19:28 PDT 2024


================
@@ -2132,182 +2171,188 @@ struct DSEState {
     }
     return MadeChange;
   }
-};
 
-static bool eliminateDeadStores(Function &F, AliasAnalysis &AA, MemorySSA &MSSA,
-                                DominatorTree &DT, PostDominatorTree &PDT,
-                                const TargetLibraryInfo &TLI,
-                                const LoopInfo &LI) {
-  bool MadeChange = false;
+  // Try to eliminate dead defs that access `KillingLocWrapper.MemLoc` and are
+  // killed by `KillingLocWrapper.MemDef`. Return whether
+  // any changes were made, and whether `KillingLocWrapper.DefInst` was deleted.
+  std::pair<bool, bool>
+  eliminateDeadDefs(MemoryLocationWrapper &KillingLocWrapper);
----------------
fhahn wrote:

Can KillingLocWrapper be modified? If so, document, if not make const?

https://github.com/llvm/llvm-project/pull/100956


More information about the llvm-commits mailing list