[llvm] [MemCpyOpt] Merge memset and skip unrelated clobber in one scan (PR #90350)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 22:23:23 PDT 2024


================
@@ -191,6 +196,18 @@ class MemsetRanges {
 
   void addRange(int64_t Start, int64_t Size, Value *Ptr, MaybeAlign Alignment,
                 Instruction *Inst);
+
+  bool flush(MemorySSAUpdater *MSSAU, Instruction *InsertPoint,
+             MemoryUseOrDef *&MemInsertPoint);
+
+  // The first store/memset instruction
+  Instruction *StartInst;
+  // The start pointer written by the first instruction
+  Value *StartPtr;
+  // The memory location of StartPtr
+  MemoryLocation StartPtrLocation;
+  // The byte value of memset
+  Value *ByteVal;
----------------
nikic wrote:

Can you move these next to the other member declarations?

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


More information about the llvm-commits mailing list