MLIR  19.0.0git
Classes | Public Member Functions | List of all members
mlir::TypeConverter::SignatureConversion Class Reference

This class provides all of the information necessary to convert a type signature. More...

#include "mlir/Transforms/DialectConversion.h"

+ Inheritance diagram for mlir::TypeConverter::SignatureConversion:

Classes

struct  InputMapping
 This struct represents a range of new types or a single value that remaps an existing signature input. More...
 

Public Member Functions

 SignatureConversion (unsigned numOrigInputs)
 
ArrayRef< TypegetConvertedTypes () const
 Return the argument types for the new signature. More...
 
std::optional< InputMappinggetInputMapping (unsigned input) const
 Get the input mapping for the given argument. More...
 
void addInputs (unsigned origInputNo, ArrayRef< Type > types)
 Remap an input of the original signature with a new set of types. More...
 
void addInputs (ArrayRef< Type > types)
 Append new input types to the signature conversion, this should only be used if the new types are not intended to remap an existing input. More...
 
void remapInput (unsigned origInputNo, Value replacement)
 Remap an input of the original signature to another replacement value. More...
 

Detailed Description

This class provides all of the information necessary to convert a type signature.

Definition at line 63 of file DialectConversion.h.

Constructor & Destructor Documentation

◆ SignatureConversion()

mlir::TypeConverter::SignatureConversion::SignatureConversion ( unsigned  numOrigInputs)
inline

Definition at line 65 of file DialectConversion.h.

Member Function Documentation

◆ addInputs() [1/2]

void TypeConverter::SignatureConversion::addInputs ( ArrayRef< Type types)

Append new input types to the signature conversion, this should only be used if the new types are not intended to remap an existing input.

Definition at line 2954 of file DialectConversion.cpp.

◆ addInputs() [2/2]

void TypeConverter::SignatureConversion::addInputs ( unsigned  origInputNo,
ArrayRef< Type types 
)

Remap an input of the original signature with a new set of types.

The new types are appended to the new signature conversion.

Definition at line 2947 of file DialectConversion.cpp.

References remapInput().

Referenced by mlir::LLVMTypeConverter::convertFunctionSignature(), mlir::TypeConverter::convertSignatureArg(), and lowerAsEntryFunction().

◆ getConvertedTypes()

ArrayRef<Type> mlir::TypeConverter::SignatureConversion::getConvertedTypes ( ) const
inline

◆ getInputMapping()

std::optional<InputMapping> mlir::TypeConverter::SignatureConversion::getInputMapping ( unsigned  input) const
inline

Get the input mapping for the given argument.

Definition at line 79 of file DialectConversion.h.

Referenced by mlir::detail::ConversionPatternRewriterImpl::applySignatureConversion(), and mlir::GPUFuncOpLowering::matchAndRewrite().

◆ remapInput()

void TypeConverter::SignatureConversion::remapInput ( unsigned  origInputNo,
Value  replacement 
)

Remap an input of the original signature to another replacement value.

This drops the original argument.

Definition at line 2969 of file DialectConversion.cpp.

Referenced by addInputs(), and mlir::GPUFuncOpLowering::matchAndRewrite().


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