diff options
Diffstat (limited to 'include/llvm/Pass.h')
-rw-r--r-- | include/llvm/Pass.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h index 99604cdbc9caa..2a21b82876bbb 100644 --- a/include/llvm/Pass.h +++ b/include/llvm/Pass.h @@ -29,7 +29,6 @@ #ifndef LLVM_PASS_H #define LLVM_PASS_H -#include "llvm/Support/Compiler.h" #include <string> namespace llvm { @@ -251,6 +250,11 @@ public: explicit ModulePass(char &pid) : Pass(PT_Module, pid) {} // Force out-of-line virtual method. ~ModulePass() override; + +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 skipModule(Module &M) const; }; @@ -310,9 +314,10 @@ public: PassManagerType getPotentialPassManagerType() const override; protected: - /// skipOptnoneFunction - This function has Attribute::OptimizeNone - /// and most transformation passes should skip it. - bool skipOptnoneFunction(const Function &F) const; + /// Optional passes call this function to check whether the pass should be + /// skipped. This is the case when Attribute::OptimizeNone is set or when + /// optimization bisect is over the limit. + bool skipFunction(const Function &F) const; }; @@ -359,9 +364,10 @@ public: PassManagerType getPotentialPassManagerType() const override; protected: - /// skipOptnoneFunction - Containing function has Attribute::OptimizeNone - /// and most transformation passes should skip it. - bool skipOptnoneFunction(const BasicBlock &BB) const; + /// Optional passes call this function to check whether the pass should be + /// skipped. This is the case when Attribute::OptimizeNone is set or when + /// optimization bisect is over the limit. + bool skipBasicBlock(const BasicBlock &BB) const; }; /// If the user specifies the -time-passes argument on an LLVM tool command line |