diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp b/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp index 030a6464522..02fc1f605ef 100644 --- a/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp @@ -14,6 +14,7 @@ #include "llvm/IR/Function.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" +#include "llvm/IR/OptBisect.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -955,6 +956,9 @@ static bool inferAllPrototypeAttributes(Module &M, PreservedAnalyses InferFunctionAttrsPass::run(Module &M, AnalysisManager<Module> &AM) { + if (skipPassForModule(name(), M)) + return PreservedAnalyses::all(); + auto &TLI = AM.getResult<TargetLibraryAnalysis>(M); if (!inferAllPrototypeAttributes(M, TLI)) @@ -979,6 +983,9 @@ struct InferFunctionAttrsLegacyPass : public ModulePass { } bool runOnModule(Module &M) override { + if (skipModule(M)) + return false; + auto &TLI = getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(); return inferAllPrototypeAttributes(M, TLI); } |