[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
Mon Dec 5 14:07:40 PST 2022


efriedma added a comment.

The approach seems reasonable.



================
Comment at: llvm/lib/Transforms/Utils/MoveAutoInit.cpp:93
+    // The remaining logic should be pretty similar.
+    if (!hasAutoInitMetadata(I))
+      continue;
----------------
Can we avoid iterating over the function if it doesn't have any auto-init?


================
Comment at: llvm/test/Other/new-pm-defaults.ll:109
+; CHECK-O-NEXT: Running pass: MoveAutoInitPass
+; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis on foo
+; CHECK-O-NEXT: Running analysis: AAManager on foo
----------------
It would be good to avoid introducing an additional run of MemorySSA.


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

https://reviews.llvm.org/D137707



More information about the llvm-commits mailing list