MLIR  14.0.0git
Namespaces | Macros | Functions | Variables
SPIRVOps.cpp File Reference
#include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/IR/ParserUtils.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVOpTraits.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVTypes.h"
#include "mlir/Dialect/SPIRV/IR/TargetAndABI.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/FunctionImplementation.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/CallInterfaces.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/bit.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVAvailability.cpp.inc"
#include "mlir/Dialect/SPIRV/IR/SPIRVOps.cpp.inc"
#include "mlir/Dialect/SPIRV/IR/SPIRVOpAvailabilityImpl.inc"
Include dependency graph for SPIRVOps.cpp:

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::spirv
 

Macros

#define GET_OP_CLASSES
 

Functions

static bool isNestedInFunctionOpInterface (Operation *op)
 Returns true if the given op is a function-like op or nested in a function-like op without a module-like op in the middle. More...
 
static bool isDirectInModuleLikeOp (Operation *op)
 Returns true if the given op is an module-like op that maintains a symbol table. More...
 
static LogicalResult extractValueFromConstOp (Operation *op, int32_t &value)
 
template<typename Ty >
static ArrayAttr getStrArrayAttrForEnumList (Builder &builder, ArrayRef< Ty > enumValues, function_ref< StringRef(Ty)> stringifyFn)
 
template<typename EnumClass >
static ParseResult parseEnumStrAttr (EnumClass &value, OpAsmParser &parser, StringRef attrName=spirv::attributeName< EnumClass >())
 Parses the next string attribute in parser as an enumerant of the given EnumClass. More...
 
template<typename EnumClass >
static ParseResult parseEnumStrAttr (EnumClass &value, OpAsmParser &parser, OperationState &state, StringRef attrName=spirv::attributeName< EnumClass >())
 Parses the next string attribute in parser as an enumerant of the given EnumClass and inserts the enumerant into state as an 32-bit integer attribute with the enum class's name as attribute name. More...
 
template<typename EnumClass >
static ParseResult parseEnumKeywordAttr (EnumClass &value, OpAsmParser &parser, OperationState &state, StringRef attrName=spirv::attributeName< EnumClass >())
 Parses the next keyword in parser as an enumerant of the given EnumClass and inserts the enumerant into state as an 32-bit integer attribute with the enum class's name as attribute name. More...
 
template<typename EnumClass >
static ParseResult parseControlAttribute (OpAsmParser &parser, OperationState &state, StringRef attrName=spirv::attributeName< EnumClass >())
 Parses Function, Selection and Loop control attributes. More...
 
static ParseResult parseMemoryAccessAttributes (OpAsmParser &parser, OperationState &state)
 Parses optional memory access attributes attached to a memory access operand/pointer. More...
 
static ParseResult parseSourceMemoryAccessAttributes (OpAsmParser &parser, OperationState &state)
 
template<typename MemoryOpTy >
static void printMemoryAccessAttribute (MemoryOpTy memoryOp, OpAsmPrinter &printer, SmallVectorImpl< StringRef > &elidedAttrs, Optional< spirv::MemoryAccess > memoryAccessAtrrValue=None, Optional< uint32_t > alignmentAttrValue=None)
 
template<typename MemoryOpTy >
static void printSourceMemoryAccessAttribute (MemoryOpTy memoryOp, OpAsmPrinter &printer, SmallVectorImpl< StringRef > &elidedAttrs, Optional< spirv::MemoryAccess > memoryAccessAtrrValue=None, Optional< uint32_t > alignmentAttrValue=None)
 
static ParseResult parseImageOperands (OpAsmParser &parser, spirv::ImageOperandsAttr &attr)
 
static void printImageOperands (OpAsmPrinter &printer, Operation *imageOp, spirv::ImageOperandsAttr attr)
 
template<typename Op >
static LogicalResult verifyImageOperands (Op imageOp, spirv::ImageOperandsAttr attr, Operation::operand_range operands)
 
static LogicalResult verifyCastOp (Operation *op, bool requireSameBitWidth=true, bool skipBitWidthCheck=false)
 
template<typename MemoryOpTy >
static LogicalResult verifyMemoryAccessAttribute (MemoryOpTy memoryOp)
 
template<typename MemoryOpTy >
static LogicalResult verifySourceMemoryAccessAttribute (MemoryOpTy memoryOp)
 
static LogicalResult verifyMemorySemantics (Operation *op, spirv::MemorySemantics memorySemantics)
 
template<typename LoadStoreOpTy >
static LogicalResult verifyLoadStorePtrAndValTypes (LoadStoreOpTy op, Value ptr, Value val)
 
template<typename BlockReadWriteOpTy >
static LogicalResult verifyBlockReadWritePtrAndValTypes (BlockReadWriteOpTy op, Value ptr, Value val)
 
static ParseResult parseVariableDecorations (OpAsmParser &parser, OperationState &state)
 
static void printVariableDecorations (Operation *op, OpAsmPrinter &printer, SmallVectorImpl< StringRef > &elidedAttrs)
 
static unsigned getBitWidth (Type type)
 
static Type getElementType (Type type, ArrayRef< int32_t > indices, function_ref< InFlightDiagnostic(StringRef)> emitErrorFn)
 Walks the given type hierarchy with the given indices, potentially down to component granularity, to select an element type. More...
 
static Type getElementType (Type type, Attribute indices, function_ref< InFlightDiagnostic(StringRef)> emitErrorFn)
 
static Type getElementType (Type type, Attribute indices, Location loc)
 
static Type getElementType (Type type, Attribute indices, OpAsmParser &parser, llvm::SMLoc loc)
 
static bool isMergeBlock (Block &block)
 Returns true if the given block only contains one spv.mlir.merge op. More...
 
static ParseResult parseAtomicUpdateOp (OpAsmParser &parser, OperationState &state, bool hasValue)
 
static void printAtomicUpdateOp (Operation *op, OpAsmPrinter &printer)
 
template<typename T >
static StringRef stringifyTypeName ()
 
template<>
StringRef stringifyTypeName< IntegerType > ()
 
template<>
StringRef stringifyTypeName< FloatType > ()
 
template<typename ExpectedElementType >
static LogicalResult verifyAtomicUpdateOp (Operation *op)
 
static ParseResult parseGroupNonUniformArithmeticOp (OpAsmParser &parser, OperationState &state)
 
static void printGroupNonUniformArithmeticOp (Operation *groupOp, OpAsmPrinter &printer)
 
static LogicalResult verifyGroupNonUniformArithmeticOp (Operation *groupOp)
 
static ParseResult parseUnaryOp (OpAsmParser &parser, OperationState &state)
 
static void printUnaryOp (Operation *unaryOp, OpAsmPrinter &printer)
 
static Type getUnaryOpResultType (Builder &builder, Type operandType)
 Result of a logical op must be a scalar or vector of boolean type. More...
 
static ParseResult parseLogicalUnaryOp (OpAsmParser &parser, OperationState &state)
 
