MLIR
20.0.0git
|
This decl represents a user defined constraint. More...
#include "mlir/Tools/PDLL/AST/Nodes.h"
Public Member Functions | |
const Name & | getName () const |
Return the name of the constraint. More... | |
MutableArrayRef< VariableDecl * > | getInputs () |
Return the input arguments of this constraint. More... | |
ArrayRef< VariableDecl * > | getInputs () const |
std::optional< StringRef > | getNativeInputType (unsigned index) const |
Return the explicit native type to use for the given input. More... | |
MutableArrayRef< VariableDecl * > | getResults () |
Return the explicit results of the constraint declaration. More... | |
ArrayRef< VariableDecl * > | getResults () const |
std::optional< StringRef > | getCodeBlock () const |
Return the optional code block of this constraint, if this is a native constraint with a provided implementation. More... | |
const CompoundStmt * | getBody () const |
Return the body of this constraint if this constraint is a PDLL constraint, otherwise returns nullptr. More... | |
Type | getResultType () const |
Return the result type of this constraint. More... | |
bool | isExternal () const |
Returns true if this constraint is external. More... | |
Static Public Member Functions | |
static UserConstraintDecl * | createNative (Context &ctx, const Name &name, ArrayRef< VariableDecl * > inputs, ArrayRef< VariableDecl * > results, std::optional< StringRef > codeBlock, Type resultType, ArrayRef< StringRef > nativeInputTypes={}) |
Create a native constraint with the given optional code block. More... | |
static UserConstraintDecl * | createPDLL (Context &ctx, const Name &name, ArrayRef< VariableDecl * > inputs, ArrayRef< VariableDecl * > results, const CompoundStmt *body, Type resultType) |
Create a PDLL constraint with the given body. More... | |
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) | |
This decl represents a user defined constraint.
This is either:
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
Return the input arguments of this constraint.
Definition at line 908 of file Nodes.h.
Referenced by getInputs().
|
inline |
Definition at line 911 of file Nodes.h.
References getInputs().
|
inline |
Return the name of the constraint.
Definition at line 905 of file Nodes.h.
References mlir::pdll::ast::Decl::getName().
std::optional< StringRef > UserConstraintDecl::getNativeInputType | ( | unsigned | index | ) | const |
|
inline |
Return the explicit results of the constraint declaration.
May be empty, even if the constraint has results (e.g. in the case of inferred results).
Definition at line 921 of file Nodes.h.
Referenced by getResults().
|
inline |
Definition at line 924 of file Nodes.h.
References getResults().
|
inline |
|
inline |