FLANG
SignatureBuilder Class Reference
Inheritance diagram for SignatureBuilder:
Fortran::lower::CallInterface< SignatureBuilder >

Public Member Functions

 SignatureBuilder (const Fortran::evaluate::characteristics::Procedure &p, Fortran::lower::AbstractConverter &c, bool forceImplicit)
 SignatureBuilder (const Fortran::evaluate::ProcedureDesignator &procDes, Fortran::lower::AbstractConverter &c)
bool hasAlternateReturns () const
std::string getMangledName () const
 This is only here to fulfill CRTP dependencies and should not be called.
mlir::Location getCalleeLocation () const
 This is only here to fulfill CRTP dependencies and should not be called.
const Fortran::semantics::SymbolgetProcedureSymbol () const
Fortran::evaluate::characteristics::Procedure characterize () const
const Fortran::evaluate::characteristics::ProceduregetCallDescription () const
mlir::FunctionType getFunctionType ()
 Return the translated signature.
mlir::func::FuncOp getOrCreateFuncOp ()
mlir::Type getHostAssociatedTy () const
Public Member Functions inherited from Fortran::lower::CallInterface< SignatureBuilder >
mlir::func::FuncOp getFuncOp () const
std::size_t getNumFIRArguments () const
 Number of MLIR inputs/outputs of the created FuncOp.
std::size_t getNumFIRResults () const
llvm::SmallVector< mlir::Type > getResultType () const
 Return the MLIR output types.
llvm::ArrayRef< PassedEntity > getPassedArguments () const
std::optional< PassedEntity > getPassedResult () const
mlir::FunctionType genFunctionType ()
 Returns the mlir function type.
void determineInterface (bool isImplicit, const Fortran::evaluate::characteristics::Procedure &)
bool callerAllocateResult () const
 Does the caller need to allocate storage for the result ?
bool mustPassResult () const
 Is the Fortran result passed as an extra MLIR argument ?
bool mustSaveResult () const
 Must the MLIR result be saved with a fir.save_result ?
bool canBeCalledViaImplicitInterface () const
 Can the associated procedure be called via an implicit interface?
fir::FortranProcedureFlagsEnumAttr getProcedureAttrs (mlir::MLIRContext *) const

Static Public Member Functions

static constexpr bool isMainProgram ()
 SignatureBuilder cannot be used on main program.
static constexpr bool isIndirectCall ()
 This is not the description of an indirect call.
static constexpr bool hasHostAssociated ()

Additional Inherited Members

Public Types inherited from Fortran::lower::CallInterface< SignatureBuilder >
enum  PassEntityBy
 Enum the different ways an entity can be passed-by.
enum  Property
using FortranEntity
using FirValue
Protected Member Functions inherited from Fortran::lower::CallInterface< SignatureBuilder >
 CallInterface (Fortran::lower::AbstractConverter &c)
SignatureBuilderside ()
 CRTP handle.
void declare ()
void mapPassedEntities ()
void mapBackInputToPassedEntity (const FirPlaceHolder &, FirValue)
Protected Attributes inherited from Fortran::lower::CallInterface< SignatureBuilder >
llvm::SmallVector< FirPlaceHolder > outputs
llvm::SmallVector< FirPlaceHolder > inputs
mlir::func::FuncOp func
llvm::SmallVector< PassedEntity > passedArguments
std::optional< PassedEntity > passedResult
bool saveResult
Fortran::lower::AbstractConverterconverter
std::optional< Fortran::evaluate::characteristics::Procedurecharacteristic

Detailed Description

SignatureBuilder is a CRTP implementation of CallInterface intended to help translating characteristics::Procedure to mlir::FunctionType using the CallInterface translation.

Member Function Documentation

◆ getCallDescription()

const Fortran::evaluate::characteristics::Procedure & SignatureBuilder::getCallDescription ( ) const
inline

Return the characteristics::Procedure that is being translated to mlir::FunctionType.

◆ hasAlternateReturns()

bool SignatureBuilder::hasAlternateReturns ( ) const
inline

Does the procedure characteristics being translated have alternate returns ?


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