MLIR  16.0.0git
Classes | Namespaces | Macros | Functions
SPIRVAttributes.cpp File Reference
#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"
#include "mlir/Dialect/SPIRV/IR/SPIRVAttrUtils.inc"
#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.cpp.inc"
+ Include dependency graph for SPIRVAttributes.cpp:

Go to the source code of this file.

Classes

struct  mlir::spirv::detail::InterfaceVarABIAttributeStorage
 
struct  mlir::spirv::detail::VerCapExtAttributeStorage
 
struct  mlir::spirv::detail::TargetEnvAttributeStorage
 

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::spirv
 
 mlir::spirv::detail
 

Macros

#define GET_ATTRDEF_CLASSES
 
#define GET_ATTRDEF_LIST
 

Functions

static ParseResult parseKeywordList (DialectAsmParser &parser, function_ref< LogicalResult(SMLoc, StringRef)> processKeyword)
 Parses a comma-separated list of keywords, invokes processKeyword on each of the parsed keyword, and returns failure if any error occurs. More...
 
static Attribute parseInterfaceVarABIAttr (DialectAsmParser &parser)
 Parses a spirv::InterfaceVarABIAttr. More...
 
static Attribute parseVerCapExtAttr (DialectAsmParser &parser)
 
static Attribute parseTargetEnvAttr (DialectAsmParser &parser)
 Parses a spirv::TargetEnvAttr. More...
 
static void print (spirv::VerCapExtAttr triple, DialectAsmPrinter &printer)
 
static void print (spirv::TargetEnvAttr targetEnv, DialectAsmPrinter &printer)
 
static void print (spirv::InterfaceVarABIAttr interfaceVarABIAttr, DialectAsmPrinter &printer)
 

Macro Definition Documentation

◆ GET_ATTRDEF_CLASSES

#define GET_ATTRDEF_CLASSES

Definition at line 341 of file SPIRVAttributes.cpp.

◆ GET_ATTRDEF_LIST

#define GET_ATTRDEF_LIST

Function Documentation

◆ parseInterfaceVarABIAttr()

static Attribute parseInterfaceVarABIAttr ( DialectAsmParser parser)
static

◆ parseKeywordList()

static ParseResult parseKeywordList ( DialectAsmParser parser,
function_ref< LogicalResult(SMLoc, StringRef)>  processKeyword 
)
static

Parses a comma-separated list of keywords, invokes processKeyword on each of the parsed keyword, and returns failure if any error occurs.

Definition at line 351 of file SPIRVAttributes.cpp.

References mlir::failed(), mlir::failure(), mlir::AsmParser::parseCommaSeparatedList(), mlir::AsmParser::parseLSquare(), mlir::AsmParser::parseOptionalRSquare(), mlir::AsmParser::parseRSquare(), mlir::succeeded(), and mlir::success().

Referenced by parseVerCapExtAttr().

◆ parseTargetEnvAttr()

static Attribute parseTargetEnvAttr ( DialectAsmParser parser)
static

◆ parseVerCapExtAttr()

static Attribute parseVerCapExtAttr ( DialectAsmParser parser)
static

◆ print() [1/3]

static void print ( spirv::VerCapExtAttr  triple,
DialectAsmPrinter printer 
)
static

Definition at line 602 of file SPIRVAttributes.cpp.

References mlir::spirv::VerCapExtAttr::getCapabilities(), mlir::spirv::VerCapExtAttr::getExtensionsAttr(), mlir::spirv::VerCapExtAttr::getKindName(), mlir::AsmPrinter::getStream(), and mlir::spirv::VerCapExtAttr::getVersion().

