[llvm] AMDGPU/NewPM: Port SIFoldOperands to new pass manager (PR #105791)
Christudasan Devadasan via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 02:14:58 PDT 2024
================
@@ -2246,3 +2255,14 @@ 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();
+ }
+ PreservedAnalyses PA;
----------------
cdevadas wrote:
Better use `auto PA = getMachineFunctionPassPreservedAnalyses();`
https://github.com/llvm/llvm-project/pull/105791
More information about the llvm-commits
mailing list