diff --git a/llvm/include/llvm/IR/PassManager.h b/llvm/include/llvm/IR/PassManager.h --- a/llvm/include/llvm/IR/PassManager.h +++ b/llvm/include/llvm/IR/PassManager.h @@ -548,6 +548,7 @@ } template + __attribute__((minsize)) std::enable_if_t::value> addPass(PassT &&Pass) { using PassModelT = @@ -564,6 +565,7 @@ /// implementation complexity and avoid potential invalidation issues that may /// happen with nested pass managers of the same type. template + __attribute__((minsize)) std::enable_if_t::value> addPass(PassT &&Pass) { for (auto &P : Pass.Passes) diff --git a/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h b/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h --- a/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h +++ b/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h @@ -103,6 +103,7 @@ /// to the end of \var IsLoopNestPass so we can easily identify the types of /// passes in the pass manager later. template + __attribute__((minsize)) std::enable_if_t::value> addPass(PassT &&Pass) { using LoopPassModelT = @@ -114,6 +115,7 @@ } template + __attribute__((minsize)) std::enable_if_t::value> addPass(PassT &&Pass) { using LoopNestPassModelT = @@ -129,6 +131,7 @@ // `RepeatedPass` has a templated `run` method that will result in incorrect // detection of `HasRunOnLoopT`. template + __attribute__((minsize)) std::enable_if_t::value> addPass(RepeatedPass &&Pass) { using RepeatedLoopPassModelT = @@ -141,6 +144,7 @@ } template + __attribute__((minsize)) std::enable_if_t::value> addPass(RepeatedPass &&Pass) { using RepeatedLoopNestPassModelT =