[llvm] AMDGPU/NewPM: Port SIFoldOperands to new pass manager (PR #105801)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 23 06:15:41 PDT 2024


================
@@ -2246,3 +2254,15 @@ bool SIFoldOperands::runOnMachineFunction(MachineFunction &MF) {
 
   return Changed;
 }
+
+PreservedAnalyses SIFoldOperandsPass::run(MachineFunction &MF,
+                                          MachineFunctionAnalysisManager &) {
+  SIFoldOperandsImpl Impl;
+  bool Changed = Impl.run(MF);
+  if (!Changed) {
+    return PreservedAnalyses::all();
+  }
+  auto PA = getMachineFunctionPassPreservedAnalyses();
+  PA.preserveSet<CFGAnalyses>();
+  return PA;
+}
----------------
arsenm wrote:

Missing end of file line 

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


More information about the llvm-commits mailing list