================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to