static ParseResult parseLogicalBinaryOp (OpAsmParser &parser, OperationState &result)
 
static void printLogicalOp (Operation *logicalOp, OpAsmPrinter &printer)
 
static ParseResult parseShiftOp (OpAsmParser &parser, OperationState &state)
 
static void printShiftOp (Operation *op, OpAsmPrinter &printer)
 
static LogicalResult verifyShiftOp (Operation *op)
 
static void buildLogicalBinaryOp (OpBuilder &builder, OperationState &state, Value lhs, Value rhs)
 
static void buildLogicalUnaryOp (OpBuilder &builder, OperationState &state, Value value)
 
static Type getElementPtrType (Type type, ValueRange indices, Location baseLoc)
 
static ParseResult parseAccessChainOp (OpAsmParser &parser, OperationState &state)
 
template<typename Op >
static void printAccessChain (Op op, ValueRange indices, OpAsmPrinter &printer)
 
static void print (spirv::AccessChainOp op, OpAsmPrinter &printer)
 
template<typename Op >
static LogicalResult verifyAccessChain (Op accessChainOp, ValueRange indices)
 
static LogicalResult verify (spirv::AccessChainOp accessChainOp)
 
static LogicalResult verify (spirv::AddressOfOp addressOfOp)
 
template<typename T >
static void printAtomicCompareExchangeImpl (T atomOp, OpAsmPrinter &printer)
 
static ParseResult parseAtomicCompareExchangeImpl (OpAsmParser &parser, OperationState &state)
 
template<typename T >
static LogicalResult verifyAtomicCompareExchangeImpl (T atomOp)
 
static void print (spirv::AtomicExchangeOp atomOp, OpAsmPrinter &printer)
 
static ParseResult parseAtomicExchangeOp (OpAsmParser &parser, OperationState &state)
 
static LogicalResult verify (spirv::AtomicExchangeOp atomOp)
 
static LogicalResult verify (spirv::BitcastOp bitcastOp)
 
static ParseResult parseBranchConditionalOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::BranchConditionalOp branchOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::BranchConditionalOp branchOp)
 
static ParseResult parseCompositeConstructOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::CompositeConstructOp compositeConstructOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::CompositeConstructOp compositeConstructOp)
 
static ParseResult parseCompositeExtractOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::CompositeExtractOp compositeExtractOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::CompositeExtractOp compExOp)
 
static ParseResult parseCompositeInsertOp (OpAsmParser &parser, OperationState &state)
 
static LogicalResult verify (spirv::CompositeInsertOp compositeInsertOp)
 
static void print (spirv::CompositeInsertOp compositeInsertOp, OpAsmPrinter &printer)
 
static ParseResult parseConstantOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::ConstantOp constOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::ConstantOp constOp)
 
static ParseResult parseEntryPointOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::EntryPointOp entryPointOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::EntryPointOp entryPointOp)
 
static ParseResult parseExecutionModeOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::ExecutionModeOp execModeOp, OpAsmPrinter &printer)
 
static ParseResult parseFuncOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::FuncOp fnOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::FunctionCallOp functionCallOp)
 
static ParseResult parseGlobalVariableOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::GlobalVariableOp varOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::GlobalVariableOp varOp)
 
static LogicalResult verify (spirv::GroupBroadcastOp broadcastOp)
 
static LogicalResult verify (spirv::GroupNonUniformBallotOp ballotOp)
 
static LogicalResult verify (spirv::GroupNonUniformBroadcastOp broadcastOp)
 
static ParseResult parseSubgroupBlockReadINTELOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::SubgroupBlockReadINTELOp blockReadOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::SubgroupBlockReadINTELOp blockReadOp)
 
static ParseResult parseSubgroupBlockWriteINTELOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::SubgroupBlockWriteINTELOp blockWriteOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::SubgroupBlockWriteINTELOp blockWriteOp)
 
static LogicalResult verify (spirv::GroupNonUniformElectOp groupOp)
 
static ParseResult parseLoadOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::LoadOp loadOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::LoadOp loadOp)
 
static ParseResult parseLoopOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::LoopOp loopOp, OpAsmPrinter &printer)
 
static bool hasOneBranchOpTo (Block &srcBlock, Block &dstBlock)
 Returns true if the given srcBlock contains only one spv.Branch to the given dstBlock. More...
 
static LogicalResult verify (spirv::LoopOp loopOp)
 
static LogicalResult verify (spirv::MergeOp mergeOp)
 
static ParseResult parseModuleOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::ModuleOp moduleOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::ModuleOp moduleOp)
 
static LogicalResult verify (spirv::ReferenceOfOp referenceOfOp)
 
static LogicalResult verify (spirv::ReturnOp returnOp)
 
static LogicalResult verify (spirv::ReturnValueOp retValOp)
 
static LogicalResult verify (spirv::SelectOp op)
 
static ParseResult parseSelectionOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::SelectionOp selectionOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::SelectionOp selectionOp)
 
static ParseResult parseSpecConstantOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::SpecConstantOp constOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::SpecConstantOp constOp)
 
static ParseResult parseStoreOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::StoreOp storeOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::StoreOp storeOp)
 
static LogicalResult verify (spirv::UnreachableOp unreachableOp)
 
static ParseResult parseVariableOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::VariableOp varOp, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::VariableOp varOp)
 
static LogicalResult verify (spirv::VectorShuffleOp shuffleOp)
 
static ParseResult parseCooperativeMatrixLoadNVOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::CooperativeMatrixLoadNVOp m, OpAsmPrinter &printer)
 
static LogicalResult verifyPointerAndCoopMatrixType (Operation *op, Type pointer, Type coopMatrix)
 
static ParseResult parseCooperativeMatrixStoreNVOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::CooperativeMatrixStoreNVOp coopMatrix, OpAsmPrinter &printer)
 
static LogicalResult verifyCoopMatrixMulAdd (spirv::CooperativeMatrixMulAddNVOp op)
 
static LogicalResult verifyMatrixTimesScalar (spirv::MatrixTimesScalarOp op)
 
static void print (spirv::CopyMemoryOp copyMemory, OpAsmPrinter &printer)
 
static ParseResult parseCopyMemoryOp (OpAsmParser &parser, OperationState &state)
 
static LogicalResult verifyCopyMemory (spirv::CopyMemoryOp copyMemory)
 
static LogicalResult verifyTranspose (spirv::TransposeOp op)
 
static LogicalResult verifyMatrixTimesMatrix (spirv::MatrixTimesMatrixOp op)
 
static ParseResult parseSpecConstantCompositeOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::SpecConstantCompositeOp op, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::SpecConstantCompositeOp constOp)
 
static ParseResult parseSpecConstantOperationOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::SpecConstantOperationOp op, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::SpecConstantOperationOp constOp)
 
static LogicalResult verifyGLSLFrexpStructOp (spirv::GLSLFrexpStructOp frexpStructOp)
 
