#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>
usingnamespacemlir;
usingnamespacemlir::detail;
PassExecutionAction::PassExecutionAction(ArrayRef<IRUnit> irUnits,
const Pass &pass)
: … { … }
void PassExecutionAction::print(raw_ostream &os) const { … }
Operation *PassExecutionAction::getOp() const { … }
void Pass::anchor() { … }
LogicalResult Pass::initializeOptions(
StringRef options,
function_ref<LogicalResult(const Twine &)> errorHandler) { … }
void Pass::copyOptionValuesFrom(const Pass *other) { … }
void Pass::printAsTextualPipeline(raw_ostream &os) { … }
namespace mlir {
namespace detail {
struct OpPassManagerImpl { … };
}
}
void OpPassManagerImpl::mergeInto(OpPassManagerImpl &rhs) { … }
OpPassManager &OpPassManagerImpl::nest(OpPassManager &&nested) { … }
void OpPassManagerImpl::addPass(std::unique_ptr<Pass> pass) { … }
void OpPassManagerImpl::clear() { … }
LogicalResult OpPassManagerImpl::finalizePassList(MLIRContext *ctx) { … }
bool OpPassManagerImpl::canScheduleOn(MLIRContext &context,
OperationName opName) { … }
OpPassManager::OpPassManager(Nesting nesting)
: … { … }
OpPassManager::OpPassManager(StringRef name, Nesting nesting)
: … { … }
OpPassManager::OpPassManager(OperationName name, Nesting nesting)
: … { … }
OpPassManager::OpPassManager(OpPassManager &&rhs) { … }
OpPassManager::OpPassManager(const OpPassManager &rhs) { … }
OpPassManager &OpPassManager::operator=(const OpPassManager &rhs) { … }
OpPassManager &OpPassManager::operator=(OpPassManager &&rhs) { … }
OpPassManager::~OpPassManager() = default;
OpPassManager::pass_iterator OpPassManager::begin() { … }
OpPassManager::pass_iterator OpPassManager::end() { … }
OpPassManager::const_pass_iterator OpPassManager::begin() const { … }
OpPassManager::const_pass_iterator OpPassManager::end() const { … }
OpPassManager &OpPassManager::nest(OperationName nestedName) { … }
OpPassManager &OpPassManager::nest(StringRef nestedName) { … }
OpPassManager &OpPassManager::nestAny() { … }
void OpPassManager::addPass(std::unique_ptr<Pass> pass) { … }
void OpPassManager::clear() { … }
size_t OpPassManager::size() const { … }
OpPassManagerImpl &OpPassManager::getImpl() { … }
std::optional<StringRef> OpPassManager::getOpName() const { … }
std::optional<OperationName>
OpPassManager::getOpName(MLIRContext &context) const { … }
StringRef OpPassManager::getOpAnchorName() const { … }
void printAsTextualPipeline(
raw_ostream &os, StringRef anchorName,
const llvm::iterator_range<OpPassManager::pass_iterator> &passes) { … }
void OpPassManager::printAsTextualPipeline(raw_ostream &os) const { … }
void OpPassManager::dump() { … }
static void registerDialectsForPipeline(const OpPassManager &pm,
DialectRegistry &dialects) { … }
void OpPassManager::getDependentDialects(DialectRegistry &dialects) const { … }
void OpPassManager::setNesting(Nesting nesting) { … }
OpPassManager::Nesting OpPassManager::getNesting() { … }
LogicalResult OpPassManager::initialize(MLIRContext *context,
unsigned newInitGeneration) { … }
llvm::hash_code OpPassManager::hash() { … }
LogicalResult OpToOpPassAdaptor::run(Pass *pass, Operation *op,
AnalysisManager am, bool verifyPasses,
unsigned parentInitGeneration) { … }
LogicalResult OpToOpPassAdaptor::runPipeline(
OpPassManager &pm, Operation *op, AnalysisManager am, bool verifyPasses,
unsigned parentInitGeneration, PassInstrumentor *instrumentor,
const PassInstrumentation::PipelineParentInfo *parentInfo) { … }
static OpPassManager *
findPassManagerWithAnchor(MutableArrayRef<OpPassManager> mgrs, StringRef name) { … }
static OpPassManager *findPassManagerFor(MutableArrayRef<OpPassManager> mgrs,
OperationName name,
MLIRContext &context) { … }
OpToOpPassAdaptor::OpToOpPassAdaptor(OpPassManager &&mgr) { … }
void OpToOpPassAdaptor::getDependentDialects(DialectRegistry &dialects) const { … }
LogicalResult OpToOpPassAdaptor::tryMergeInto(MLIRContext *ctx,
OpToOpPassAdaptor &rhs) { … }
std::string OpToOpPassAdaptor::getAdaptorName() { … }
void OpToOpPassAdaptor::runOnOperation() { … }
void OpToOpPassAdaptor::runOnOperation(bool verifyPasses) { … }
void OpToOpPassAdaptor::runOnOperationImpl(bool verifyPasses) { … }
static bool hasSizeMismatch(ArrayRef<OpPassManager> lhs,
ArrayRef<OpPassManager> rhs) { … }
void OpToOpPassAdaptor::runOnOperationAsyncImpl(bool verifyPasses) { … }
PassManager::PassManager(MLIRContext *ctx, StringRef operationName,
Nesting nesting)
: … { … }
PassManager::PassManager(OperationName operationName, Nesting nesting)
: … { … }
PassManager::~PassManager() = default;
void PassManager::enableVerifier(bool enabled) { … }
LogicalResult PassManager::run(Operation *op) { … }
void PassManager::addInstrumentation(std::unique_ptr<PassInstrumentation> pi) { … }
LogicalResult PassManager::runPasses(Operation *op, AnalysisManager am) { … }
AnalysisManager AnalysisManager::nest(Operation *op) { … }
AnalysisManager AnalysisManager::nestImmediate(Operation *op) { … }
void detail::NestedAnalysisMap::invalidate(
const detail::PreservedAnalyses &pa) { … }
PassInstrumentation::~PassInstrumentation() = default;
void PassInstrumentation::runBeforePipeline(
std::optional<OperationName> name, const PipelineParentInfo &parentInfo) { … }
void PassInstrumentation::runAfterPipeline(
std::optional<OperationName> name, const PipelineParentInfo &parentInfo) { … }
namespace mlir {
namespace detail {
struct PassInstrumentorImpl { … };
}
}
PassInstrumentor::PassInstrumentor() : … { … }
PassInstrumentor::~PassInstrumentor() = default;
void PassInstrumentor::runBeforePipeline(
std::optional<OperationName> name,
const PassInstrumentation::PipelineParentInfo &parentInfo) { … }
void PassInstrumentor::runAfterPipeline(
std::optional<OperationName> name,
const PassInstrumentation::PipelineParentInfo &parentInfo) { … }
void PassInstrumentor::runBeforePass(Pass *pass, Operation *op) { … }
void PassInstrumentor::runAfterPass(Pass *pass, Operation *op) { … }
void PassInstrumentor::runAfterPassFailed(Pass *pass, Operation *op) { … }
void PassInstrumentor::runBeforeAnalysis(StringRef name, TypeID id,
Operation *op) { … }
void PassInstrumentor::runAfterAnalysis(StringRef name, TypeID id,
Operation *op) { … }
void PassInstrumentor::addInstrumentation(
std::unique_ptr<PassInstrumentation> pi) { … }