Referenced by acceptBitWidth(), mlir::AnalysisState::AnalysisState(), mlir::Diagnostic::append(), mlir::Op< AffineDmaStartOp, OpTrait::MemRefsNormalizable, OpTrait::VariadicOperands, OpTrait::ZeroResults, OpTrait::OpInvariants, AffineMapAccessInterface::Trait >::attachInterface(), buildLLVMFunctionType(), mlir::scf::buildLoopNest(), mlir::pdl::PDLType::classof(), composeSetAndOperands(), computeMemRefRankReductionMask(), concatElemAndIndices(), mlir::createLoopFusionPass(), mlir::tblgen::DagLeaf::DagLeaf(), mlir::Attribute::dump(), mlir::AffineExpr::dump(), mlir::IntegerSet::dump(), mlir::presburger::PresburgerRelation::dump(), mlir::AffineMap::dump(), mlir::Type::dump(), mlir::OperationName::dump(), mlir::Value::dump(), mlir::Operation::dump(), mlir::Block::dump(), eachHasOnlyOneOfTypes(), mlir::CallGraph::end(), foldMemRefCast(), foldTransferInBoundsAttribute(), mlir::TimingIdentifier::get(), mlir::python::PyOperationBase::getAsm(), mlir::tblgen::Operator::getDialect(), mlir::pdll::ods::Context::getDialects(), mlir::scf::getForeachThreadOpThreadIndexOwner(), getGenericEffectsImpl(), mlir::OperationName::getIdentifier(), mlir::pdll::ast::Type::getImpl(), getInsertExtractValueElementType(), getLoadStoreElementType(), mlir::pdll::ast::Node::getLoc(), getOption(), mlir::scf::getParallelForInductionVarOwner(), mlir::Block::getSublistAccess(), mlir::GenericProgramPoint::getTypeID(), mlir::Value::getUsers(), hasOneBranchOpTo(), mlir::scf::insideMutuallyExclusiveBranches(), mlir::DynamicAttr::isa(), mlir::DynamicType::isa(), isComputeOperation(), isIntegerPtxType(), isZeroAttribute(), SelectToExtUI::matchAndRewrite(), CanonicalizeSingleResultAffineMinMaxOp< T >::matchAndRewrite(), mlir::tblgen::DagNode::operator bool(), mlir::AffineExpr::operator!(), mlir::IntegerSet::operator!=(), mlir::AffineMap::operator!=(), mlir::detail::PassOptions::ListOption< DataType, OptionParser >::operator*(), mlir::operator<<(), mlir::detail::PassOptions::Option< bool >::operator=(), mlir::detail::DenseArrayAttr< int32_t >::operator[](), parentLLVMModule(), parseGlobalMemrefOpTypeAndInitialValue(), llvm::cl::parser< mlir::OpPassManager >::parser(), parseTileLikeOp(), mlir::bufferization::populateDynamicDimSizes(), impl::MemRefDataPrinter< T >::print(), mlir::Value::print(), mlir::Operation::print(), mlir::Block::print(), print(), mlir::detail::DenseArrayAttr< int32_t >::print(), printAccessChain(), printAttributions(), printBound(), printCreateOperationOpResults(), impl::MemRefDataPrinter< T >::printFirst(), printInitializationList(), mlir::AsmPrinter::Impl::printIntegerSet(), impl::MemRefDataPrinter< T >::printLast(), printMemRefMetaData(), printMinMaxBound(), printNVVMIntrinsicOp(), mlir::detail::pass_options::printOptionValue(), mlir::raw_indented_ostream::printReindented(), printSizeAssignment(), printTransferAttrs(), mlir::ProgramPoint::ProgramPoint(), mlir::replaceForOpWithNewYields(), replaceOpWithRegion(), mlir::LLVM::satisfiesLLVMModule(), mlir::presburger::DivisionRepr::setDividend(), mlir::DynamicOpDefinition::setPrintFn(), shouldPrintElementsAttrWithHex(), verifyAllocLikeOp(), verifyAtomicCompareExchangeImpl(), verifyAttributions(), verifyConstantType(), verifyCoopMatrixMulAdd(), verifyDimAndSymbolIdentifiers(), verifyMemoryOpIndexing(), verifyMemoryOpMetadata(), verifyPointerAndCoopMatrixType(), mlir::OpState::verifyRegions(), verifyVectorMemoryOp(), and mlir::DebugCounter::~DebugCounter().

◆ print() [2/3]

static void print ( spirv::TargetEnvAttr  targetEnv,
DialectAsmPrinter printer 
)
static

◆ print() [3/3]

static void print ( spirv::InterfaceVarABIAttr  interfaceVarABIAttr,
DialectAsmPrinter printer 
)
static