[llvm-branch-commits] [llvm] [RISCV] Port Vector Peephole to NewPM (PR #215671)
Sam Elliott via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 11 22:00:42 PDT 2026
================
@@ -823,6 +827,24 @@ bool RISCVVectorPeephole::runOnMachineFunction(MachineFunction &MF) {
return Changed;
}
+bool RISCVVectorPeepholeLegacy::runOnMachineFunction(MachineFunction &MF) {
+ if (skipFunction(MF.getFunction()))
+ return false;
+ return RISCVVectorPeepholeImpl().run(MF);
+}
+
+PreservedAnalyses
+RISCVVectorPeepholePass::run(MachineFunction &MF,
+ MachineFunctionAnalysisManager &MFAM) {
+ bool Changed = RISCVVectorPeepholeImpl().run(MF);
+ if (!Changed)
+ return PreservedAnalyses::all();
+
+ PreservedAnalyses PA = getMachineFunctionPassPreservedAnalyses();
+ PA.preserveSet<CFGAnalyses>();
----------------
lenary wrote:
I think i've updated all the relevant changes in the stack to preserve this when the legacy pass does.
https://github.com/llvm/llvm-project/pull/215671
More information about the llvm-branch-commits
mailing list