My Project
|
The main pass manager and pipeline builder. More...
#include <PassManager.h>
Classes | |
class | IRPrinterConfig |
A configuration struct provided to the IR printer instrumentation. More... | |
Public Member Functions | |
PassManager (MLIRContext *ctx, bool verifyPasses=true) | |
~PassManager () | |
LLVM_NODISCARD LogicalResult | run (ModuleOp module) |
Run the passes within this manager on the provided module. More... | |
void | disableMultithreading (bool disable=true) |
Disable support for multi-threading within the pass manager. More... | |
void | enableCrashReproducerGeneration (StringRef outputFile) |
void | addInstrumentation (std::unique_ptr< PassInstrumentation > pi) |
Add the provided instrumentation to the pass manager. More... | |
void | enableIRPrinting (std::unique_ptr< IRPrinterConfig > config) |
void | enableIRPrinting (std::function< bool(Pass *, Operation *)> shouldPrintBeforePass, std::function< bool(Pass *, Operation *)> shouldPrintAfterPass, bool printModuleScope, bool printAfterOnlyOnChange, raw_ostream &out) |
Add an instrumentation to print the IR before and after pass execution. More... | |
void | enableTiming (PassDisplayMode displayMode=PassDisplayMode::Pipeline) |
void | enableStatistics (PassDisplayMode displayMode=PassDisplayMode::Pipeline) |
Dump the statistics for each pass after running. More... | |
![]() | |
OpPassManager (OpPassManager &&rhs) | |
OpPassManager (const OpPassManager &rhs) | |
~OpPassManager () | |
OpPassManager & | operator= (const OpPassManager &rhs) |
pass_iterator | begin () |
pass_iterator | end () |
iterator_range< pass_iterator > | getPasses () |
LogicalResult | run (Operation *op, AnalysisManager am) |
Run the held passes over the given operation. More... | |
OpPassManager & | nest (const OperationName &nestedName) |
OpPassManager & | nest (StringRef nestedName) |
template<typename OpT > | |
OpPassManager & | nest () |
void | addPass (std::unique_ptr< Pass > pass) |
template<typename OpT > | |
void | addNestedPass (std::unique_ptr< Pass > pass) |
size_t | size () const |
Returns the number of passes held by this manager. More... | |
MLIRContext * | getContext () const |
Return an instance of the context. More... | |
const OperationName & | getOpName () const |
Return the operation name that this pass manager operates on. More... | |
detail::OpPassManagerImpl & | getImpl () |
Returns the internal implementation instance. More... | |
void | printAsTextualPipeline (raw_ostream &os) |
void | mergeStatisticsInto (OpPassManager &other) |
Merge the pass statistics of this class into 'other'. More... | |
Additional Inherited Members | |
![]() | |
using | pass_iterator = llvm::pointee_iterator< std::vector< std::unique_ptr< Pass > >::iterator > |
Iterator over the passes in this pass manager. More... | |
The main pass manager and pipeline builder.
PassManager::PassManager | ( | MLIRContext * | ctx, |
bool | verifyPasses = true |
||
) |
PassManager::~PassManager | ( | ) |
void PassManager::addInstrumentation | ( | std::unique_ptr< PassInstrumentation > | pi | ) |
Add the provided instrumentation to the pass manager.
void PassManager::disableMultithreading | ( | bool | disable = true | ) |
Disable support for multi-threading within the pass manager.
void PassManager::enableCrashReproducerGeneration | ( | StringRef | outputFile | ) |
Enable support for the pass manager to generate a reproducer on the event of a crash or a pass failure. outputFile
is a .mlir filename used to write the generated reproducer.
void PassManager::enableIRPrinting | ( | std::unique_ptr< IRPrinterConfig > | config | ) |
Add an instrumentation to print the IR before and after pass execution, using the provided configuration.
void PassManager::enableIRPrinting | ( | std::function< bool(Pass *, Operation *)> | shouldPrintBeforePass, |
std::function< bool(Pass *, Operation *)> | shouldPrintAfterPass, | ||
bool | printModuleScope, | ||
bool | printAfterOnlyOnChange, | ||
raw_ostream & | out | ||
) |
Add an instrumentation to print the IR before and after pass execution.
Add an instrumentation to print the IR before and after pass execution, using the provided fields to generate a default configuration:
Operation *
. These function should return true if the IR should be printed or not.void PassManager::enableStatistics | ( | PassDisplayMode | displayMode = PassDisplayMode::Pipeline | ) |
Dump the statistics for each pass after running.
Prompts the pass manager to print the statistics collected for each of the held passes after each call to 'run'.
void PassManager::enableTiming | ( | PassDisplayMode | displayMode = PassDisplayMode::Pipeline | ) |
Add an instrumentation to time the execution of passes and the computation of analyses. Note: Timing should be enabled after all other instrumentations to avoid any potential "ghost" timing from other instrumentations being unintentionally included in the timing results.
Add an instrumentation to time the execution of passes and the computation of analyses.
LogicalResult PassManager::run | ( | ModuleOp | module | ) |
Run the passes within this manager on the provided module.