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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 05:42:58 PDT 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/Utils/MoveAutoInit.cpp:57
+
+  if(isa<AllocaInst>(getUnderlyingObject(ML.Ptr)))
+    return ML;
----------------
`if (`


================
Comment at: llvm/lib/Transforms/Utils/MoveAutoInit.cpp:66
+/// condition.
+static BasicBlock *usersDominator(MemoryLocation const& ML, Instruction *I, DominatorTree &DT,
+                                  MemorySSA &MSSA) {
----------------
`const MemoryLocation &ML`


================
Comment at: llvm/test/Transforms/MoveAutoInit/sret.ll:12
+
+define void @f(%struct.S* noalias sret(%struct.S) align 4 %0, i32 noundef %1) {
+; CHECK-LABEL: @f(
----------------
Can you please convert the input IR to use opaque pointers? (Just run it through no-op `opt -S`).


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

https://reviews.llvm.org/D148507



More information about the llvm-commits mailing list