54 #ifndef LLVM_IR_PASSINSTRUMENTATION_H 55 #define LLVM_IR_PASSINSTRUMENTATION_H 61 #include <type_traits> 65 class PreservedAnalyses;
100 template <
typename CallableT>
102 AfterPassInvalidatedCallbacks.
emplace_back(std::move(C));
105 template <
typename CallableT>
110 template <
typename CallableT>
121 AfterPassInvalidatedCallbacks;
123 BeforeAnalysisCallbacks;
125 AfterAnalysisCallbacks;
144 template <
typename IRUnitT,
typename PassT>
149 bool ShouldRun =
true;
150 for (
auto &
C : Callbacks->BeforePassCallbacks)
158 template <
typename IRUnitT,
typename PassT>
161 for (
auto &
C : Callbacks->AfterPassCallbacks)
168 template <
typename IRUnitT,
typename PassT>
171 for (
auto &
C : Callbacks->AfterPassInvalidatedCallbacks)
177 template <
typename IRUnitT,
typename PassT>
180 for (
auto &
C : Callbacks->BeforeAnalysisCallbacks)
186 template <
typename IRUnitT,
typename PassT>
189 for (
auto &
C : Callbacks->AfterAnalysisCallbacks)
198 template <
typename IRUnitT,
typename... ExtraArgsT>
Pass interface - Implemented by all 'passes'.
void registerAfterAnalysisCallback(CallableT C)
This class represents lattice values for constants.
void operator=(const PassInstrumentationCallbacks &)=delete
PassInstrumentation(PassInstrumentationCallbacks *CB=nullptr)
Callbacks object is not owned by PassInstrumentation, its life-time should at least match the life-ti...
void(StringRef, Any) BeforeAnalysisFunc
void(StringRef, Any) AfterAnalysisFunc
bool runBeforePass(const PassT &Pass, const IRUnitT &IR) const
BeforePass instrumentation point - takes Pass instance to be executed and constant reference to IR it...
bool invalidate(IRUnitT &, const class llvm::PreservedAnalyses &, ExtraArgsT...)
Handle invalidation from the pass manager when PassInstrumentation is used as the result of PassInstr...
void(StringRef, Any) AfterPassFunc
A set of analyses that are preserved following a run of a transformation pass.
void registerBeforeAnalysisCallback(CallableT C)
void registerBeforePassCallback(CallableT C)
void(StringRef) AfterPassInvalidatedFunc
void runAfterPass(const PassT &Pass, const IRUnitT &IR) const
AfterPass instrumentation point - takes Pass instance that has just been executed and constant refere...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
void runAfterPassInvalidated(const PassT &Pass) const
AfterPassInvalidated instrumentation point - takes Pass instance that has just been executed...
void registerAfterPassInvalidatedCallback(CallableT C)
block Block Frequency Analysis
void emplace_back(ArgTypes &&... Args)
void runBeforeAnalysis(const PassT &Analysis, const IRUnitT &IR) const
BeforeAnalysis instrumentation point - takes Analysis instance to be executed and constant reference ...
void registerAfterPassCallback(CallableT C)
This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass ...
StringRef - Represent a constant reference to a string, i.e.
This class provides instrumentation entry points for the Pass Manager, doing calls to callbacks regis...
bool(StringRef, Any) BeforePassFunc
Statically lint checks LLVM IR
PassInstrumentationCallbacks()
void runAfterAnalysis(const PassT &Analysis, const IRUnitT &IR) const
AfterAnalysis instrumentation point - takes Analysis instance that has just been executed and constan...