FLANG
ConvertCall.h
1//===-- ConvertCall.h -- lowering of calls ----------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/
10//
11//===----------------------------------------------------------------------===//
15//===----------------------------------------------------------------------===//
16
17#ifndef FORTRAN_LOWER_CONVERTCALL_H
18#define FORTRAN_LOWER_CONVERTCALL_H
19
20#include "flang/Lower/AbstractConverter.h"
21#include "flang/Lower/CallInterface.h"
22#include "flang/Optimizer/Builder/HLFIRTools.h"
23#include <optional>
24
25namespace Fortran::lower {
26
30 std::variant<fir::ExtendedValue, hlfir::EntityWithAttributes>;
31
40std::pair<LoweredResult, bool> genCallOpAndResult(
41 mlir::Location loc, Fortran::lower::AbstractConverter &converter,
43 Fortran::lower::CallerInterface &caller, mlir::FunctionType callSiteType,
44 std::optional<mlir::Type> resultType, bool isElemental = false);
45
50 mlir::Value arg);
51
55
58std::optional<hlfir::EntityWithAttributes> convertCallToHLFIR(
59 mlir::Location loc, Fortran::lower::AbstractConverter &converter,
60 const evaluate::ProcedureRef &procRef, std::optional<mlir::Type> resultType,
62
63void convertUserDefinedAssignmentToHLFIR(
64 mlir::Location loc, Fortran::lower::AbstractConverter &converter,
65 const evaluate::ProcedureRef &procRef, hlfir::Entity lhs, hlfir::Entity rhs,
67} // namespace Fortran::lower
68#endif // FORTRAN_LOWER_CONVERTCALL_H
Definition: call.h:232
Definition: AbstractConverter.h:82
Definition: CallInterface.h:282
Definition: StatementContext.h:46
Definition: SymbolMap.h:146
Definition: HLFIRTools.h:51
Definition: AbstractConverter.h:59
std::optional< hlfir::EntityWithAttributes > convertCallToHLFIR(mlir::Location loc, Fortran::lower::AbstractConverter &converter, const evaluate::ProcedureRef &procRef, std::optional< mlir::Type > resultType, Fortran::lower::SymMap &symMap, Fortran::lower::StatementContext &stmtCtx)
Definition: ConvertCall.cpp:2834
std::pair< LoweredResult, bool > genCallOpAndResult(mlir::Location loc, Fortran::lower::AbstractConverter &converter, Fortran::lower::SymMap &symMap, Fortran::lower::StatementContext &stmtCtx, Fortran::lower::CallerInterface &caller, mlir::FunctionType callSiteType, std::optional< mlir::Type > resultType, bool isElemental=false)
Definition: ConvertCall.cpp:288
std::variant< fir::ExtendedValue, hlfir::EntityWithAttributes > LoweredResult
Definition: ConvertCall.h:30
mlir::Value argumentHostAssocs(Fortran::lower::AbstractConverter &converter, mlir::Value arg)
Definition: ConvertCall.cpp:104
bool isIntrinsicModuleProcRef(const Fortran::evaluate::ProcedureRef &procRef)
Definition: ConvertCall.cpp:2818