My Project
Public Member Functions | Static Public Member Functions | List of all members
mlir::spirv::SPIRVDialect Class Reference

#include <SPIRVDialect.h>

Inheritance diagram for mlir::spirv::SPIRVDialect:
Inheritance graph
[legend]
Collaboration diagram for mlir::spirv::SPIRVDialect:
Collaboration graph
[legend]

Public Member Functions

 SPIRVDialect (MLIRContext *context)
 
Type parseType (DialectAsmParser &parser) const override
 Parses a type registered to this dialect. More...
 
void printType (Type type, DialectAsmPrinter &os) const override
 Prints a type registered to this dialect. More...
 
OperationmaterializeConstant (OpBuilder &builder, Attribute value, Type type, Location loc) override
 Provides a hook for materializing a constant to this dialect. More...
 
LogicalResult verifyOperationAttribute (Operation *op, NamedAttribute attribute) override
 
LogicalResult verifyRegionArgAttribute (Operation *op, unsigned regionIndex, unsigned argIndex, NamedAttribute attribute) override
 
LogicalResult verifyRegionResultAttribute (Operation *op, unsigned regionIndex, unsigned resultIndex, NamedAttribute attribute) override
 
- Public Member Functions inherited from mlir::Dialect
virtual ~Dialect ()
 
MLIRContextgetContext () const
 
StringRef getNamespace () const
 
bool allowsUnknownOperations () const
 
bool allowsUnknownTypes () const
 
virtual Attribute parseAttribute (DialectAsmParser &parser, Type type) const
 Parse an attribute registered to this dialect. More...
 
virtual void printAttribute (Attribute, DialectAsmPrinter &) const
 
const DialectInterfacegetRegisteredInterface (ClassID *interfaceID)
 
template<typename InterfaceT >
const InterfaceT * getRegisteredInterface ()
 

Static Public Member Functions

static StringRef getDialectNamespace ()
 
static bool isValidType (Type type)
 Checks if the given type is valid in SPIR-V dialect. More...
 
static bool isValidScalarType (Type type)
 Checks if the given scalar type is valid in SPIR-V dialect. More...
 
static std::string getAttributeName (Decoration decoration)
 
- Static Public Member Functions inherited from mlir::Dialect
static bool isValidNamespace (StringRef str)
 

Additional Inherited Members

- Public Attributes inherited from mlir::Dialect
DialectConstantFoldHook constantFoldHook
 
DialectConstantDecodeHook decodeHook
 
DialectExtractElementHook extractElementHook
 
- Protected Member Functions inherited from mlir::Dialect
 Dialect (StringRef name, MLIRContext *context)
 
template<typename... Args>
void addOperations ()
 
void addOperation (AbstractOperation opInfo)
 
template<typename... Args>
void addTypes ()
 This method is used by derived classes to add their types to the set. More...
 
template<typename... Args>
void addAttributes ()
 This method is used by derived classes to add their attributes to the set. More...
 
void allowUnknownOperations (bool allow=true)
 Enable support for unregistered operations. More...
 
void allowUnknownTypes (bool allow=true)
 Enable support for unregistered types. More...
 
void addInterface (std::unique_ptr< DialectInterface > interface)
 Register a dialect interface with this dialect instance. More...
 
template<typename T , typename T2 , typename... Tys>
void addInterfaces ()
 Register a set of dialect interfaces with this dialect instance. More...
 
template<typename T >
void addInterfaces ()
 

Constructor & Destructor Documentation

◆ SPIRVDialect()

SPIRVDialect::SPIRVDialect ( MLIRContext context)
explicit

Member Function Documentation

◆ getAttributeName()

std::string SPIRVDialect::getAttributeName ( Decoration  decoration)
static

Returns the attribute name to use when specifying decorations on results of operations.

◆ getDialectNamespace()

static StringRef mlir::spirv::SPIRVDialect::getDialectNamespace ( )
inlinestatic

◆ isValidScalarType()

bool SPIRVDialect::isValidScalarType ( Type  type)
static

Checks if the given scalar type is valid in SPIR-V dialect.

◆ isValidType()

bool SPIRVDialect::isValidType ( Type  type)
static

Checks if the given type is valid in SPIR-V dialect.

◆ materializeConstant()

Operation * SPIRVDialect::materializeConstant ( OpBuilder builder,
Attribute  value,
Type  type,
Location  loc 
)
overridevirtual

Provides a hook for materializing a constant to this dialect.

Reimplemented from mlir::Dialect.

◆ parseType()

Type SPIRVDialect::parseType ( DialectAsmParser parser) const
overridevirtual

Parses a type registered to this dialect.

Reimplemented from mlir::Dialect.

◆ printType()

void SPIRVDialect::printType ( Type  type,
DialectAsmPrinter os 
) const
overridevirtual

Prints a type registered to this dialect.

Reimplemented from mlir::Dialect.

◆ verifyOperationAttribute()

LogicalResult SPIRVDialect::verifyOperationAttribute ( Operation op,
NamedAttribute  attribute 
)
overridevirtual

Provides a hook for verifying SPIR-V dialect attributes attached to the given op.

Reimplemented from mlir::Dialect.

◆ verifyRegionArgAttribute()

LogicalResult SPIRVDialect::verifyRegionArgAttribute ( Operation op,
unsigned  regionIndex,
unsigned  argIndex,
NamedAttribute  attribute 
)
overridevirtual

Provides a hook for verifying SPIR-V dialect attributes attached to the given op's region argument.

Reimplemented from mlir::Dialect.

◆ verifyRegionResultAttribute()

LogicalResult SPIRVDialect::verifyRegionResultAttribute ( Operation op,
unsigned  regionIndex,
unsigned  resultIndex,
NamedAttribute  attribute 
)
overridevirtual

Provides a hook for verifying SPIR-V dialect attributes attached to the given op's region result.

Reimplemented from mlir::Dialect.


The documentation for this class was generated from the following files: