MLIR  15.0.0git
Functions
MLIRGen.cpp File Reference
#include "mlir/Tools/PDLL/CodeGen/MLIRGen.h"
#include "mlir/Dialect/PDL/IR/PDL.h"
#include "mlir/Dialect/PDL/IR/PDLOps.h"
#include "mlir/Dialect/PDL/IR/PDLTypes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Verifier.h"
#include "mlir/Parser/Parser.h"
#include "mlir/Tools/PDLL/AST/Context.h"
#include "mlir/Tools/PDLL/AST/Nodes.h"
#include "mlir/Tools/PDLL/AST/Types.h"
#include "mlir/Tools/PDLL/ODS/Context.h"
#include "mlir/Tools/PDLL/ODS/Operation.h"
#include "llvm/ADT/ScopedHashTable.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/TypeSwitch.h"
+ Include dependency graph for MLIRGen.cpp:

Go to the source code of this file.

Functions

static void checkAndNestUnderRewriteOp (OpBuilder &builder, Value rootExpr, Location loc)
 If the given builder is nested under a PDL PatternOp, build a rewrite operation and update the builder to nest under it. More...
 

Function Documentation

◆ checkAndNestUnderRewriteOp()

static void checkAndNestUnderRewriteOp ( OpBuilder builder,
Value  rootExpr,
Location  loc 
)
static

If the given builder is nested under a PDL PatternOp, build a rewrite operation and update the builder to nest under it.

This is necessary for PDLL operation rewrite statements that are directly nested within a Pattern.

Definition at line 200 of file MLIRGen.cpp.

References mlir::Operation::create(), mlir::pdll::ast::Name::create(), mlir::OpBuilder::create(), mlir::OpBuilder::createBlock(), mlir::pdll::ast::Type::dyn_cast(), mlir::pdll::ast::CallExpr::getArguments(), mlir::pdll::ast::OperationExpr::getAttributes(), mlir::pdll::ast::PatternDecl::getBenefit(), mlir::pdll::ast::PatternDecl::getBody(), mlir::pdll::ast::CallExpr::getCallableExpr(), mlir::pdll::ast::CompoundStmt::getChildren(), mlir::pdll::ast::VariableDecl::getConstraints(), mlir::pdll::ast::DeclRefExpr::getDecl(), mlir::pdll::ast::TupleExpr::getElements(), mlir::pdll::ast::VariableDecl::getInitExpr(), mlir::pdll::ast::UserConstraintDecl::getInputs(), mlir::OpBuilder::getInsertionBlock(), mlir::pdll::ast::Node::getLoc(), mlir::pdll::ast::MemberAccessExpr::getMemberName(), mlir::pdll::ast::Name::getName(), mlir::pdll::ast::OperationExpr::getName(), mlir::pdll::ast::Decl::getName(), mlir::pdll::ast::OperationExpr::getOperands(), mlir::pdll::ast::MemberAccessExpr::getParentExpr(), mlir::Block::getParentOp(), mlir::pdll::ast::ReplaceStmt::getReplExprs(), mlir::Operation::getResults(), mlir::pdll::ast::OperationExpr::getResultTypes(), mlir::pdll::ast::RewriteStmt::getRewriteBody(), mlir::pdll::ast::OpRewriteStmt::getRootOpExpr(), mlir::pdll::ast::Expr::getType(), mlir::pdll::ast::VariableDecl::getType(), mlir::pdll::ast::AttributeExpr::getValue(), mlir::pdll::ast::TypeExpr::getValue(), mlir::pdll::ast::LetStmt::getVarDecl(), mlir::pdll::ast::Type::isa(), mlir::Type::isa(), mlir::parseAttribute(), mlir::parseType(), resultIndex(), and rewrite().