[llvm] [DSE] Remove malloc from EarliestEscapeInfo before removing. (PR #84157)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 07:11:38 PST 2024


================
@@ -1908,15 +1908,9 @@ struct DSEState {
                               Malloc->getArgOperand(0), IRB, TLI);
     if (!Calloc)
       return false;
-    MemorySSAUpdater Updater(&MSSA);
-    auto *NewAccess =
-      Updater.createMemoryAccessAfter(cast<Instruction>(Calloc), nullptr,
-                                      MallocDef);
-    auto *NewAccessMD = cast<MemoryDef>(NewAccess);
-    Updater.insertDef(NewAccessMD, /*RenameUses=*/true);
----------------
nikic wrote:

Don't we have to keep the part of this that creates the new access?

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


More information about the llvm-commits mailing list