static LogicalResult verify (spirv::GLSLLdexpOp ldexpOp)
 
static LogicalResult verify (spirv::ImageDrefGatherOp imageDrefGatherOp)
 
static LogicalResult verify (spirv::ImageQuerySizeOp imageQuerySizeOp)
 
static ParseResult parsePtrAccessChainOpImpl (StringRef opName, OpAsmParser &parser, OperationState &state)
 
template<typename Op >
static auto concatElemAndIndices (Op op)
 
static ParseResult parseInBoundsPtrAccessChainOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::InBoundsPtrAccessChainOp op, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::InBoundsPtrAccessChainOp accessChainOp)
 
static ParseResult parsePtrAccessChainOp (OpAsmParser &parser, OperationState &state)
 
static void print (spirv::PtrAccessChainOp op, OpAsmPrinter &printer)
 
static LogicalResult verify (spirv::PtrAccessChainOp accessChainOp)
 

Variables

static constexpr const char kMemoryAccessAttrName [] = "memory_access"
 
static constexpr const char kSourceMemoryAccessAttrName []
 
static constexpr const char kAlignmentAttrName [] = "alignment"
 
static constexpr const char kSourceAlignmentAttrName [] = "source_alignment"
 
static constexpr const char kBranchWeightAttrName [] = "branch_weights"
 
static constexpr const char kCallee [] = "callee"
 
static constexpr const char kClusterSize [] = "cluster_size"
 
static constexpr const char kControl [] = "control"
 
static constexpr const char kDefaultValueAttrName [] = "default_value"
 
static constexpr const char kExecutionScopeAttrName [] = "execution_scope"
 
static constexpr const char kEqualSemanticsAttrName [] = "equal_semantics"
 
static constexpr const char kFnNameAttrName [] = "fn"
 
static constexpr const char kGroupOperationAttrName [] = "group_operation"
 
static constexpr const char kIndicesAttrName [] = "indices"
 
static constexpr const char kInitializerAttrName [] = "initializer"
 
static constexpr const char kInterfaceAttrName [] = "interface"
 
static constexpr const char kMemoryScopeAttrName [] = "memory_scope"
 
static constexpr const char kSemanticsAttrName [] = "semantics"
 
static constexpr const char kSpecIdAttrName [] = "spec_id"
 
static constexpr const char kTypeAttrName [] = "type"
 
static constexpr const char kUnequalSemanticsAttrName [] = "unequal_semantics"
 
static constexpr const char kValueAttrName [] = "value"
 
static constexpr const char kValuesAttrName [] = "values"
 
static constexpr const char kCompositeSpecConstituentsName [] = "constituents"
 

Macro Definition Documentation

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 3989 of file SPIRVOps.cpp.

Function Documentation

◆ buildLogicalBinaryOp()

static void buildLogicalBinaryOp ( OpBuilder builder,
OperationState state,
Value  lhs,
Value  rhs 
)
static

Definition at line 967 of file SPIRVOps.cpp.

◆ buildLogicalUnaryOp()

static void buildLogicalUnaryOp ( OpBuilder builder,
OperationState state,
Value  value 
)
static

◆ concatElemAndIndices()

template<typename Op >
static auto concatElemAndIndices ( Op  op)
static

Definition at line 3924 of file SPIRVOps.cpp.

References copy(), getElementPtrType(), mlir::Value::getType(), and mlir::OperationState::location.

Referenced by print().

◆ extractValueFromConstOp()

static LogicalResult extractValueFromConstOp ( Operation op,
int32_t &  value 
)
static

Definition at line 85 of file SPIRVOps.cpp.

References mlir::failure(), and mlir::success().

Referenced by getElementPtrType(), and verifyGroupNonUniformArithmeticOp().

◆ getBitWidth()

static unsigned getBitWidth ( Type  type)
static

◆ getElementPtrType()

static Type getElementPtrType ( Type  type,
ValueRange  indices,
Location  baseLoc 
)
static

◆ getElementType() [1/4]

static Type getElementType ( Type  type,
ArrayRef< int32_t >  indices,
function_ref< InFlightDiagnostic(StringRef)>  emitErrorFn 
)
static

Walks the given type hierarchy with the given indices, potentially down to component granularity, to select an element type.

Returns null type and emits errors with the given loc on failure.

Definition at line 639 of file SPIRVOps.cpp.

References mlir::Type::dyn_cast().

Referenced by applyPad(), castBoolToIntN(), mlir::pdl::PDLType::classof(), mlir::DenseFPElementsAttr::classof(), mlir::DenseIntElementsAttr::classof(), mlir::DenseElementsAttr::complex_float_value_begin(), mlir::DenseElementsAttr::complex_float_value_end(), mlir::DenseElementsAttr::complex_value_begin(), mlir::DenseElementsAttr::complex_value_end(), mlir::convertMMAToLLVMType(), convertStructType(), createLinalgBodyCalculationForElementwiseOp(), mlir::LLVM::detail::extractNDVectorTypeInfo(), findKnownStructIndices(), mlir::DenseElementsAttr::float_value_begin(), mlir::DenseElementsAttr::float_value_end(), foldExtractStridedOpFromInsertChain(), mlir::quant::ExpressedToQuantizedConverter::forInputType(), fuseWithReshapeByExpansion(), genLoad(), mlir::spirv::ImageType::get(), mlir::spirv::ArrayType::getCapabilities(), mlir::spirv::RuntimeArrayType::getCapabilities(), mlir::spirv::CooperativeMatrixNVType::getCapabilities(), mlir::DenseElementsAttr::getComplexFloatValues(), mlir::DenseElementsAttr::getComplexIntValues(), mlir::spirv::MatrixType::getElementType(), getElementType(), mlir::spirv::ArrayType::getExtensions(), mlir::spirv::RuntimeArrayType::getExtensions(), mlir::spirv::CooperativeMatrixNVType::getExtensions(), mlir::DenseElementsAttr::getFloatValues(), getLocalInvocationDimSize(), getPushConstantVariable(), mlir::quant::QuantizedType::getQuantizedElementType(), mlir::spirv::ArrayType::getSizeInBytes(), getSrcVectorElementType(), mlir::getStridesAndOffset(), mlir::DenseElementsAttr::getValues(), mlir::vector::getVectorReductionOp(), handleMultidimensionalVectors(), isAsyncWithOneDependency(), isBoolScalarOrVector(), mlir::quant::QuantizedType::isCompatibleExpressedType(), isComplexOfIntType(), isMatchingWidth(), mlir::DenseElementsAttr::isValidBool(), mlir::DenseElementsAttr::isValidComplex(), mlir::TensorType::isValidElementType(), mlir::DenseElementsAttr::isValidIntOrFloat(), mlir::OperandElementTypeIterator::mapElement(), mlir::ResultElementTypeIterator::mapElement(), mlir::GPUFuncOpLowering::matchAndRewrite(), CanonicalizeContractAdd< AddOpType >::matchAndRewrite(), mlirComplexTypeGetElementType(), mlirPDLRangeTypeGetElementType(), mlirShapedTypeGetElementType(), mlir::spirv::StructType::MemberDecorationInfo::operator<(), parseCompositeExtractOp(), printAllocaOp(), printOperation(), mlir::replaceAllMemRefUsesWith(), mlir::FloatType::scaleElementBitwidth(), mlir::MemRefType::Builder::setMemorySpace(), mlir::DenseElementsAttr::value_begin(), mlir::DenseElementsAttr::value_end(), vectorType(), verify(), verifyAveragePoolOp(), verifyCastOp(), and writeAPIntsToBuffer().

