[PATCH] D137707: Move "auto-init" instructions to the dominator of their users

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 13:20:45 PST 2023


efriedma added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/MoveAutoInit.cpp:72
+      }
+    } else if (auto *M = dyn_cast<MemoryPhi>(MA)) {
+      for (unsigned i = 0, n = M->getNumIncomingValues(); i != n; ++i)
----------------
I'm not sure I understand the PHI handling here... the incoming values of a PHI are essentially original store itself, and other stores that store to the same location.  I'm not sure how analyzing the other stores helps here.  You want the store to dominate the incoming edge of the PHI, not the other stores.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137707



More information about the llvm-commits mailing list