Index: include/llvm/Analysis/CallGraphSCCPass.h =================================================================== --- include/llvm/Analysis/CallGraphSCCPass.h +++ include/llvm/Analysis/CallGraphSCCPass.h @@ -81,7 +81,7 @@ protected: /// Optional passes call this function to check whether the pass should be /// skipped. This is the case when optimization bisect is over the limit. - bool skipSCC(CallGraphSCC &SCC) const; + virtual bool skipSCC(CallGraphSCC &SCC) const; }; /// CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on. Index: lib/Transforms/IPO/InlineAlways.cpp =================================================================== --- lib/Transforms/IPO/InlineAlways.cpp +++ lib/Transforms/IPO/InlineAlways.cpp @@ -53,6 +53,11 @@ bool doFinalization(CallGraph &CG) override { return removeDeadFunctions(CG, /*AlwaysInlineOnly=*/ true); } + +protected: + // AlwaysInliner can't be skipped but it gets its runOnSCC implementation + // from Inliner, which can be skipped, so we need to override the skip check. + bool skipSCC(CallGraphSCC &SCC) const override { return false; } }; }