◆ getElementType() [2/4]

static Type getElementType ( Type  type,
Attribute  indices,
function_ref< InFlightDiagnostic(StringRef)>  emitErrorFn 
)
static

Definition at line 665 of file SPIRVOps.cpp.

References mlir::Attribute::dyn_cast(), and getElementType().

◆ getElementType() [3/4]

static Type getElementType ( Type  type,
Attribute  indices,
Location  loc 
)
static

Definition at line 690 of file SPIRVOps.cpp.

References mlir::emitError(), and getElementType().

◆ getElementType() [4/4]

static Type getElementType ( Type  type,
Attribute  indices,
OpAsmParser parser,
llvm::SMLoc  loc 
)
static

Definition at line 697 of file SPIRVOps.cpp.

References mlir::AsmParser::emitError(), and getElementType().

◆ getStrArrayAttrForEnumList()

template<typename Ty >
static ArrayAttr getStrArrayAttrForEnumList ( Builder builder,
ArrayRef< Ty >  enumValues,
function_ref< StringRef(Ty)>  stringifyFn 
)
static

Definition at line 106 of file SPIRVOps.cpp.

References mlir::Builder::getStrArrayAttr().

◆ getUnaryOpResultType()

static Type getUnaryOpResultType ( Builder builder,
Type  operandType 
)
static

Result of a logical op must be a scalar or vector of boolean type.

Definition at line 896 of file SPIRVOps.cpp.

References mlir::Type::dyn_cast(), and mlir::Builder::getIntegerType().

Referenced by parseLogicalBinaryOp(), and parseLogicalUnaryOp().

◆ hasOneBranchOpTo()

static bool hasOneBranchOpTo ( Block srcBlock,
Block dstBlock 
)
inlinestatic

Returns true if the given srcBlock contains only one spv.Branch to the given dstBlock.

Definition at line 2498 of file SPIRVOps.cpp.

References mlir::Block::back().

Referenced by verify().

◆ isDirectInModuleLikeOp()

static bool isDirectInModuleLikeOp ( Operation op)
static

Returns true if the given op is an module-like op that maintains a symbol table.

Definition at line 81 of file SPIRVOps.cpp.

References mlir::Operation::hasTrait().

◆ isMergeBlock()

static bool isMergeBlock ( Block block)
inlinestatic

Returns true if the given block only contains one spv.mlir.merge op.

Definition at line 706 of file SPIRVOps.cpp.

References mlir::Block::begin(), mlir::Block::empty(), mlir::Block::end(), and mlir::Block::front().

Referenced by verify().

◆ isNestedInFunctionOpInterface()

static bool isNestedInFunctionOpInterface ( Operation op)
static

Returns true if the given op is a function-like op or nested in a function-like op without a module-like op in the middle.

Definition at line 69 of file SPIRVOps.cpp.

References mlir::Operation::getParentOp(), and mlir::Operation::hasTrait().

◆ parseAccessChainOp()

static ParseResult parseAccessChainOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseAtomicCompareExchangeImpl()

static ParseResult parseAtomicCompareExchangeImpl ( OpAsmParser parser,
OperationState state 
)
static

◆ parseAtomicExchangeOp()

static ParseResult parseAtomicExchangeOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseAtomicUpdateOp()

static ParseResult parseAtomicUpdateOp ( OpAsmParser parser,
OperationState state,
bool  hasValue 
)
static

◆ parseBranchConditionalOp()

static ParseResult parseBranchConditionalOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseCompositeConstructOp()

static ParseResult parseCompositeConstructOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseCompositeExtractOp()

static ParseResult parseCompositeExtractOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseCompositeInsertOp()

static ParseResult parseCompositeInsertOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseConstantOp()

static ParseResult parseConstantOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseControlAttribute()

template<typename EnumClass >
static ParseResult parseControlAttribute ( OpAsmParser parser,
OperationState state,
StringRef  attrName = spirv::attributeName<EnumClass>() 
)
static

◆ parseCooperativeMatrixLoadNVOp()

static ParseResult parseCooperativeMatrixLoadNVOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseCooperativeMatrixStoreNVOp()

static ParseResult parseCooperativeMatrixStoreNVOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseCopyMemoryOp()

static ParseResult parseCopyMemoryOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseEntryPointOp()

static ParseResult parseEntryPointOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseEnumKeywordAttr()

template<typename EnumClass >
static ParseResult parseEnumKeywordAttr ( EnumClass &  value,
OpAsmParser parser,
OperationState state,
StringRef  attrName = spirv::attributeName<EnumClass>() 
)
static

Parses the next keyword in parser as an enumerant of the given EnumClass and inserts the enumerant into state as an 32-bit integer attribute with the enum class's name as attribute name.

Definition at line 166 of file SPIRVOps.cpp.

References mlir::OperationState::addAttribute(), mlir::failure(), mlir::AsmParser::getBuilder(), mlir::Builder::getI32IntegerAttr(), mlir::parseEnumKeywordAttr(), and mlir::success().

◆ parseEnumStrAttr() [1/2]

template<typename EnumClass >
static ParseResult parseEnumStrAttr ( EnumClass &  value,
OpAsmParser parser,
StringRef  attrName = spirv::attributeName<EnumClass>() 
)
static

◆ parseEnumStrAttr() [2/2]

template<typename EnumClass >
static ParseResult parseEnumStrAttr ( EnumClass &  value,
OpAsmParser parser,
OperationState state,
StringRef  attrName = spirv::attributeName<EnumClass>() 
)
static

Parses the next string attribute in parser as an enumerant of the given EnumClass and inserts the enumerant into state as an 32-bit integer attribute with the enum class's name as attribute name.

Definition at line 151 of file SPIRVOps.cpp.

References mlir::OperationState::addAttribute(), mlir::failure(), mlir::AsmParser::getBuilder(), mlir::Builder::getI32IntegerAttr(), parseEnumStrAttr(), and mlir::success().

◆ parseExecutionModeOp()

static ParseResult parseExecutionModeOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseFuncOp()

static ParseResult parseFuncOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseGlobalVariableOp()

static ParseResult parseGlobalVariableOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseGroupNonUniformArithmeticOp()

