MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::pdll::ast::PatternDecl Class Reference

This Decl represents a single Pattern. More...

#include "mlir/Tools/PDLL/AST/Nodes.h"

+ Inheritance diagram for mlir::pdll::ast::PatternDecl:

Public Member Functions

std::optional< uint16_t > getBenefit () const
 Return the benefit of this pattern if specified, or std::nullopt. More...
 
bool hasBoundedRewriteRecursion () const
 Return if this pattern has bounded rewrite recursion. More...
 
const CompoundStmtgetBody () const
 Return the body of this pattern. More...
 
const OpRewriteStmtgetRootRewriteStmt () const
 Return the root rewrite statement of this pattern. More...
 

Static Public Member Functions

static PatternDeclcreate (Context &ctx, SMRange location, const Name *name, std::optional< uint16_t > benefit, bool hasBoundedRecursion, const CompoundStmt *body)
 
- Static Public Member Functions inherited from mlir::pdll::ast::Node::NodeBase< T, BaseT >
static bool classof (const Node *node)
 Provide type casting support. More...
 

Additional Inherited Members

- Public Types inherited from mlir::pdll::ast::Node::NodeBase< T, BaseT >
using Base = NodeBase< T, BaseT >
 
- Protected Member Functions inherited from mlir::pdll::ast::Node::NodeBase< T, BaseT >
template<typename... Args>
 NodeBase (SMRange loc, Args &&...args)
 

Detailed Description

This Decl represents a single Pattern.

Definition at line 1037 of file Nodes.h.

Member Function Documentation

◆ create()

PatternDecl * PatternDecl::create ( Context ctx,
SMRange  location,
const Name name,
std::optional< uint16_t >  benefit,
bool  hasBoundedRecursion,
const CompoundStmt body 
)
static

Definition at line 520 of file Nodes.cpp.

References mlir::pdll::ast::Context::getAllocator().

◆ getBenefit()

std::optional<uint16_t> mlir::pdll::ast::PatternDecl::getBenefit ( ) const
inline

Return the benefit of this pattern if specified, or std::nullopt.

Definition at line 1045 of file Nodes.h.

◆ getBody()

const CompoundStmt* mlir::pdll::ast::PatternDecl::getBody ( ) const
inline

Return the body of this pattern.

Definition at line 1051 of file Nodes.h.

◆ getRootRewriteStmt()

const OpRewriteStmt* mlir::pdll::ast::PatternDecl::getRootRewriteStmt ( ) const
inline

Return the root rewrite statement of this pattern.

Definition at line 1054 of file Nodes.h.

References mlir::pdll::ast::CompoundStmt::getChildren().

◆ hasBoundedRewriteRecursion()

bool mlir::pdll::ast::PatternDecl::hasBoundedRewriteRecursion ( ) const
inline

Return if this pattern has bounded rewrite recursion.

Definition at line 1048 of file Nodes.h.


The documentation for this class was generated from the following files: