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"
48 const Fortran::evaluate::ProcedureRef &procRef,
49 const Fortran::evaluate::SpecificIntrinsic &intrinsic,
55using OperandPrepareAs = std::function<void(
const Fortran::lower::SomeExpr &,
62using OperandPresent = std::function<std::optional<mlir::Value>(std::size_t)>;
86 std::optional<mlir::Type> retTy,
99 llvm::StringRef name, std::optional<mlir::Type> retTy,
111 llvm::StringRef name, std::optional<mlir::Type> resultType,
Definition AbstractConverter.h:87
Definition StatementContext.h:46
Definition BoxValue.h:480
Definition FIRBuilder.h:59
Definition ParserActions.h:24
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:345
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:104
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:323
fir::IntrinsicLoweringOptions getIntrinsicLoweringOptions(AbstractConverter &)
Build intrinsic lowering options from the converter state.
Definition CustomIntrinsicCall.cpp:90
std::function< void(const Fortran::lower::SomeExpr &)> OperandPrepare
Definition CustomIntrinsicCall.h:54
bool intrinsicRequiresCustomOptionalHandling(const Fortran::evaluate::ProcedureRef &procRef, const Fortran::evaluate::SpecificIntrinsic &intrinsic, AbstractConverter &converter)
Definition CustomIntrinsicCall.cpp:79
std::function< fir::ExtendedValue(std::size_t, bool)> OperandGetter
Definition CustomIntrinsicCall.h:72
std::function< std::optional< mlir::Value >(std::size_t)> OperandPresent
Definition CustomIntrinsicCall.h:62
Definition bit-population-count.h:20
LowerIntrinsicArgAs
Definition IntrinsicCall.h:60