[clang] [llvm] [llvm] Introduce MoveEntryAllocaInit pass (PR #164882)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 4 00:30:47 PST 2025
================
@@ -221,7 +223,11 @@ PreservedAnalyses MoveAutoInitPass::run(Function &F,
auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
auto &MSSA = AM.getResult<MemorySSAAnalysis>(F).getMSSA();
- if (!runMoveAutoInit(F, DT, MSSA))
+ auto ShouldProcess = [](const Instruction &I) -> bool {
+ return hasAutoInitMetadata(I);
+ };
+ if (!runMoveAutoInit(F, DT, MSSA, ShouldProcess) &&
+ !runMoveAutoInit(F, DT, MSSA, [](const Instruction &) { return true; }))
----------------
nikic wrote:
Basically, what I'm saying is that this should be just:
```suggestion
if (!runMoveAutoInit(F, DT, MSSA))
```
Without any ShouldProcess callback.
https://github.com/llvm/llvm-project/pull/164882
More information about the llvm-commits
mailing list