24#ifndef FORTRAN_LOWER_CUSTOMINTRINSICCALL_H
25#define FORTRAN_LOWER_CUSTOMINTRINSICCALL_H
27#include "flang/Lower/AbstractConverter.h"
28#include "flang/Optimizer/Builder/IntrinsicCall.h"
36struct SpecificIntrinsic;
47 AbstractConverter &converter);
59using OperandPresent = std::function<std::optional<mlir::Value>(std::size_t)>;
83 std::optional<mlir::Type> retTy,
96 llvm::StringRef name, std::optional<mlir::Type> retTy,
108 llvm::StringRef name, std::optional<mlir::Type> resultType,
Definition: AbstractConverter.h:82
Definition: StatementContext.h:46
Definition: BoxValue.h:478
Definition: FIRBuilder.h:55
fir::ExtendedValue lowerCustomIntrinsic(fir::FirOpBuilder &builder, mlir::Location loc, llvm::StringRef name, std::optional< mlir::Type > retTy, const OperandPresent &isPresentCheck, const OperandGetter &getOperand, std::size_t numOperands, Fortran::lower::StatementContext &stmtCtx)
Definition: CustomIntrinsicCall.cpp:329
fir::ExtendedValue genIntrinsicCall(fir::FirOpBuilder &builder, mlir::Location loc, llvm::StringRef name, std::optional< mlir::Type > resultType, llvm::ArrayRef< fir::ExtendedValue > args, StatementContext &stmtCtx, Fortran::lower::AbstractConverter *converter=nullptr)
Definition: CustomIntrinsicCall.cpp:92
std::function< fir::ExtendedValue(std::size_t, bool)> OperandGetter
Definition: CustomIntrinsicCall.h:69
void prepareCustomIntrinsicArgument(const Fortran::evaluate::ProcedureRef &procRef, const Fortran::evaluate::SpecificIntrinsic &intrinsic, std::optional< mlir::Type > retTy, const OperandPrepare &prepareOptionalArgument, const OperandPrepareAs &prepareOtherArgument, AbstractConverter &converter)
Definition: CustomIntrinsicCall.cpp:307
std::function< std::optional< mlir::Value >(std::size_t)> OperandPresent
Definition: CustomIntrinsicCall.h:59
std::function< void(const Fortran::lower::SomeExpr &)> OperandPrepare
Definition: CustomIntrinsicCall.h:51
bool intrinsicRequiresCustomOptionalHandling(const Fortran::evaluate::ProcedureRef &procRef, const Fortran::evaluate::SpecificIntrinsic &intrinsic, AbstractConverter &converter)
Definition: CustomIntrinsicCall.cpp:78
Definition: bit-population-count.h:20
LowerIntrinsicArgAs
Definition: IntrinsicCall.h:96