[llvm] [CodeGen] Port selection dag isel to new pass manager (PR #83567)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 18:01:49 PST 2024
================
@@ -39,13 +41,22 @@ void X86CodeGenPassBuilder::addAsmPrinter(AddMachinePass &addPass,
// TODO: Add AsmPrinter.
}
-Error X86CodeGenPassBuilder::addInstSelector(AddMachinePass &) const {
+Error X86CodeGenPassBuilder::addInstSelector(AddMachinePass &addPass) const {
// TODO: Add instruction selector.
+ addPass(X86ISelDAGToDAGPass(static_cast<X86TargetMachine &>(TM)));
return Error::success();
}
} // namespace
+void X86TargetMachine::registerPassBuilderCallbacks(
+ PassBuilder &PB, bool PopulateClassToPassNames) {
+ if (PopulateClassToPassNames) {
----------------
paperchalice wrote:
Yes, each target should provide `<Target>PassRegistry.def`, like #70921.
https://github.com/llvm/llvm-project/pull/83567
More information about the llvm-commits
mailing list