[llvm] [WebAssembly] Port WebAssemblyArgumentMovePass (PR #209368)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 23:43:48 PDT 2026


================
@@ -92,3 +96,15 @@ bool WebAssemblyArgumentMove::runOnMachineFunction(MachineFunction &MF) {
 
   return Changed;
 }
+
+bool WebAssemblyArgumentMoveLegacy::runOnMachineFunction(MachineFunction &MF) {
+  return argumentMove(MF);
+}
+
+PreservedAnalyses
+WebAssemblyArgumentMovePass::run(MachineFunction &MF,
+                                 MachineFunctionAnalysisManager &MFAM) {
+  return argumentMove(MF) ? getMachineFunctionPassPreservedAnalyses()
+                                .preserveSet<CFGAnalyses>()
+                          : PreservedAnalyses::all();
----------------
boomanaiden154 wrote:

These are automatically handled by setting that we preserve the CFG. The `invalidate` method for those analysis results will only invalidate it if the pass does not explicitly mark the CFG as preserved.

https://github.com/llvm/llvm-project/pull/209368


More information about the llvm-commits mailing list