MLIR
20.0.0git
|
#include "mlir/TableGen/Constraint.h"
Public Types | |
enum | Kind { CK_Attr , CK_Region , CK_Successor , CK_Type , CK_Uncategorized } |
Public Member Functions | |
Constraint (const llvm::Record *record, Kind kind) | |
Constraint (const llvm::Record *record) | |
bool | operator== (const Constraint &that) |
Constraints are pointer-comparable. More... | |
bool | operator!= (const Constraint &that) |
Pred | getPredicate () const |
std::string | getConditionTemplate () const |
StringRef | getSummary () const |
StringRef | getDescription () const |
StringRef | getDefName () const |
Returns the name of the TablGen def of this constraint. More... | |
std::string | getUniqueDefName () const |
Returns a unique name for the TablGen def of this constraint. More... | |
std::optional< StringRef > | getCppFunctionName () const |
Returns the name of the C++ function that should be generated for this constraint, or std::nullopt if no C++ function should be generated. More... | |
Kind | getKind () const |
const llvm::Record & | getDef () const |
Return the underlying def. More... | |
Protected Attributes | |
const llvm::Record * | def |
Definition at line 30 of file Constraint.h.
Enumerator | |
---|---|
CK_Attr | |
CK_Region | |
CK_Successor | |
CK_Type | |
CK_Uncategorized |
Definition at line 33 of file Constraint.h.
|
inline |
Definition at line 36 of file Constraint.h.
Constraint::Constraint | ( | const llvm::Record * | record | ) |
Definition at line 19 of file Constraint.cpp.
References CK_Attr, CK_Region, CK_Successor, CK_Type, and def.
std::string Constraint::getConditionTemplate | ( | ) | const |
Definition at line 51 of file Constraint.cpp.
References mlir::tblgen::Pred::getCondition(), and getPredicate().
Referenced by mlir::tblgen::DagLeaf::getConditionTemplate().
std::optional< StringRef > Constraint::getCppFunctionName | ( | ) | const |
Returns the name of the C++ function that should be generated for this constraint, or std::nullopt if no C++ function should be generated.
Definition at line 112 of file Constraint.cpp.
References def.
|
inline |
StringRef Constraint::getDefName | ( | ) | const |
Returns the name of the TablGen def of this constraint.
In some cases where the current def is anonymous, the name of the base def is used (e.g. std::optional<>
/Variadic<>
type constraints).
Definition at line 66 of file Constraint.cpp.
References def.
StringRef Constraint::getDescription | ( | ) | const |
Definition at line 62 of file Constraint.cpp.
References def.
|
inline |
Definition at line 76 of file Constraint.h.
Referenced by mlir::tblgen::AttrConstraint::classof(), mlir::tblgen::Region::classof(), mlir::tblgen::Successor::classof(), and mlir::tblgen::TypeConstraint::classof().
Pred Constraint::getPredicate | ( | ) | const |
Definition at line 39 of file Constraint.cpp.
References def.
Referenced by getConditionTemplate(), and mlir::tblgen::NamedTypeConstraint::hasPredicate().
StringRef Constraint::getSummary | ( | ) | const |
Definition at line 55 of file Constraint.cpp.
References def.
std::string Constraint::getUniqueDefName | ( | ) | const |
Returns a unique name for the TablGen def of this constraint.
This is generally just the name of the def, but in some cases where the current def is anonymous, the name of the base def is attached (to provide more context on the def).
Definition at line 72 of file Constraint.cpp.
References def.
|
inline |
Definition at line 42 of file Constraint.h.
References def.
|
inline |
|
protected |
Definition at line 83 of file Constraint.h.
Referenced by Constraint(), mlir::tblgen::EnumAttr::genSpecializedAttr(), mlir::tblgen::EnumAttr::getAllCases(), mlir::tblgen::Attribute::getAttrDefName(), mlir::tblgen::Attribute::getBaseAttr(), mlir::tblgen::EnumAttr::getBaseAttrClass(), mlir::tblgen::TypeConstraint::getBuilderCall(), mlir::tblgen::Attribute::getConstBuilderTemplate(), mlir::tblgen::Attribute::getConvertFromStorageCall(), getCppFunctionName(), mlir::tblgen::EnumAttr::getCppNamespace(), mlir::tblgen::TypeConstraint::getCppType(), mlir::tblgen::Attribute::getDef(), mlir::tblgen::EnumAttrCase::getDef(), getDef(), mlir::tblgen::Attribute::getDefaultValue(), getDefName(), mlir::tblgen::Attribute::getDerivedCodeBody(), getDescription(), mlir::tblgen::EnumAttr::getEnumClassName(), mlir::tblgen::EnumAttr::getMaxEnumValFnName(), getPredicate(), mlir::tblgen::Attribute::getReturnType(), mlir::tblgen::EnumAttr::getSpecializedAttrClassName(), mlir::tblgen::Attribute::getStorageType(), mlir::tblgen::EnumAttrCase::getStr(), mlir::tblgen::EnumAttr::getStringToSymbolFnName(), getSummary(), mlir::tblgen::EnumAttrCase::getSymbol(), mlir::tblgen::EnumAttr::getSymbolToStringFnName(), mlir::tblgen::EnumAttr::getSymbolToStringFnRetType(), mlir::tblgen::EnumAttr::getUnderlyingToSymbolFnName(), mlir::tblgen::EnumAttr::getUnderlyingType(), getUniqueDefName(), mlir::tblgen::EnumAttrCase::getValue(), mlir::tblgen::Attribute::getValueType(), mlir::tblgen::TypeConstraint::getVariadicOfVariadicSegmentSizeAttr(), mlir::tblgen::Attribute::hasDefaultValue(), mlir::tblgen::Attribute::isConstBuildable(), mlir::tblgen::TypeConstraint::isOptional(), mlir::tblgen::AttrConstraint::isSubClassOf(), mlir::tblgen::Attribute::isSymbolRefAttr(), mlir::tblgen::Region::isVariadic(), mlir::tblgen::Successor::isVariadic(), mlir::tblgen::TypeConstraint::isVariadic(), mlir::tblgen::TypeConstraint::isVariadicOfVariadic(), operator!=(), operator==(), and mlir::tblgen::EnumAttr::printBitEnumPrimaryGroups().