[llvm] a29bd8c - [CodeGen][NewPM] Record parameterized machine pass names to PIC (#120554)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 31 23:06:13 PST 2024
Author: Akshat Oke
Date: 2025-01-01T12:36:10+05:30
New Revision: a29bd8cbab7390e5a9e3182e6e87908f4e7daced
URL: https://github.com/llvm/llvm-project/commit/a29bd8cbab7390e5a9e3182e6e87908f4e7daced
DIFF: https://github.com/llvm/llvm-project/commit/a29bd8cbab7390e5a9e3182e6e87908f4e7daced.diff
LOG: [CodeGen][NewPM] Record parameterized machine pass names to PIC (#120554)
Required for `{start|stop}-{after-before}` cli
Added:
Modified:
llvm/include/llvm/Passes/MachinePassRegistry.def
llvm/lib/Passes/PassBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Passes/MachinePassRegistry.def b/llvm/include/llvm/Passes/MachinePassRegistry.def
index 5a4e79d7225db1..29763995e8b516 100644
--- a/llvm/include/llvm/Passes/MachinePassRegistry.def
+++ b/llvm/include/llvm/Passes/MachinePassRegistry.def
@@ -179,7 +179,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 a936f5381137c6..30b8d7c9499488 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -492,6 +492,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-commits
mailing list