[llvm] Add Option to Enable Dead Block Elimination in NVVMReflect (PR #144171)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 10 13:48:13 PDT 2025
Artem-B wrote:
Now that we've agreed on the post-NVVMreflect DCE being optional, the next question is -- why would we want to reinvent the wheel, rather than delegate the job to an existing pass?
I'm proposing that the `-nvvm-reflect-dce` flag should be changed to affect the compilation pipeline construction rather than the behavior of the NVVMreflect pass itself. I.e. it should enable inserting the DCE pass after NVVM reflect, if enabled.
This also avoids the problem with `-O0`, as the pass NVVMReflect behavior remains unchanged and can still be applied/tested in isolation. If the user explicitly requests running dce after it, it's on the user.
https://github.com/llvm/llvm-project/pull/144171
More information about the llvm-commits
mailing list