MLIR  20.0.0git
Namespaces | Functions | Variables
SPIRVParsingUtils.h File Reference
#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OpImplementation.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include <type_traits>

Go to the source code of this file.

Namespaces

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

Functions

template<typename Ty >
ArrayAttr mlir::spirv::getStrArrayAttrForEnumList (Builder &builder, ArrayRef< Ty > enumValues, function_ref< StringRef(Ty)> stringifyFn)
 
template<typename EnumClass , typename ParserType >
ParseResult mlir::spirv::parseEnumKeywordAttr (EnumClass &value, ParserType &parser, StringRef attrName=spirv::attributeName< EnumClass >())
 Parses the next keyword in parser as an enumerant of the given EnumClass. More...
 
template<typename EnumClass >
ParseResult mlir::spirv::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 EnumAttrClass , typename EnumClass = typename EnumAttrClass::ValueType>
ParseResult mlir::spirv::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 EnumAttrClass , typename EnumClass = typename EnumAttrClass::ValueType>
ParseResult mlir::spirv::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...
 
ParseResult mlir::spirv::parseVariableDecorations (OpAsmParser &parser, OperationState &state)
 

Variables

constexpr char mlir::spirv::AttrNames::kClusterSize [] = "cluster_size"
 
constexpr char mlir::spirv::AttrNames::kControl [] = "control"
 
constexpr char mlir::spirv::AttrNames::kFnNameAttrName [] = "fn"
 
constexpr char mlir::spirv::AttrNames::kSpecIdAttrName [] = "spec_id"