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

Derived class that automatically populates legalization information for different LLVM ops. More...

#include "mlir/Conversion/LLVMCommon/ConversionTarget.h"

+ Inheritance diagram for mlir::LLVMConversionTarget:

Public Member Functions

 LLVMConversionTarget (MLIRContext &ctx)
 
- 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...
 

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...
 

Detailed Description

Derived class that automatically populates legalization information for different LLVM ops.

Definition at line 17 of file ConversionTarget.h.

Constructor & Destructor Documentation

◆ LLVMConversionTarget()

mlir::LLVMConversionTarget::LLVMConversionTarget ( MLIRContext ctx)
explicit

Definition at line 14 of file ConversionTarget.cpp.


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