[llvm] [NewPM][X86] Port X86ExpandPseudo to NPM (PR #173463)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 23 23:20:14 PST 2025
================
@@ -941,6 +956,26 @@ bool X86ExpandPseudo::runOnMachineFunction(MachineFunction &MF) {
}
/// Returns an instance of the pseudo instruction expansion pass.
-FunctionPass *llvm::createX86ExpandPseudoPass() {
- return new X86ExpandPseudo();
+FunctionPass *llvm::createX86ExpandPseudoLegacyPass() {
+ return new X86ExpandPseudoLegacy();
+}
+
+bool X86ExpandPseudoLegacy::runOnMachineFunction(MachineFunction &MF) {
+ X86ExpandPseudoImpl Impl;
+ return Impl.runOnMachineFunction(MF);
+}
+
+PreservedAnalyses
+X86ExpandPseudoPass::run(MachineFunction &MF,
+ MachineFunctionAnalysisManager &MFAM) {
+ X86ExpandPseudoImpl Impl;
+ bool Changed = Impl.runOnMachineFunction(MF);
+ if (!Changed)
+ return PreservedAnalyses::all();
+
+ PreservedAnalyses PA = PreservedAnalyses::none();
----------------
paperchalice wrote:
```suggestion
PreservedAnalyses PA = getMachineFunctionPassPreservedAnalyses();
```
https://github.com/llvm/llvm-project/pull/173463
More information about the llvm-commits
mailing list