[PATCH] D145478: [ADCE] Preserve MemorySSA if only debug instructions are removed

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 00:36:55 PST 2023


uabelho created this revision.
uabelho added reviewers: dblaikie, aeubanks, StephenTozer, nikic.
uabelho added a project: debug-info.
Herald added subscribers: kmitropoulou, StephenFan, bjope, asbirlea, ormris, hiraditya.
Herald added a project: All.
uabelho requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

As we've seen in
 https://github.com/llvm/llvm-project/issues/58285
throwing away MemorySSA when only debug instructions are removed can lead
to different code when debug info is present or not present.

This is the second attempt at fixing the problem. The first one was
 https://reviews.llvm.org/D145051
which was reverted due to a 15% compile time regression for tramp3d-v4
in NewPM-ReleaseLTO-g.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145478

Files:
  llvm/lib/Transforms/Scalar/ADCE.cpp
  llvm/test/Transforms/ADCE/preserve-memoryssa-if-only-remove-debug.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145478.502944.patch
Type: text/x-patch
Size: 4940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230307/f6605b86/attachment.bin>


More information about the llvm-commits mailing list