static ParseResult parseGroupNonUniformArithmeticOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseImageOperands()

static ParseResult parseImageOperands ( OpAsmParser parser,
spirv::ImageOperandsAttr &  attr 
)
static

◆ parseInBoundsPtrAccessChainOp()

static ParseResult parseInBoundsPtrAccessChainOp ( OpAsmParser parser,
OperationState state 
)
static

Definition at line 3944 of file SPIRVOps.cpp.

References parsePtrAccessChainOpImpl().

◆ parseLoadOp()

static ParseResult parseLoadOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseLogicalBinaryOp()

static ParseResult parseLogicalBinaryOp ( OpAsmParser parser,
OperationState result 
)
static

◆ parseLogicalUnaryOp()

static ParseResult parseLogicalUnaryOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseLoopOp()

static ParseResult parseLoopOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseMemoryAccessAttributes()

static ParseResult parseMemoryAccessAttributes ( OpAsmParser parser,
OperationState state 
)
static

Parses optional memory access attributes attached to a memory access operand/pointer.

Specifically, parses the following syntax: ([ memory-access ])? where: memory-access ::= "None" | "Volatile" | "Aligned", integer-literal | "NonTemporal"

Definition at line 202 of file SPIRVOps.cpp.

References mlir::OperationState::attributes, mlir::failure(), mlir::AsmParser::getBuilder(), mlir::Builder::getIntegerType(), kAlignmentAttrName, kMemoryAccessAttrName, mlir::AsmParser::parseAttribute(), mlir::AsmParser::parseComma(), parseEnumStrAttr(), mlir::AsmParser::parseOptionalLSquare(), mlir::AsmParser::parseRSquare(), and mlir::success().

Referenced by parseCooperativeMatrixLoadNVOp(), parseCooperativeMatrixStoreNVOp(), parseCopyMemoryOp(), parseLoadOp(), and parseStoreOp().

◆ parseModuleOp()

static ParseResult parseModuleOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parsePtrAccessChainOp()

static ParseResult parsePtrAccessChainOp ( OpAsmParser parser,
OperationState state 
)
static

Definition at line 3970 of file SPIRVOps.cpp.

References parsePtrAccessChainOpImpl().

◆ parsePtrAccessChainOpImpl()

static ParseResult parsePtrAccessChainOpImpl ( StringRef  opName,
OpAsmParser parser,
OperationState state 
)
static

◆ parseSelectionOp()

static ParseResult parseSelectionOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseShiftOp()

static ParseResult parseShiftOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseSourceMemoryAccessAttributes()

static ParseResult parseSourceMemoryAccessAttributes ( OpAsmParser parser,
OperationState state 
)
static

◆ parseSpecConstantCompositeOp()

static ParseResult parseSpecConstantCompositeOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseSpecConstantOp()

static ParseResult parseSpecConstantOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseSpecConstantOperationOp()

static ParseResult parseSpecConstantOperationOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseStoreOp()

static ParseResult parseStoreOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseSubgroupBlockReadINTELOp()

static ParseResult parseSubgroupBlockReadINTELOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseSubgroupBlockWriteINTELOp()

static ParseResult parseSubgroupBlockWriteINTELOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseUnaryOp()

static ParseResult parseUnaryOp ( OpAsmParser parser,
OperationState state 
)
static

◆ parseVariableDecorations()

static ParseResult parseVariableDecorations ( OpAsmParser parser,
OperationState state 
)
static

◆ parseVariableOp()

static ParseResult parseVariableOp ( OpAsmParser parser,
OperationState state 
)
static

◆ print() [1/27]

static void print ( spirv::AccessChainOp  op,
OpAsmPrinter printer 
)
static

Definition at line 1103 of file SPIRVOps.cpp.

References printAccessChain().

◆ print() [2/27]

static void print ( spirv::AtomicExchangeOp  atomOp,
OpAsmPrinter printer 
)
static

Definition at line 1231 of file SPIRVOps.cpp.

◆ print() [3/27]

static void print ( spirv::BranchConditionalOp  branchOp,
OpAsmPrinter printer 
)
static

Definition at line 1385 of file SPIRVOps.cpp.

References mlir::OpAsmPrinter::printSuccessorAndUseList().

◆ print() [4/27]

static void print ( spirv::CompositeConstructOp  compositeConstructOp,
OpAsmPrinter printer 
)
static

Definition at line 1456 of file SPIRVOps.cpp.

◆ print() [5/27]

static void print ( spirv::CompositeExtractOp  compositeExtractOp,
OpAsmPrinter printer 
)
static

Definition at line 1530 of file SPIRVOps.cpp.

◆ print() [6/27]

static void print ( spirv::CompositeInsertOp  compositeInsertOp,
OpAsmPrinter printer 
)
static

Definition at line 1604 of file SPIRVOps.cpp.

◆ print() [7/27]

static void print ( spirv::ConstantOp  constOp,
OpAsmPrinter printer 
)
static

Definition at line 1630 of file SPIRVOps.cpp.

◆ print() [8/27]

static void print ( spirv::EntryPointOp  entryPointOp,
OpAsmPrinter printer 
)
static

Definition at line 1872 of file SPIRVOps.cpp.

References mlir::AsmPrinter::printSymbolName().

◆ print() [9/27]

static void print ( spirv::ExecutionModeOp  execModeOp,
OpAsmPrinter printer 
)
static

Definition at line 1926 of file SPIRVOps.cpp.

References mlir::Attribute::cast(), and mlir::AsmPrinter::printSymbolName().

◆ print() [10/27]

static void print ( spirv::FuncOp  fnOp,
OpAsmPrinter printer 
)
static

◆ print() [11/27]

static void print ( spirv::GlobalVariableOp  varOp,
OpAsmPrinter printer 
)
static

◆ print() [12/27]

static void print ( spirv::SubgroupBlockReadINTELOp  blockReadOp,
OpAsmPrinter printer 
)
static

Definition at line 2339 of file SPIRVOps.cpp.

◆ print() [13/27]

static void print ( spirv::SubgroupBlockWriteINTELOp  blockWriteOp,
OpAsmPrinter printer 
)
static

Definition at line 2382 of file SPIRVOps.cpp.

◆ print() [14/27]

static void print ( spirv::LoadOp  loadOp,
OpAsmPrinter printer 
)
static

◆ print() [15/27]

static void print ( spirv::LoopOp  loopOp,
OpAsmPrinter printer 
)
static

Definition at line 2485 of file SPIRVOps.cpp.

References mlir::OpAsmPrinter::printRegion().

◆ print() [16/27]

static void print ( spirv::ModuleOp  moduleOp,
OpAsmPrinter printer 
)
static

◆ print() [17/27]

static void print ( spirv::SelectionOp  selectionOp,
OpAsmPrinter printer 
)
static

Definition at line 2878 of file SPIRVOps.cpp.

References mlir::OpAsmPrinter::printRegion().

