[llvm] [MemCpyOpt] Use EarliestEscapeInfo (PR #110280)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 28 00:29:42 PDT 2024


================
@@ -284,6 +284,7 @@ static bool mayBeVisibleThroughUnwinding(Value *V, Instruction *Start,
 
 void MemCpyOptPass::eraseInstruction(Instruction *I) {
   MSSAU->removeMemoryAccess(I);
+  EEI->removeInstruction(I);
----------------
dtcxzyw wrote:

Should we call `MemCpyOptPass::eraseInstruction` in https://github.com/llvm/llvm-project/blob/a94060ca0c87d13af5c04410f3ed24c01d1de909/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp#L1157? `NewCopySource` may be deleted after a BAA query.


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


More information about the llvm-commits mailing list