13 #ifndef MLIR_DIALECT_SPIRV_IR_SPIRVATTRIBUTES_H 14 #define MLIR_DIALECT_SPIRV_IR_SPIRVATTRIBUTES_H 21 #define GET_ATTRDEF_CLASSES 22 #include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h.inc" 26 enum class Capability : uint32_t;
27 enum class DeviceType : uint32_t;
28 enum class Extension : uint32_t;
29 enum class Vendor : uint32_t;
30 enum class Version : uint32_t;
44 #include "mlir/Dialect/SPIRV/IR/SPIRVAttrUtils.inc" 50 detail::InterfaceVarABIAttributeStorage> {
59 IntegerAttr storageClass);
62 static StringRef getKindName();
65 uint32_t getDescriptorSet();
68 uint32_t getBinding();
74 IntegerAttr descriptorSet, IntegerAttr binding,
75 IntegerAttr storageClass);
82 detail::VerCapExtAttributeStorage> {
90 static VerCapExtAttr get(IntegerAttr version, ArrayAttr capabilities,
91 ArrayAttr extensions);
94 static StringRef getKindName();
100 :
public llvm::mapped_iterator<ArrayAttr::iterator,
101 Extension (*)(Attribute)> {
109 ArrayAttr getExtensionsAttr();
112 :
public llvm::mapped_iterator<ArrayAttr::iterator,
113 Capability (*)(Attribute)> {
121 ArrayAttr getCapabilitiesAttr();
124 IntegerAttr version, ArrayAttr capabilities,
125 ArrayAttr extensions);
133 detail::TargetEnvAttributeStorage> {
136 static constexpr uint32_t kUnknownDeviceID = 0x7FFFFFFF;
142 DeviceType deviceType, uint32_t deviceId,
143 ResourceLimitsAttr limits);
146 static StringRef getKindName();
152 Version getVersion()
const;
157 ArrayAttr getExtensionsAttr();
162 ArrayAttr getCapabilitiesAttr();
165 Vendor getVendorID()
const;
168 DeviceType getDeviceType()
const;
171 uint32_t getDeviceID()
const;
174 ResourceLimitsAttr getResourceLimits()
const;
179 #endif // MLIR_DIALECT_SPIRV_IR_SPIRVATTRIBUTES_H TODO: Remove this file when SCCP and integer range analysis have been ported to the new framework...
This class represents a diagnostic that is inflight and set to be reported.
An attribute that specifies the information regarding the interface variable: descriptor set...
This class represents an efficient way to signal success or failure.
An attribute that specifies the SPIR-V (version, capabilities, extensions) triple.
InFlightDiagnostic emitError(Location loc)
Utility method to emit an error message using this location.
Utility class for implementing users of storage classes uniqued by a StorageUniquer.
MLIRContext is the top-level object for a collection of MLIR operations.
LogicalResult verify(Operation *op, bool verifyRecursively=true)
Perform (potentially expensive) checks of invariants, used to detect compiler bugs, on this operation and any nested operations.
An attribute that specifies the target version, allowed extensions and capabilities, and resource limits.