MLIR
18.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... | |
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 50 of file Constraint.cpp.
References mlir::tblgen::Pred::getCondition(), and getPredicate().
Referenced by mlir::tblgen::DagLeaf::getConditionTemplate().
|
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 65 of file Constraint.cpp.
References def.
StringRef Constraint::getDescription | ( | ) | const |
Definition at line 61 of file Constraint.cpp.
References def.
|
inline |
Definition at line 72 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 38 of file Constraint.cpp.
Referenced by getConditionTemplate(), and mlir::tblgen::NamedTypeConstraint::hasPredicate().
StringRef Constraint::getSummary | ( | ) | const |
Definition at line 54 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 71 of file Constraint.cpp.
References def.
|
inline |
Definition at line 42 of file Constraint.h.
References def.
|
inline |
|
protected |
Definition at line 79 of file Constraint.h.
Referenced by mlir::tblgen::AttrConstraint::Constraint(), 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(), mlir::tblgen::TypeConstraint::getCPPClassName(), mlir::tblgen::EnumAttr::getCppNamespace(), 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(), 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().