[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 17 05:40:10 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/MoveAutoInit.cpp:55
+    assert(false && "memory location set");
+  return isa<AllocaInst>(ML.Ptr->stripInBoundsConstantOffsets());
+}
----------------
Return MemoryLocation from this function and don't repeat the same in usersDominator?

I'd also replace stripInBoundsConstantsOffsets with getUnderlyingObject here. Unlikely to matter for auto-init in particular, but it's logically the right function.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148507



More information about the llvm-commits mailing list