MLIR  19.0.0git
Classes | Namespaces | Functions
Pass.cpp File Reference
#include "mlir/Pass/Pass.h"
#include "PassDetail.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/Threading.h"
#include "mlir/IR/Verifier.h"
#include "mlir/Support/FileUtilities.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/CrashRecoveryContext.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/ToolOutputFile.h"
#include <optional>

Go to the source code of this file.

Classes

struct  mlir::detail::OpPassManagerImpl
 
struct  mlir::detail::PassInstrumentorImpl
 

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::detail
 Detect if any of the given parameter types has a sub-element handler.
 

Functions

void printAsTextualPipeline (raw_ostream &os, StringRef anchorName, const llvm::iterator_range< OpPassManager::pass_iterator > &passes)
 Prints out the passes of the pass manager as the textual representation of pipelines. More...
 
static void registerDialectsForPipeline (const OpPassManager &pm, DialectRegistry &dialects)
 
static OpPassManagerfindPassManagerWithAnchor (MutableArrayRef< OpPassManager > mgrs, StringRef name)
 Find an operation pass manager with the given anchor name, or nullptr if one does not exist. More...
 
static OpPassManagerfindPassManagerFor (MutableArrayRef< OpPassManager > mgrs, OperationName name, MLIRContext &context)
 Find an operation pass manager that can operate on an operation of the given type, or nullptr if one does not exist. More...
 
static bool hasSizeMismatch (ArrayRef< OpPassManager > lhs, ArrayRef< OpPassManager > rhs)
 Utility functor that checks if the two ranges of pass managers have a size mismatch. More...
 

Function Documentation

◆ findPassManagerFor()

static OpPassManager* findPassManagerFor ( MutableArrayRef< OpPassManager mgrs,
OperationName  name,
MLIRContext context 
)
static

Find an operation pass manager that can operate on an operation of the given type, or nullptr if one does not exist.

Definition at line 614 of file Pass.cpp.

References mlir::OpPassManager::getImpl().

◆ findPassManagerWithAnchor()

static OpPassManager* findPassManagerWithAnchor ( MutableArrayRef< OpPassManager mgrs,
StringRef  name 
)
static

Find an operation pass manager with the given anchor name, or nullptr if one does not exist.

Definition at line 606 of file Pass.cpp.

References mlir::OpPassManager::getOpAnchorName().

Referenced by mlir::detail::OpToOpPassAdaptor::tryMergeInto().

◆ hasSizeMismatch()

static bool hasSizeMismatch ( ArrayRef< OpPassManager lhs,
ArrayRef< OpPassManager rhs 
)
static

Utility functor that checks if the two ranges of pass managers have a size mismatch.

Definition at line 744 of file Pass.cpp.

◆ printAsTextualPipeline()

void printAsTextualPipeline ( raw_ostream &  os,
StringRef  anchorName,
const llvm::iterator_range< OpPassManager::pass_iterator > &  passes 
)

Prints out the passes of the pass manager as the textual representation of pipelines.

Definition at line 393 of file Pass.cpp.

References mlir::Pass::printAsTextualPipeline().

◆ registerDialectsForPipeline()

static void registerDialectsForPipeline ( const OpPassManager pm,
DialectRegistry dialects 
)
static

Definition at line 416 of file Pass.cpp.

References mlir::OpPassManager::getPasses().

Referenced by mlir::OpPassManager::getDependentDialects().