[PATCH] D158503: [CGP] Remove dead PHI nodes before elimination of mostly empty blocks

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 09:52:08 PDT 2023


efriedma added a comment.

The change seems to be an improvement overall.

I don't see any reason anyone would object to the test changes that just disable the transform; that should preserve the original intent of the tests,

A few of the x86 test changes seem a bit tricky to review, particularly llvm/test/CodeGen/X86/tail-opts.ll



================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:887
+  for (auto &Block : llvm::drop_begin(F)) {
+    // Delete Dead Phi nodes first.
+    if (!DisableDeletePHIs)
----------------
Maybe this could use a slightly better comment, like "delete phi nodes that could block deleting other empty blocks).


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

https://reviews.llvm.org/D158503



More information about the llvm-commits mailing list