MLIR  15.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
mlir::LLVM::detail::LLVMFunctionTypeStorage Struct Reference

Type storage for LLVM dialect function types. More...

#include "Dialect/LLVMIR/IR/TypeDetail.h"

+ Inheritance diagram for mlir::LLVM::detail::LLVMFunctionTypeStorage:
+ Collaboration diagram for mlir::LLVM::detail::LLVMFunctionTypeStorage:

Public Types

using KeyTy = std::tuple< Type, ArrayRef< Type >, bool >
 

Public Member Functions

 LLVMFunctionTypeStorage (Type result, ArrayRef< Type > arguments, bool variadic)
 Construct a storage from the given components. More...
 
bool operator== (const KeyTy &key) const
 
ArrayRef< TypegetArgumentTypes () const
 Returns the list of function argument types. More...
 
bool isVariadic () const
 Checks whether the function type is variadic. More...
 
const TypegetReturnType () const
 Returns the function result type. More...
 
- Public Member Functions inherited from mlir::TypeStorage
const AbstractTypegetAbstractType ()
 Return the abstract type descriptor for this type. More...
 

Static Public Member Functions

static LLVMFunctionTypeStorageconstruct (TypeStorageAllocator &allocator, const KeyTy &key)
 Hook into the type uniquing infrastructure. More...
 
static unsigned hashKey (const KeyTy &key)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::TypeStorage
 TypeStorage ()
 This constructor is used by derived classes as part of the TypeUniquer. More...
 
- Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage
 BaseStorage ()=default
 

Detailed Description

Type storage for LLVM dialect function types.

These are uniqued using the list of types they contain and the vararg bit.

Definition at line 330 of file TypeDetail.h.

Member Typedef Documentation

◆ KeyTy

Definition at line 331 of file TypeDetail.h.

Constructor & Destructor Documentation

◆ LLVMFunctionTypeStorage()

mlir::LLVM::detail::LLVMFunctionTypeStorage::LLVMFunctionTypeStorage ( Type  result,
ArrayRef< Type arguments,
bool  variadic 
)
inline

Construct a storage from the given components.

The list is expected to be allocated in the context.

Definition at line 335 of file TypeDetail.h.

Member Function Documentation

◆ construct()

static LLVMFunctionTypeStorage* mlir::LLVM::detail::LLVMFunctionTypeStorage::construct ( TypeStorageAllocator allocator,
const KeyTy key 
)
inlinestatic

Hook into the type uniquing infrastructure.

Definition at line 340 of file TypeDetail.h.

References mlir::StorageUniquer::StorageAllocator::allocate(), and mlir::StorageUniquer::StorageAllocator::copyInto().

◆ getArgumentTypes()

ArrayRef<Type> mlir::LLVM::detail::LLVMFunctionTypeStorage::getArgumentTypes ( ) const
inline

Returns the list of function argument types.

Definition at line 360 of file TypeDetail.h.

◆ getReturnType()

const Type& mlir::LLVM::detail::LLVMFunctionTypeStorage::getReturnType ( ) const
inline

Returns the function result type.

Definition at line 368 of file TypeDetail.h.

◆ hashKey()

static unsigned mlir::LLVM::detail::LLVMFunctionTypeStorage::hashKey ( const KeyTy key)
inlinestatic

Definition at line 348 of file TypeDetail.h.

◆ isVariadic()

bool mlir::LLVM::detail::LLVMFunctionTypeStorage::isVariadic ( ) const
inline

Checks whether the function type is variadic.

Definition at line 365 of file TypeDetail.h.

◆ operator==()

bool mlir::LLVM::detail::LLVMFunctionTypeStorage::operator== ( const KeyTy key) const
inline

Definition at line 354 of file TypeDetail.h.


The documentation for this struct was generated from the following file: