9 #ifndef MLIR_PASS_PASSINSTRUMENTATION_H_
10 #define MLIR_PASS_PASSINSTRUMENTATION_H_
22 struct PassInstrumentorImpl;
123 std::unique_ptr<detail::PassInstrumentorImpl>
impl;
135 auto pair = PairInfo::getEmptyKey();
136 return {pair.first,
reinterpret_cast<mlir::Pass *
>(pair.second)};
139 auto pair = PairInfo::getTombstoneKey();
140 return {pair.first,
reinterpret_cast<mlir::Pass *
>(pair.second)};
Operation is the basic unit of execution within MLIR.
PassInstrumentation provides several entry points into the pass manager infrastructure.
virtual void runAfterPipeline(std::optional< OperationName > name, const PipelineParentInfo &parentInfo)
A callback to run after a pass pipeline has executed.
virtual void runBeforeAnalysis(StringRef name, TypeID id, Operation *op)
A callback to run before an analysis is computed.
virtual ~PassInstrumentation()=0
virtual void runBeforePass(Pass *pass, Operation *op)
A callback to run before a pass is executed.
virtual void runAfterAnalysis(StringRef name, TypeID id, Operation *op)
A callback to run before an analysis is computed.
virtual void runAfterPass(Pass *pass, Operation *op)
A callback to run after a pass is successfully executed.
virtual void runAfterPassFailed(Pass *pass, Operation *op)
A callback to run when a pass execution fails.
virtual void runBeforePipeline(std::optional< OperationName > name, const PipelineParentInfo &parentInfo)
A callback to run before a pass pipeline is executed.
This class holds a collection of PassInstrumentation objects, and invokes their respective call backs...
void runAfterPassFailed(Pass *pass, Operation *op)
See PassInstrumentation::runAfterPassFailed for details.
void addInstrumentation(std::unique_ptr< PassInstrumentation > pi)
Add the given instrumentation to the collection.
PassInstrumentor(const PassInstrumentor &)=delete
void runBeforeAnalysis(StringRef name, TypeID id, Operation *op)
See PassInstrumentation::runBeforeAnalysis for details.
void runAfterPass(Pass *pass, Operation *op)
See PassInstrumentation::runAfterPass for details.
void runAfterAnalysis(StringRef name, TypeID id, Operation *op)
See PassInstrumentation::runAfterAnalysis for details.
void runBeforePass(Pass *pass, Operation *op)
See PassInstrumentation::runBeforePass for details.
PassInstrumentor(PassInstrumentor &&)=delete
void runBeforePipeline(std::optional< OperationName > name, const PassInstrumentation::PipelineParentInfo &parentInfo)
See PassInstrumentation::runBeforePipeline for details.
void runAfterPipeline(std::optional< OperationName > name, const PassInstrumentation::PipelineParentInfo &parentInfo)
See PassInstrumentation::runAfterPipeline for details.
The abstract base pass class.
This class provides an efficient unique identifier for a specific C++ type.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Include the generated interface declarations.
static T getTombstoneKey()
static unsigned getHashValue(T val)
static bool isEqual(T lhs, T rhs)
This struct represents information related to the parent pass of pipeline.
Pass * parentPass
The pass that spawned this pipeline.
uint64_t parentThreadID
The thread of the parent pass that the current pipeline was spawned from.