|
MLIR 22.0.0git
|
NamedAttribute represents a combination of a name and an Attribute value. More...
#include "mlir/IR/Attributes.h"
Public Member Functions | |
| NamedAttribute (StringAttr name, Attribute value) | |
| NamedAttribute (StringRef name, Attribute value) | |
| StringAttr | getName () const |
| Return the name of the attribute. | |
| Dialect * | getNameDialect () const |
| Return the dialect of the name of this attribute, if the name is prefixed by a dialect namespace. | |
| Attribute | getValue () const |
| Return the value of the attribute. | |
| void | setName (StringAttr newName) |
| Set the name of this attribute. | |
| void | setValue (Attribute newValue) |
| Set the value of this attribute. | |
| bool | operator< (const NamedAttribute &rhs) const |
| Compare this attribute to the provided attribute, ordering by name. | |
| bool | operator< (StringRef rhs) const |
| Compare this attribute to the provided string, ordering by name. | |
| bool | operator== (const NamedAttribute &rhs) const |
| bool | operator!= (const NamedAttribute &rhs) const |
NamedAttribute represents a combination of a name and an Attribute value.
Definition at line 164 of file Attributes.h.
| NamedAttribute::NamedAttribute | ( | StringAttr | name, |
| Attribute | value ) |
Definition at line 43 of file Attributes.cpp.
Referenced by operator!=(), operator<(), and operator==().
| NamedAttribute::NamedAttribute | ( | StringRef | name, |
| Attribute | value ) |
Definition at line 49 of file Attributes.cpp.
| StringAttr NamedAttribute::getName | ( | ) | const |
Return the name of the attribute.
Definition at line 55 of file Attributes.cpp.
Referenced by amendOperationImpl(), mlir::LLVMTranslationInterface::convertParameterAttr(), mlir::OpState::genericPrintProperties(), getNameDialect(), ConvertNativeFuncPattern< Op >::matchAndRewrite(), mlirDictionaryAttrGetElement(), mlirOperationGetAttribute(), mlirOperationGetDiscardableAttribute(), operator<(), operator<(), printApplyRegisteredPassOptions(), mlir::AsmPrinter::Impl::printNamedAttribute(), mlir::AsmPrinter::Impl::printOptionalAttrDict(), processFMFAttr(), verifyKnownLaunchSizeAttr(), and verifyRegionAttribute().
| Dialect * NamedAttribute::getNameDialect | ( | ) | const |
Return the dialect of the name of this attribute, if the name is prefixed by a dialect namespace.
For example, llvm.fast_math would return the LLVM dialect (if it is loaded). Returns nullptr if the dialect isn't loaded, or if the name is not prefixed by a dialect namespace.
Definition at line 59 of file Attributes.cpp.
References getName().
Referenced by mlir::LLVMTranslationInterface::amendOperation(), and mlir::LLVMTranslationInterface::convertParameterAttr().
|
inline |
Return the value of the attribute.
Definition at line 179 of file Attributes.h.
Referenced by amendOperationImpl(), convertParameterAttr(), ConvertNativeFuncPattern< Op >::matchAndRewrite(), mlirDictionaryAttrGetElement(), mlirOperationGetAttribute(), mlirOperationGetDiscardableAttribute(), printApplyRegisteredPassOptions(), mlir::AsmPrinter::Impl::printNamedAttribute(), processFMFAttr(), verifyKnownLaunchSizeAttr(), and verifyRegionAttribute().
|
inline |
Definition at line 198 of file Attributes.h.
References NamedAttribute(), and rhs.
| bool NamedAttribute::operator< | ( | const NamedAttribute & | rhs | ) | const |
Compare this attribute to the provided attribute, ordering by name.
Definition at line 68 of file Attributes.cpp.
References getName(), NamedAttribute(), and rhs.
| bool NamedAttribute::operator< | ( | StringRef | rhs | ) | const |
Compare this attribute to the provided string, ordering by name.
Definition at line 72 of file Attributes.cpp.
|
inline |
Definition at line 195 of file Attributes.h.
References NamedAttribute(), and rhs.
| void NamedAttribute::setName | ( | StringAttr | newName | ) |
Set the name of this attribute.
Definition at line 63 of file Attributes.cpp.
Set the value of this attribute.
Definition at line 185 of file Attributes.h.