[PATCH] D128830: [Pipelines] Introduce DAE after ArgumentPromotion

Pavel Samolysov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 03:11:53 PDT 2022


psamolysov added a comment.

In D128830#3621522 <https://reviews.llvm.org/D128830#3621522>, @nikic wrote:

> There should be a PhaseOrdering test that shows that the argument is not removed in the current opimization pipeline.

Thank you for the suggestion. I've added the test (3b7650da725 <https://github.com/llvm/llvm-project/commit/3b7650da725c03b0cd1c3a9bc19d081da3bb042f>) and rebased the current patch onto main to modify the test here. Also, I've removed the example from the patch's description because it has actually been moved into the test.



================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:775
+  if (Level == OptimizationLevel::O3)
+    MIWP.addLateModulePass(DeadArgumentEliminationPass());
+
----------------
nikic wrote:
> I don't think we need a late module pass for this, it can be part of the normal module optimization pipeline (post module simplification).
I'm afraid I didn't get your comment. What I tried is to add `DAE` with `MIWP.addModulePass` but such module passes run before call graph passes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128830/new/

https://reviews.llvm.org/D128830



More information about the llvm-commits mailing list