[llvm-branch-commits] [llvm] [NewPm][CodeGen] Record parameterized machine pass names to PIC (PR #120554)
Akshat Oke via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Dec 19 03:33:48 PST 2024
https://github.com/optimisan created https://github.com/llvm/llvm-project/pull/120554
None
>From d9acb7c026852d1291e071377844692b1d49fd15 Mon Sep 17 00:00:00 2001
From: Akshat Oke <Akshat.Oke at amd.com>
Date: Mon, 16 Dec 2024 08:48:41 +0000
Subject: [PATCH] [NewPm][CodeGen] Record parameterized machine pass names to
PIC
---
llvm/include/llvm/Passes/MachinePassRegistry.def | 2 +-
llvm/lib/Passes/PassBuilder.cpp | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/llvm/include/llvm/Passes/MachinePassRegistry.def b/llvm/include/llvm/Passes/MachinePassRegistry.def
index 35314473caa610..5facdfa825e4cb 100644
--- a/llvm/include/llvm/Passes/MachinePassRegistry.def
+++ b/llvm/include/llvm/Passes/MachinePassRegistry.def
@@ -181,7 +181,7 @@ MACHINE_FUNCTION_PASS("verify<machine-trace-metrics>", MachineTraceMetricsVerifi
PARAMS)
#endif
MACHINE_FUNCTION_PASS_WITH_PARAMS(
- "regallocfast", "RegAllocFast",
+ "regallocfast", "RegAllocFastPass",
[](RegAllocFastPassOptions Opts) { return RegAllocFastPass(Opts); },
[PB = this](StringRef Params) {
return parseRegAllocFastPassOptions(*PB, Params);
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index 76359f369946c4..f64b6e0adb2b32 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -496,6 +496,9 @@ PassBuilder::PassBuilder(TargetMachine *TM, PipelineTuningOptions PTO,
PIC->addClassToPassName(decltype(CREATE_PASS)::name(), NAME);
#define MACHINE_FUNCTION_PASS(NAME, CREATE_PASS) \
PIC->addClassToPassName(decltype(CREATE_PASS)::name(), NAME);
+#define MACHINE_FUNCTION_PASS_WITH_PARAMS(NAME, CLASS, CREATE_PASS, PARSER, \
+ PARAMS) \
+ PIC->addClassToPassName(CLASS, NAME);
#include "llvm/Passes/MachinePassRegistry.def"
});
}
More information about the llvm-branch-commits
mailing list