8 #ifndef MLIR_PASS_PASSDETAIL_H_
9 #define MLIR_PASS_PASSDETAIL_H_
14 #include "llvm/ADT/ArrayRef.h"
15 #include "llvm/Support/FormatVariadic.h"
24 static constexpr StringLiteral
tag =
"pass-execution";
25 void print(raw_ostream &os)
const override;
29 return irUnits.empty() ? nullptr
30 : llvm::dyn_cast_if_present<Operation *>(
irUnits[0]);
46 :
public PassWrapper<OpToOpPassAdaptor, OperationPass<>> {
75 return asyncExecutors;
83 void runOnOperationImpl(
bool verifyPasses);
86 void runOnOperationAsyncImpl(
bool verifyPasses);
93 bool verifyPasses,
unsigned parentInitGeneration);
123 bool localReproducer);
149 std::unique_ptr<Impl>
impl;
This class represents an analysis manager for a particular operation instance.
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
MLIRContext is the top-level object for a collection of MLIR operations.
This class represents a pass manager that runs passes on either a specific operation type,...
Operation is the basic unit of execution within MLIR.
This class holds a collection of PassInstrumentation objects, and invokes their respective call backs...
The main pass manager and pipeline builder.
std::function< std::unique_ptr< ReproducerStream >(std::string &error)> ReproducerStreamFactory
Method type for constructing ReproducerStream.
This class provides a CRTP wrapper around a base pass class to define several necessary utility metho...
The abstract base pass class.
An adaptor pass used to run operation passes over nested operations.
void getDependentDialects(DialectRegistry &dialects) const override
Populate the set of dependent dialects for the passes in the current adaptor.
MutableArrayRef< OpPassManager > getPassManagers()
Returns the pass managers held by this adaptor.
OpToOpPassAdaptor(const OpToOpPassAdaptor &rhs)=default
void runOnOperation() override
The polymorphic API that runs the pass over the currently held operation.
std::string getAdaptorName()
Returns the adaptor pass name.
MutableArrayRef< SmallVector< OpPassManager, 1 > > getParallelPassManagers()
Return the async pass managers held by this parallel adaptor.
LogicalResult tryMergeInto(MLIRContext *ctx, OpToOpPassAdaptor &rhs)
Try to merge the current pass adaptor into 'rhs'.
OpToOpPassAdaptor(OpPassManager &&mgr)
void initialize(iterator_range< PassManager::pass_iterator > passes, Operation *op, bool pmFlagVerifyPasses)
Initialize the generator in preparation for reproducer generation.
void removeLastReproducerFor(Pass *pass, Operation *op)
Remove the last recorded reproducer anchored at the given pass and operation.
void finalize(Operation *rootOp, LogicalResult executionResult)
Finalize the current run of the generator, generating any necessary reproducers if the provided execu...
PassCrashReproducerGenerator(PassManager::ReproducerStreamFactory &streamFactory, bool localReproducer)
void prepareReproducerFor(Pass *pass, Operation *op)
Prepare a new reproducer for the given pass, operating on op.
~PassCrashReproducerGenerator()
CRTP Implementation of an action.
virtual ArrayRef< IRUnit > getContextIRUnits() const
Return the set of IR units that are associated with this action.
ArrayRef< IRUnit > irUnits
Set of IR units (operations, regions, blocks, values) that are associated with this action.
Include the generated interface declarations.
This class represents an efficient way to signal success or failure.
Encapsulate the "action" of executing a single pass, used for the MLIR tracing infrastructure.
PassExecutionAction(ArrayRef< IRUnit > irUnits, const Pass &pass)
void print(raw_ostream &os) const override
const Pass & getPass() const
Operation * getOp() const
static constexpr StringLiteral tag
This struct represents information related to the parent pass of pipeline.