[llvm] [Passes] Move machine function pass registries to PassRegistry.def (PR #203659)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 13 01:40:56 PDT 2026
https://github.com/paperchalice updated https://github.com/llvm/llvm-project/pull/203659
>From a242a32656844070f90b267f008a6a5270df88f9 Mon Sep 17 00:00:00 2001
From: PaperChalice <liujunchang97 at outlook.com>
Date: Sat, 13 Jun 2026 16:40:41 +0800
Subject: [PATCH] [Passes] Remove redundant IR pass registries
---
.../llvm/Passes/MachinePassRegistry.def | 42 -------------------
1 file changed, 42 deletions(-)
diff --git a/llvm/include/llvm/Passes/MachinePassRegistry.def b/llvm/include/llvm/Passes/MachinePassRegistry.def
index a297c08fac1b2..76245bd5c830d 100644
--- a/llvm/include/llvm/Passes/MachinePassRegistry.def
+++ b/llvm/include/llvm/Passes/MachinePassRegistry.def
@@ -13,43 +13,6 @@
// NOTE: NO INCLUDE GUARD DESIRED!
-#ifndef MODULE_ANALYSIS
-#define MODULE_ANALYSIS(NAME, CREATE_PASS)
-#endif
-MODULE_ANALYSIS("collector-metadata", CollectorMetadataAnalysis())
-MODULE_ANALYSIS("machine-module-info", MachineModuleAnalysis())
-MODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
-#undef MODULE_ANALYSIS
-
-#ifndef MODULE_PASS
-#define MODULE_PASS(NAME, CREATE_PASS)
-#endif
-MODULE_PASS("global-merge", GlobalMergePass(TM, GlobalMergeOptions()))
-MODULE_PASS("jmc-instrumenter", JMCInstrumenterPass())
-MODULE_PASS("lower-emutls", LowerEmuTLSPass())
-MODULE_PASS("mir-strip-debug", StripDebugMachineModulePass())
-MODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass())
-MODULE_PASS("print<regusage>", PhysicalRegisterUsageInfoPrinterPass(errs()))
-MODULE_PASS("shadow-stack-gc-lowering", ShadowStackGCLoweringPass())
-MODULE_PASS("global-merge-func", GlobalMergeFuncPass())
-#undef MODULE_PASS
-
-#ifndef FUNCTION_ANALYSIS
-#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
-#endif
-FUNCTION_ANALYSIS("gc-function", GCFunctionAnalysis())
-FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
-FUNCTION_ANALYSIS("ssp-layout", SSPLayoutAnalysis())
-FUNCTION_ANALYSIS("target-ir", TargetIRAnalysis(std::move(TM.getTargetIRAnalysis())))
-#undef FUNCTION_ANALYSIS
-
-#ifndef LOOP_PASS
-#define LOOP_PASS(NAME, CREATE_PASS)
-#endif
-LOOP_PASS("loop-reduce", LoopStrengthReducePass())
-LOOP_PASS("loop-term-fold", LoopTermFoldPass())
-#undef LOOP_PASS
-
#ifndef MACHINE_MODULE_PASS
#define MACHINE_MODULE_PASS(NAME, CREATE_PASS)
#endif
@@ -92,11 +55,6 @@ MACHINE_FUNCTION_ANALYSIS("regalloc-priority", RegAllocPriorityAdvisorAnalysis()
MACHINE_FUNCTION_ANALYSIS("slot-indexes", SlotIndexesAnalysis())
MACHINE_FUNCTION_ANALYSIS("spill-code-placement", SpillPlacementAnalysis())
MACHINE_FUNCTION_ANALYSIS("virtregmap", VirtRegMapAnalysis())
-// MACHINE_FUNCTION_ANALYSIS("lazy-machine-bfi",
-// LazyMachineBlockFrequencyInfoAnalysis())
-// MACHINE_FUNCTION_ANALYSIS("machine-loops", MachineLoopInfoAnalysis())
-// MACHINE_FUNCTION_ANALYSIS("machine-post-dom-tree",
-// MachinePostDominatorTreeAnalysis())
// MACHINE_FUNCTION_ANALYSIS("machine-region-info",
// MachineRegionInfoPassAnalysis())
// MACHINE_FUNCTION_ANALYSIS("gc-analysis",
More information about the llvm-commits
mailing list