MLIR  16.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"

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...
 
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 41 of file DialectConversion.h.

Constructor & Destructor Documentation

◆ SignatureConversion()

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

Definition at line 43 of file DialectConversion.h.

Member Function Documentation

◆ addInputs() [1/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 2914 of file DialectConversion.cpp.

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

◆ addInputs() [2/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 2921 of file DialectConversion.cpp.

References remapInput().

◆ getConvertedTypes()

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

Return the argument types for the new signature.

Definition at line 54 of file DialectConversion.h.

Referenced by buildUnresolvedTargetMaterialization(), and mlir::LLVMTypeConverter::convertFunctionSignature().

◆ getInputMapping()

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

Get the input mapping for the given argument.

Definition at line 57 of file DialectConversion.h.

References addInputs(), and remapInput().

Referenced by buildUnresolvedTargetMaterialization().

◆ 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 2936 of file DialectConversion.cpp.

Referenced by addInputs(), getBlockIt(), and getInputMapping().


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