#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVTypes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/DialectImplementation.h"
#include "llvm/ADT/TypeSwitch.h"
usingnamespacemlir;
usingnamespacemlir::spirv;
namespace mlir {
namespace spirv {
#include "mlir/Dialect/SPIRV/IR/SPIRVAttrUtils.inc"
}
namespace spirv {
namespace detail {
struct InterfaceVarABIAttributeStorage : public AttributeStorage { … };
struct VerCapExtAttributeStorage : public AttributeStorage { … };
struct TargetEnvAttributeStorage : public AttributeStorage { … };
}
}
}
spirv::InterfaceVarABIAttr
spirv::InterfaceVarABIAttr::get(uint32_t descriptorSet, uint32_t binding,
std::optional<spirv::StorageClass> storageClass,
MLIRContext *context) { … }
spirv::InterfaceVarABIAttr
spirv::InterfaceVarABIAttr::get(IntegerAttr descriptorSet, IntegerAttr binding,
IntegerAttr storageClass) { … }
StringRef spirv::InterfaceVarABIAttr::getKindName() { … }
uint32_t spirv::InterfaceVarABIAttr::getBinding() { … }
uint32_t spirv::InterfaceVarABIAttr::getDescriptorSet() { … }
std::optional<spirv::StorageClass>
spirv::InterfaceVarABIAttr::getStorageClass() { … }
LogicalResult spirv::InterfaceVarABIAttr::verifyInvariants(
function_ref<InFlightDiagnostic()> emitError, IntegerAttr descriptorSet,
IntegerAttr binding, IntegerAttr storageClass) { … }
spirv::VerCapExtAttr spirv::VerCapExtAttr::get(
spirv::Version version, ArrayRef<spirv::Capability> capabilities,
ArrayRef<spirv::Extension> extensions, MLIRContext *context) { … }
spirv::VerCapExtAttr spirv::VerCapExtAttr::get(IntegerAttr version,
ArrayAttr capabilities,
ArrayAttr extensions) { … }
StringRef spirv::VerCapExtAttr::getKindName() { … }
spirv::Version spirv::VerCapExtAttr::getVersion() { … }
spirv::VerCapExtAttr::ext_iterator::ext_iterator(ArrayAttr::iterator it)
: … { … }
spirv::VerCapExtAttr::ext_range spirv::VerCapExtAttr::getExtensions() { … }
ArrayAttr spirv::VerCapExtAttr::getExtensionsAttr() { … }
spirv::VerCapExtAttr::cap_iterator::cap_iterator(ArrayAttr::iterator it)
: … { … }
spirv::VerCapExtAttr::cap_range spirv::VerCapExtAttr::getCapabilities() { … }
ArrayAttr spirv::VerCapExtAttr::getCapabilitiesAttr() { … }
LogicalResult spirv::VerCapExtAttr::verifyInvariants(
function_ref<InFlightDiagnostic()> emitError, IntegerAttr version,
ArrayAttr capabilities, ArrayAttr extensions) { … }
spirv::TargetEnvAttr spirv::TargetEnvAttr::get(
spirv::VerCapExtAttr triple, ResourceLimitsAttr limits, ClientAPI clientAPI,
Vendor vendorID, DeviceType deviceType, uint32_t deviceID) { … }
StringRef spirv::TargetEnvAttr::getKindName() { … }
spirv::VerCapExtAttr spirv::TargetEnvAttr::getTripleAttr() const { … }
spirv::Version spirv::TargetEnvAttr::getVersion() const { … }
spirv::VerCapExtAttr::ext_range spirv::TargetEnvAttr::getExtensions() { … }
ArrayAttr spirv::TargetEnvAttr::getExtensionsAttr() { … }
spirv::VerCapExtAttr::cap_range spirv::TargetEnvAttr::getCapabilities() { … }
ArrayAttr spirv::TargetEnvAttr::getCapabilitiesAttr() { … }
spirv::ClientAPI spirv::TargetEnvAttr::getClientAPI() const { … }
spirv::Vendor spirv::TargetEnvAttr::getVendorID() const { … }
spirv::DeviceType spirv::TargetEnvAttr::getDeviceType() const { … }
uint32_t spirv::TargetEnvAttr::getDeviceID() const { … }
spirv::ResourceLimitsAttr spirv::TargetEnvAttr::getResourceLimits() const { … }
#define GET_ATTRDEF_CLASSES
#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.cpp.inc"
static ParseResult
parseKeywordList(DialectAsmParser &parser,
function_ref<LogicalResult(SMLoc, StringRef)> processKeyword) { … }
static Attribute parseInterfaceVarABIAttr(DialectAsmParser &parser) { … }
static Attribute parseVerCapExtAttr(DialectAsmParser &parser) { … }
static Attribute parseTargetEnvAttr(DialectAsmParser &parser) { … }
Attribute SPIRVDialect::parseAttribute(DialectAsmParser &parser,
Type type) const { … }
static void print(spirv::VerCapExtAttr triple, DialectAsmPrinter &printer) { … }
static void print(spirv::TargetEnvAttr targetEnv, DialectAsmPrinter &printer) { … }
static void print(spirv::InterfaceVarABIAttr interfaceVarABIAttr,
DialectAsmPrinter &printer) { … }
void SPIRVDialect::printAttribute(Attribute attr,
DialectAsmPrinter &printer) const { … }
void spirv::SPIRVDialect::registerAttributes() { … }