[llvm] [DSE] Apply initializes attribute to DSE (PR #107282)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 03:07:19 PDT 2024


================
@@ -820,20 +828,126 @@ struct MemoryLocationWrapper {
   const Value *UnderlyingObject;
   MemoryDef *MemDef;
   Instruction *DefInst;
+  bool DefByInitializesAttr = false;
 };
 
 // A memory def wrapper that represents a MemoryDef and the MemoryLocation(s)
 // defined by this MemoryDef.
 struct MemoryDefWrapper {
-  MemoryDefWrapper(MemoryDef *MemDef, std::optional<MemoryLocation> MemLoc) {
+  MemoryDefWrapper(
+      MemoryDef *MemDef,
+      const SmallVectorImpl<std::pair<MemoryLocation, bool>> &MemLocations) {
----------------
nikic wrote:

Use ArrayRef instead.

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


More information about the llvm-commits mailing list