[llvm] 80a1e21 - [PM] Move PassInfoMixin to detail namespace
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 23 20:35:09 PDT 2026
Author: Aiden Grossman
Date: 2026-08-23T20:35:05-07:00
New Revision: 80a1e2125c7ec7db402925d153c0dbd6041d3004
URL: https://github.com/llvm/llvm-project/commit/80a1e2125c7ec7db402925d153c0dbd6041d3004
DIFF: https://github.com/llvm/llvm-project/commit/80a1e2125c7ec7db402925d153c0dbd6041d3004.diff
LOG: [PM] Move PassInfoMixin to detail namespace
To follow up on the TODO and to prevent backslide (which we have had
quite a bit of).
Reviewers: arsenm, nikic, aengelke, aeubanks
Pull Request: https://github.com/llvm/llvm-project/pull/218198
Added:
Modified:
llvm/include/llvm/IR/PassManager.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/PassManager.h b/llvm/include/llvm/IR/PassManager.h
index ca874eaf03cb6..da2eec0756c5b 100644
--- a/llvm/include/llvm/IR/PassManager.h
+++ b/llvm/include/llvm/IR/PassManager.h
@@ -68,13 +68,6 @@ template <typename DerivedT> struct InfoMixin {
return Name;
}
};
-} // namespace detail
-
-class Function;
-class Module;
-
-// Forward declare the analysis manager template.
-template <typename IRUnitT, typename... ExtraArgTs> class AnalysisManager;
/// A CRTP mix-in to automatically provide informational APIs needed for
/// passes.
@@ -84,7 +77,6 @@ template <typename IRUnitT, typename... ExtraArgTs> class AnalysisManager;
/// Actual passes should inherit from RequiredPassInfoMixin or
/// OptionalPassInfoMixin.
///
-/// TODO: move to a detail namespace once we've branched for LLVM 23.
template <typename DerivedT>
struct PassInfoMixin : detail::InfoMixin<DerivedT> {
void printPipeline(raw_ostream &OS,
@@ -97,16 +89,23 @@ struct PassInfoMixin : detail::InfoMixin<DerivedT> {
// TODO: remove once out of tree users are updated.
static bool isRequired() { return false; }
};
+} // namespace detail
+
+class Function;
+class Module;
+
+// Forward declare the analysis manager template.
+template <typename IRUnitT, typename... ExtraArgTs> class AnalysisManager;
/// A CRTP mix-in for passes that should not be skipped.
template <typename DerivedT>
-struct RequiredPassInfoMixin : PassInfoMixin<DerivedT> {
+struct RequiredPassInfoMixin : detail::PassInfoMixin<DerivedT> {
static bool isRequired() { return true; }
};
/// A CRTP mix-in for passes that can be skipped.
template <typename DerivedT>
-struct OptionalPassInfoMixin : PassInfoMixin<DerivedT> {
+struct OptionalPassInfoMixin : detail::PassInfoMixin<DerivedT> {
static bool isRequired() { return false; }
};
More information about the llvm-commits
mailing list