MLIR  20.0.0git
Static Public Member Functions | List of all members
mlir::SPIRVConversionTarget Class Reference

#include "mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"

+ Inheritance diagram for mlir::SPIRVConversionTarget:

Static Public Member Functions

static std::unique_ptr< SPIRVConversionTargetget (spirv::TargetEnvAttr targetAttr)
 Creates a SPIR-V conversion target for the given target environment. More...
 

Additional Inherited Members

- Public Types inherited from mlir::ConversionTarget
enum class  LegalizationAction { Legal , Dynamic , Illegal }
 This enumeration corresponds to the specific action to take when considering an operation legal for this conversion target. More...
 
using DynamicLegalityCallbackFn = std::function< std::optional< bool >(Operation *)>
 The signature of the callback used to determine if an operation is dynamically legal on the target. More...
 
- Public Member Functions inherited from mlir::ConversionTarget
 ConversionTarget (MLIRContext &ctx)
 
virtual ~ConversionTarget ()=default
 
void setOpAction (OperationName op, LegalizationAction action)
 Register a legality action for the given operation. More...
 
template<typename OpT >
void setOpAction (LegalizationAction action)
 
void addLegalOp (OperationName op)
 Register the given operations as legal. More...
 
template<typename OpT >
void addLegalOp ()
 
template<typename OpT , typename OpT2 , typename... OpTs>
void addLegalOp ()
 
void addDynamicallyLegalOp (OperationName op, const DynamicLegalityCallbackFn &callback)
 Register the given operation as dynamically legal and set the dynamic legalization callback to the one provided. More...
 
template<typename OpT >
void addDynamicallyLegalOp (const DynamicLegalityCallbackFn &callback)
 
template<typename OpT , typename OpT2 , typename... OpTs>
void addDynamicallyLegalOp (const DynamicLegalityCallbackFn &callback)
 
template<typename OpT , class Callable >
std::enable_if_t<!std::is_invocable_v< Callable, Operation * > > addDynamicallyLegalOp (Callable &&callback)
 
void addIllegalOp (OperationName op)
 Register the given operation as illegal, i.e. More...
 
template<typename OpT >
void addIllegalOp ()
 
template<typename OpT , typename OpT2 , typename... OpTs>
void addIllegalOp ()
 
void markOpRecursivelyLegal (OperationName name, const DynamicLegalityCallbackFn &callback)
 Mark an operation, that must have either been set as Legal or DynamicallyLegal, as being recursively legal. More...
 
template<typename OpT >
void markOpRecursivelyLegal (const DynamicLegalityCallbackFn &callback={})
 
template<typename OpT , typename OpT2 , typename... OpTs>
void markOpRecursivelyLegal (const DynamicLegalityCallbackFn &callback={})
 
template<typename OpT , class Callable >
std::enable_if_t<!std::is_invocable_v< Callable, Operation * > > markOpRecursivelyLegal (Callable &&callback)
 
void setDialectAction (ArrayRef< StringRef > dialectNames, LegalizationAction action)
 Register a legality action for the given dialects. More...
 
template<typename... Names>
void addLegalDialect (StringRef name, Names... names)
 Register the operations of the given dialects as legal. More...
 
template<typename... Args>
void addLegalDialect ()
 
template<typename... Names>
void addDynamicallyLegalDialect (const DynamicLegalityCallbackFn &callback, StringRef name, Names... names)
 Register the operations of the given dialects as dynamically legal, i.e. More...
 
template<typename... Args>
void addDynamicallyLegalDialect (DynamicLegalityCallbackFn callback)
 
void markUnknownOpDynamicallyLegal (const DynamicLegalityCallbackFn &fn)
 Register unknown operations as dynamically legal. More...
 
template<typename... Names>
void addIllegalDialect (StringRef name, Names... names)
 Register the operations of the given dialects as illegal, i.e. More...
 
template<typename... Args>
void addIllegalDialect ()
 
std::optional< LegalizationActiongetOpAction (OperationName op) const
 Get the legality action for the given operation. More...
 
std::optional< LegalOpDetailsisLegal (Operation *op) const
 If the given operation instance is legal on this target, a structure containing legality information is returned. More...
 
bool isIllegal (Operation *op) const
 Returns true is operation instance is illegal on this target. More...
 

Detailed Description

Definition at line 107 of file SPIRVConversion.h.

Member Function Documentation

◆ get()

std::unique_ptr< SPIRVConversionTarget > SPIRVConversionTarget::get ( spirv::TargetEnvAttr  targetAttr)
static

Creates a SPIR-V conversion target for the given target environment.

Definition at line 1492 of file SPIRVConversion.cpp.

References get().

Referenced by get().


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