◆ print() [18/27]

static void print ( spirv::SpecConstantOp  constOp,
OpAsmPrinter printer 
)
static

Definition at line 3011 of file SPIRVOps.cpp.

References kSpecIdAttrName, and mlir::AsmPrinter::printSymbolName().

◆ print() [19/27]

static void print ( spirv::StoreOp  storeOp,
OpAsmPrinter printer 
)
static

◆ print() [20/27]

static void print ( spirv::VariableOp  varOp,
OpAsmPrinter printer 
)
static

Definition at line 3148 of file SPIRVOps.cpp.

References printVariableDecorations().

◆ print() [21/27]

static void print ( spirv::CooperativeMatrixLoadNVOp  m,
OpAsmPrinter printer 
)
static

Definition at line 3259 of file SPIRVOps.cpp.

◆ print() [22/27]

static void print ( spirv::CooperativeMatrixStoreNVOp  coopMatrix,
OpAsmPrinter printer 
)
static

Definition at line 3313 of file SPIRVOps.cpp.

◆ print() [23/27]

static void print ( spirv::CopyMemoryOp  copyMemory,
OpAsmPrinter printer 
)
static

◆ print() [24/27]

static void print ( spirv::SpecConstantCompositeOp  op,
OpAsmPrinter printer 
)
static

Definition at line 3598 of file SPIRVOps.cpp.

References mlir::AsmPrinter::printSymbolName().

◆ print() [25/27]

static void print ( spirv::SpecConstantOperationOp  op,
OpAsmPrinter printer 
)
static

Definition at line 3674 of file SPIRVOps.cpp.

References mlir::OpAsmPrinter::printGenericOp().

◆ print() [26/27]

static void print ( spirv::InBoundsPtrAccessChainOp  op,
OpAsmPrinter printer 
)
static

Definition at line 3950 of file SPIRVOps.cpp.

References concatElemAndIndices(), and printAccessChain().

◆ print() [27/27]

static void print ( spirv::PtrAccessChainOp  op,
OpAsmPrinter printer 
)
static

Definition at line 3976 of file SPIRVOps.cpp.

References concatElemAndIndices(), and printAccessChain().

◆ printAccessChain()

template<typename Op >
static void printAccessChain ( Op  op,
ValueRange  indices,
OpAsmPrinter printer 
)
static

Definition at line 1098 of file SPIRVOps.cpp.

References mlir::ValueRange::getTypes().

Referenced by print().

◆ printAtomicCompareExchangeImpl()

template<typename T >
static void printAtomicCompareExchangeImpl ( atomOp,
OpAsmPrinter printer 
)
static

Definition at line 1156 of file SPIRVOps.cpp.

◆ printAtomicUpdateOp()

static void printAtomicUpdateOp ( Operation op,
OpAsmPrinter printer 
)
static

◆ printGroupNonUniformArithmeticOp()

static void printGroupNonUniformArithmeticOp ( Operation groupOp,
OpAsmPrinter printer 
)
static

◆ printImageOperands()

static void printImageOperands ( OpAsmPrinter printer,
Operation imageOp,
spirv::ImageOperandsAttr  attr 
)
static

Definition at line 334 of file SPIRVOps.cpp.

◆ printLogicalOp()

static void printLogicalOp ( Operation logicalOp,
OpAsmPrinter printer 
)
static

◆ printMemoryAccessAttribute()

template<typename MemoryOpTy >
static void printMemoryAccessAttribute ( MemoryOpTy  memoryOp,
OpAsmPrinter printer,
SmallVectorImpl< StringRef > &  elidedAttrs,
Optional< spirv::MemoryAccess >  memoryAccessAtrrValue = None,
Optional< uint32_t >  alignmentAttrValue = None 
)
static

Definition at line 261 of file SPIRVOps.cpp.

References kAlignmentAttrName, and kMemoryAccessAttrName.

Referenced by print().

◆ printShiftOp()

static void printShiftOp ( Operation op,
OpAsmPrinter printer 
)
static

Definition at line 950 of file SPIRVOps.cpp.

References mlir::Operation::getOperand(), and mlir::Value::getType().

◆ printSourceMemoryAccessAttribute()

template<typename MemoryOpTy >
static void printSourceMemoryAccessAttribute ( MemoryOpTy  memoryOp,
OpAsmPrinter printer,
SmallVectorImpl< StringRef > &  elidedAttrs,
Optional< spirv::MemoryAccess >  memoryAccessAtrrValue = None,
Optional< uint32_t >  alignmentAttrValue = None 
)
static

Definition at line 291 of file SPIRVOps.cpp.

References kSourceAlignmentAttrName, and kSourceMemoryAccessAttrName.

Referenced by print().

◆ printUnaryOp()

static void printUnaryOp ( Operation unaryOp,
OpAsmPrinter printer 
)
static

Definition at line 890 of file SPIRVOps.cpp.

References mlir::Operation::getOperand(), and mlir::Value::getType().

◆ printVariableDecorations()

static void printVariableDecorations ( Operation op,
OpAsmPrinter printer,
SmallVectorImpl< StringRef > &  elidedAttrs 
)
static

◆ stringifyTypeName()

template<typename T >
static StringRef stringifyTypeName ( )
static

Referenced by printAtomicUpdateOp().

◆ stringifyTypeName< FloatType >()

template<>
StringRef stringifyTypeName< FloatType > ( )

Definition at line 768 of file SPIRVOps.cpp.

◆ stringifyTypeName< IntegerType >()

template<>
StringRef stringifyTypeName< IntegerType > ( )

Definition at line 763 of file SPIRVOps.cpp.

◆ verify() [1/39]

static LogicalResult verify ( spirv::AccessChainOp  accessChainOp)
static

Definition at line 1128 of file SPIRVOps.cpp.

References verifyAccessChain().

◆ verify() [2/39]

static LogicalResult verify ( spirv::AddressOfOp  addressOfOp)
static

Definition at line 1141 of file SPIRVOps.cpp.

References mlir::SymbolTable::lookupNearestSymbolFrom(), and mlir::success().

◆ verify() [3/39]

static LogicalResult verify ( spirv::AtomicExchangeOp  atomOp)
static

Definition at line 1263 of file SPIRVOps.cpp.

References mlir::Type::cast(), and mlir::success().

◆ verify() [4/39]

static LogicalResult verify ( spirv::BitcastOp  bitcastOp)
static

Definition at line 1284 of file SPIRVOps.cpp.

References getBitWidth(), and mlir::success().

◆ verify() [5/39]

static LogicalResult verify ( spirv::BranchConditionalOp  branchOp)
static

Definition at line 1404 of file SPIRVOps.cpp.

References mlir::Attribute::cast(), and mlir::success().

◆ verify() [6/39]

static LogicalResult verify ( spirv::CompositeConstructOp  compositeConstructOp)
static

◆ verify() [7/39]

static LogicalResult verify ( spirv::CompositeExtractOp  compExOp)
static

◆ verify() [8/39]

static LogicalResult verify ( spirv::CompositeInsertOp  compositeInsertOp)
static

Definition at line 1580 of file SPIRVOps.cpp.

References mlir::failure(), getElementType(), and mlir::success().

◆ verify() [9/39]

static LogicalResult verify ( spirv::ConstantOp  constOp)
static

◆ verify() [10/39]

static LogicalResult verify ( spirv::EntryPointOp  entryPointOp)
static

◆ verify() [11/39]

static LogicalResult verify ( spirv::FunctionCallOp  functionCallOp)
static

◆ verify() [12/39]

static LogicalResult verify ( spirv::GlobalVariableOp  varOp)
static

◆ verify() [13/39]

static LogicalResult verify ( spirv::GroupBroadcastOp  broadcastOp)
static

Definition at line 2258 of file SPIRVOps.cpp.

References mlir::success().

◆ verify() [14/39]

static LogicalResult verify ( spirv::GroupNonUniformBallotOp  ballotOp)
static

Definition at line 2277 of file SPIRVOps.cpp.

References mlir::success().

◆ verify() [15/39]

static LogicalResult verify ( spirv::GroupNonUniformBroadcastOp  broadcastOp)
static

◆ verify() [16/39]

static LogicalResult verify ( spirv::SubgroupBlockReadINTELOp  blockReadOp)
static

◆ verify() [17/39]

static LogicalResult verify ( spirv::SubgroupBlockWriteINTELOp  blockWriteOp)
static

◆ verify() [18/39]

static LogicalResult verify ( spirv::GroupNonUniformElectOp  groupOp)
static

Definition at line 2401 of file SPIRVOps.cpp.

References mlir::Type::cast(), mlir::Value::getType(), and mlir::success().

◆ verify() [19/39]

static LogicalResult verify ( spirv::LoadOp  loadOp)
static

◆ verify() [20/39]

static LogicalResult verify ( spirv::LoopOp  loopOp)
static

◆ verify() [21/39]

static LogicalResult verify ( spirv::MergeOp  mergeOp)
static

◆ verify() [22/39]

static LogicalResult verify ( spirv::ModuleOp  moduleOp)
static

◆ verify() [23/39]

static LogicalResult verify ( spirv::ReferenceOfOp  referenceOfOp)
static

Definition at line 2804 of file SPIRVOps.cpp.

References mlir::SymbolTable::lookupNearestSymbolFrom(), and mlir::success().

◆ verify() [24/39]

static LogicalResult verify ( spirv::ReturnOp  returnOp)
static

Definition at line 2833 of file SPIRVOps.cpp.

References mlir::success().

◆ verify() [25/39]

static LogicalResult verify ( spirv::ReturnValueOp  retValOp)
static

Definition at line 2842 of file SPIRVOps.cpp.

References mlir::success().

◆ verify() [26/39]

static LogicalResult verify ( spirv::SelectOp  op)
static

Definition at line 2851 of file SPIRVOps.cpp.

References mlir::success().

◆ verify() [27/39]

static LogicalResult verify ( spirv::SelectionOp  selectionOp)
static

◆ verify() [28/39]

static LogicalResult verify ( spirv::SpecConstantOp  constOp)
static

Definition at line 3019 of file SPIRVOps.cpp.

References kSpecIdAttrName, and mlir::success().

◆ verify() [29/39]

static LogicalResult verify ( spirv::StoreOp  storeOp)
static

◆ verify() [30/39]

static LogicalResult verify ( spirv::UnreachableOp  unreachableOp)
static

Definition at line 3087 of file SPIRVOps.cpp.

References mlir::success().

◆ verify() [31/39]

static LogicalResult verify ( spirv::VariableOp  varOp)
static

Definition at line 3159 of file SPIRVOps.cpp.

References bindingName(), descriptorSetName(), and mlir::success().

◆ verify() [32/39]

static LogicalResult verify ( spirv::VectorShuffleOp  shuffleOp)
static

Definition at line 3207 of file SPIRVOps.cpp.

References getNumElements(), max(), and mlir::success().

◆ verify() [33/39]

static LogicalResult verify ( spirv::SpecConstantCompositeOp  constOp)
static

◆ verify() [34/39]

static LogicalResult verify ( spirv::SpecConstantOperationOp  constOp)
static

◆ verify() [35/39]

static LogicalResult verify ( spirv::GLSLLdexpOp  ldexpOp)
static

◆ verify() [36/39]

static LogicalResult verify ( spirv::ImageDrefGatherOp  imageDrefGatherOp)
static

◆ verify() [37/39]

static LogicalResult verify ( spirv::ImageQuerySizeOp  imageQuerySizeOp)
static

◆ verify() [38/39]

static LogicalResult verify ( spirv::InBoundsPtrAccessChainOp  accessChainOp)
static

◆ verify() [39/39]

static LogicalResult verify ( spirv::PtrAccessChainOp  accessChainOp)
static

Definition at line 3980 of file SPIRVOps.cpp.

References verifyAccessChain().

◆ verifyAccessChain()

template<typename Op >
static LogicalResult verifyAccessChain ( Op  accessChainOp,
ValueRange  indices 
)
static

◆ verifyAtomicCompareExchangeImpl()

template<typename T >
static LogicalResult verifyAtomicCompareExchangeImpl ( atomOp)
static

Definition at line 1195 of file SPIRVOps.cpp.

References mlir::success().

◆ verifyAtomicUpdateOp()

template<typename ExpectedElementType >
static LogicalResult verifyAtomicUpdateOp ( Operation op)
static

◆ verifyBlockReadWritePtrAndValTypes()

template<typename BlockReadWriteOpTy >
static LogicalResult verifyBlockReadWritePtrAndValTypes ( BlockReadWriteOpTy  op,
Value  ptr,
Value  val 
)
static

Definition at line 540 of file SPIRVOps.cpp.

References mlir::Type::cast(), mlir::Value::getType(), and mlir::success().

Referenced by verify().

◆ verifyCastOp()

static LogicalResult verifyCastOp ( Operation op,
bool  requireSameBitWidth = true,
bool  skipBitWidthCheck = false 
)
static

◆ verifyCoopMatrixMulAdd()

static LogicalResult verifyCoopMatrixMulAdd ( spirv::CooperativeMatrixMulAddNVOp  op)
static

◆ verifyCopyMemory()

static LogicalResult verifyCopyMemory ( spirv::CopyMemoryOp  copyMemory)
static

◆ verifyGLSLFrexpStructOp()

static LogicalResult verifyGLSLFrexpStructOp ( spirv::GLSLFrexpStructOp  frexpStructOp)
static

◆ verifyGroupNonUniformArithmeticOp()

static LogicalResult verifyGroupNonUniformArithmeticOp ( Operation groupOp)
static

◆ verifyImageOperands()

