[llvm] [AMDGPU][NewPM] Port SIFixVGPRCopies to NPM (PR #123592)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 03:43:44 PST 2025
================
@@ -41,15 +41,31 @@ class SIFixVGPRCopies : public MachineFunctionPass {
StringRef getPassName() const override { return "SI Fix VGPR copies"; }
};
+class SIFixVGPRCopies {
+public:
+ bool run(MachineFunction &MF);
+};
+
} // End anonymous namespace.
-INITIALIZE_PASS(SIFixVGPRCopies, DEBUG_TYPE, "SI Fix VGPR copies", false, false)
+INITIALIZE_PASS(SIFixVGPRCopiesLegacy, DEBUG_TYPE, "SI Fix VGPR copies", false,
+ false)
-char SIFixVGPRCopies::ID = 0;
+char SIFixVGPRCopiesLegacy::ID = 0;
-char &llvm::SIFixVGPRCopiesID = SIFixVGPRCopies::ID;
+char &llvm::SIFixVGPRCopiesID = SIFixVGPRCopiesLegacy::ID;
+
+PreservedAnalyses SIFixVGPRCopiesPass::run(MachineFunction &MF,
+ MachineFunctionAnalysisManager &) {
+ SIFixVGPRCopies().run(MF);
+ return PreservedAnalyses::all();
----------------
arsenm wrote:
the DAG one does setPreservesAll, so this is just replicating that
https://github.com/llvm/llvm-project/pull/123592
More information about the llvm-commits
mailing list