[llvm-branch-commits] [WebAssembly] Port WebAssemblyOptimizeLiveIntervalsPass (PR #209958)

Heejin Ahn via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jul 17 23:44:43 PDT 2026


================
@@ -121,3 +124,21 @@ bool WebAssemblyOptimizeLiveIntervals::runOnMachineFunction(
 
   return true;
 }
+
+bool WebAssemblyOptimizeLiveIntervalsLegacy::runOnMachineFunction(
+    MachineFunction &MF) {
+  return optimizeLiveIntervals(
+      MF, getAnalysis<LiveIntervalsWrapperPass>().getLIS());
+}
+
+PreservedAnalyses WebAssemblyOptimizeLiveIntervalsPass::run(
+    MachineFunction &MF, MachineFunctionAnalysisManager &MFAM) {
+  bool Changed =
+      optimizeLiveIntervals(MF, MFAM.getResult<LiveIntervalsAnalysis>(MF));
+  if (!Changed)
+    return PreservedAnalyses::all();
+  return getMachineFunctionPassPreservedAnalyses()
+      .preserveSet<CFGAnalyses>()
+      .preserve<LiveIntervalsAnalysis>()
+      .preserve<SlotIndexesAnalysis>();
----------------
aheejin wrote:

I also made a few similar questions for your already-landed PRs; PTAL.

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


More information about the llvm-branch-commits mailing list