MLIR
20.0.0git
|
This class contains all of the registered ODS operation classes. More...
#include "mlir/Tools/PDLL/ODS/Context.h"
Public Member Functions | |
Context () | |
~Context () | |
const AttributeConstraint & | insertAttributeConstraint (StringRef name, StringRef summary, StringRef cppClass) |
Insert a new attribute constraint with the context. More... | |
const TypeConstraint & | insertTypeConstraint (StringRef name, StringRef summary, StringRef cppClass) |
Insert a new type constraint with the context. More... | |
Dialect & | insertDialect (StringRef name) |
Insert a new dialect with the context. More... | |
const Dialect * | lookupDialect (StringRef name) const |
Lookup a dialect registered with the given name, or null if no dialect with that name was inserted. More... | |
auto | getDialects () const |
Return a range of all of the registered dialects. More... | |
std::pair< Operation *, bool > | insertOperation (StringRef name, StringRef summary, StringRef desc, StringRef nativeClassName, bool supportsResultTypeInferrence, SMLoc loc) |
Insert a new operation with the context. More... | |
const Operation * | lookupOperation (StringRef name) const |
Lookup an operation registered with the given name, or null if no operation with that name is registered. More... | |
void | print (raw_ostream &os) const |
Print the contents of this context to the provided stream. More... | |
This class contains all of the registered ODS operation classes.
|
default |
|
default |
|
inline |
const AttributeConstraint & Context::insertAttributeConstraint | ( | StringRef | name, |
StringRef | summary, | ||
StringRef | cppClass | ||
) |
Insert a new attribute constraint with the context.
Returns the inserted constraint, or a previously inserted constraint with the same name.
Definition at line 28 of file Context.cpp.
Dialect & Context::insertDialect | ( | StringRef | name | ) |
Insert a new dialect with the context.
Returns the inserted dialect, or a previously inserted dialect with the same name.
Definition at line 51 of file Context.cpp.
Referenced by insertOperation().
std::pair< Operation *, bool > Context::insertOperation | ( | StringRef | name, |
StringRef | summary, | ||
StringRef | desc, | ||
StringRef | nativeClassName, | ||
bool | supportsResultTypeInferrence, | ||
SMLoc | loc | ||
) |
Insert a new operation with the context.
Returns the inserted operation, and a boolean indicating if the operation newly inserted (false if the operation already existed).
Definition at line 64 of file Context.cpp.
References insertDialect(), and mlir::pdll::ods::Dialect::insertOperation().
const TypeConstraint & Context::insertTypeConstraint | ( | StringRef | name, |
StringRef | summary, | ||
StringRef | cppClass | ||
) |
Insert a new type constraint with the context.
Returns the inserted constraint, or a previously inserted constraint with the same name.
Definition at line 42 of file Context.cpp.
const Dialect * Context::lookupDialect | ( | StringRef | name | ) | const |
Lookup a dialect registered with the given name, or null if no dialect with that name was inserted.
Definition at line 58 of file Context.cpp.
Referenced by lookupOperation().
const Operation * Context::lookupOperation | ( | StringRef | name | ) | const |
Lookup an operation registered with the given name, or null if no operation with that name is registered.
Definition at line 73 of file Context.cpp.
References lookupDialect().
void Context::print | ( | raw_ostream & | os | ) | const |
Print the contents of this context to the provided stream.
Definition at line 91 of file Context.cpp.
References mlir::pdll::ods::Attribute::getConstraint(), mlir::pdll::ods::OperandOrResult::getConstraint(), mlir::pdll::ods::Constraint::getDemangledName(), mlir::pdll::ods::Attribute::getName(), mlir::pdll::ods::OperandOrResult::getName(), mlir::pdll::ods::OperandOrResult::getVariableLengthKind(), mlir::pdll::ods::Attribute::isOptional(), mlir::pdll::ods::Optional, mlir::pdll::ods::Single, sortMapByName(), and mlir::pdll::ods::Variadic.