template<typename Op >
static LogicalResult verifyImageOperands ( Op  imageOp,
spirv::ImageOperandsAttr  attr,
Operation::operand_range  operands 
)
static

Definition at line 343 of file SPIRVOps.cpp.

References mlir::OpState::emitError(), and mlir::success().

Referenced by verify().

◆ verifyLoadStorePtrAndValTypes()

template<typename LoadStoreOpTy >
static LogicalResult verifyLoadStorePtrAndValTypes ( LoadStoreOpTy  op,
Value  ptr,
Value  val 
)
static

Definition at line 525 of file SPIRVOps.cpp.

References mlir::Type::cast(), mlir::Value::getType(), and mlir::success().

Referenced by verify().

◆ verifyMatrixTimesMatrix()

static LogicalResult verifyMatrixTimesMatrix ( spirv::MatrixTimesMatrixOp  op)
static

◆ verifyMatrixTimesScalar()

static LogicalResult verifyMatrixTimesScalar ( spirv::MatrixTimesScalarOp  op)
static

◆ verifyMemoryAccessAttribute()

template<typename MemoryOpTy >
static LogicalResult verifyMemoryAccessAttribute ( MemoryOpTy  memoryOp)
static

Definition at line 417 of file SPIRVOps.cpp.

References kAlignmentAttrName, kMemoryAccessAttrName, and mlir::success().

Referenced by verify(), and verifyCopyMemory().

◆ verifyMemorySemantics()

static LogicalResult verifyMemorySemantics ( Operation op,
spirv::MemorySemantics  memorySemantics 
)
static

Definition at line 501 of file SPIRVOps.cpp.

References mlir::Operation::emitError(), and mlir::success().

Referenced by verifyAtomicUpdateOp().

◆ verifyPointerAndCoopMatrixType()

static LogicalResult verifyPointerAndCoopMatrixType ( Operation op,
Type  pointer,
Type  coopMatrix 
)
static

◆ verifyShiftOp()

static LogicalResult verifyShiftOp ( Operation op)
static

◆ verifySourceMemoryAccessAttribute()

template<typename MemoryOpTy >
static LogicalResult verifySourceMemoryAccessAttribute ( MemoryOpTy  memoryOp)
static

Definition at line 461 of file SPIRVOps.cpp.

References kSourceAlignmentAttrName, kSourceMemoryAccessAttrName, and mlir::success().

Referenced by verifyCopyMemory().

◆ verifyTranspose()

static LogicalResult verifyTranspose ( spirv::TransposeOp  op)
static

Variable Documentation

◆ kAlignmentAttrName

constexpr const char kAlignmentAttrName[] = "alignment"
static

◆ kBranchWeightAttrName

constexpr const char kBranchWeightAttrName[] = "branch_weights"
static

Definition at line 42 of file SPIRVOps.cpp.

Referenced by parseBranchConditionalOp().

◆ kCallee

constexpr const char kCallee[] = "callee"
static

Definition at line 43 of file SPIRVOps.cpp.

Referenced by verify().

◆ kClusterSize

constexpr const char kClusterSize[] = "cluster_size"
static

◆ kCompositeSpecConstituentsName

constexpr const char kCompositeSpecConstituentsName[] = "constituents"
static

Definition at line 61 of file SPIRVOps.cpp.

Referenced by parseSpecConstantCompositeOp().

◆ kControl

constexpr const char kControl[] = "control"
static

Definition at line 45 of file SPIRVOps.cpp.

Referenced by parseControlAttribute().

◆ kDefaultValueAttrName

constexpr const char kDefaultValueAttrName[] = "default_value"
static

Definition at line 46 of file SPIRVOps.cpp.

Referenced by parseSpecConstantOp().

◆ kEqualSemanticsAttrName

constexpr const char kEqualSemanticsAttrName[] = "equal_semantics"
static

Definition at line 48 of file SPIRVOps.cpp.

Referenced by parseAtomicCompareExchangeImpl().

◆ kExecutionScopeAttrName

constexpr const char kExecutionScopeAttrName[] = "execution_scope"
static

◆ kFnNameAttrName

constexpr const char kFnNameAttrName[] = "fn"
static

Definition at line 49 of file SPIRVOps.cpp.

Referenced by parseEntryPointOp(), and parseExecutionModeOp().

◆ kGroupOperationAttrName

constexpr const char kGroupOperationAttrName[] = "group_operation"
static

◆ kIndicesAttrName

constexpr const char kIndicesAttrName[] = "indices"
static

Definition at line 51 of file SPIRVOps.cpp.

Referenced by parseCompositeExtractOp(), and parseCompositeInsertOp().

◆ kInitializerAttrName

constexpr const char kInitializerAttrName[] = "initializer"
static

Definition at line 52 of file SPIRVOps.cpp.

Referenced by parseGlobalVariableOp(), print(), and verify().

◆ kInterfaceAttrName

constexpr const char kInterfaceAttrName[] = "interface"
static

Definition at line 53 of file SPIRVOps.cpp.

Referenced by parseEntryPointOp().

◆ kMemoryAccessAttrName

constexpr const char kMemoryAccessAttrName[] = "memory_access"
static

◆ kMemoryScopeAttrName

constexpr const char kMemoryScopeAttrName[] = "memory_scope"
static

◆ kSemanticsAttrName

constexpr const char kSemanticsAttrName[] = "semantics"
static

◆ kSourceAlignmentAttrName

constexpr const char kSourceAlignmentAttrName[] = "source_alignment"
static

◆ kSourceMemoryAccessAttrName

constexpr const char kSourceMemoryAccessAttrName[]
static
Initial value:
=
"source_memory_access"

Definition at line 38 of file SPIRVOps.cpp.

Referenced by parseSourceMemoryAccessAttributes(), printSourceMemoryAccessAttribute(), and verifySourceMemoryAccessAttribute().

◆ kSpecIdAttrName

constexpr const char kSpecIdAttrName[] = "spec_id"
static

Definition at line 56 of file SPIRVOps.cpp.

Referenced by parseSpecConstantOp(), print(), and verify().

◆ kTypeAttrName

constexpr const char kTypeAttrName[] = "type"
static

Definition at line 57 of file SPIRVOps.cpp.

Referenced by parseGlobalVariableOp(), parseSpecConstantCompositeOp(), and print().

◆ kUnequalSemanticsAttrName

constexpr const char kUnequalSemanticsAttrName[] = "unequal_semantics"
static

Definition at line 58 of file SPIRVOps.cpp.

Referenced by parseAtomicCompareExchangeImpl().

◆ kValueAttrName

constexpr const char kValueAttrName[] = "value"
static

Definition at line 59 of file SPIRVOps.cpp.

Referenced by parseConstantOp().

◆ kValuesAttrName

constexpr const char kValuesAttrName[] = "values"
static

Definition at line 60 of file SPIRVOps.cpp.

Referenced by parseExecutionModeOp().