FLANG
TemporaryStack.h
1//===- TemporaryStack.h --- temporary stack runtime API 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#ifndef FORTRAN_OPTIMIZER_BUILDER_RUNTIME_TEMPORARYSTACK_H
10#define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_TEMPORARYSTACK_H
11
12namespace mlir {
13class Value;
14class Location;
15} // namespace mlir
16
17namespace fir {
18class FirOpBuilder;
19}
20
21namespace fir::runtime {
22
23mlir::Value genCreateValueStack(mlir::Location loc, fir::FirOpBuilder &builder);
24
25void genPushValue(mlir::Location loc, fir::FirOpBuilder &builder,
26 mlir::Value opaquePtr, mlir::Value boxValue);
27void genValueAt(mlir::Location loc, fir::FirOpBuilder &builder,
28 mlir::Value opaquePtr, mlir::Value i, mlir::Value retValueBox);
29
30void genDestroyValueStack(mlir::Location loc, fir::FirOpBuilder &builder,
31 mlir::Value opaquePtr);
32
33mlir::Value genCreateDescriptorStack(mlir::Location loc,
34 fir::FirOpBuilder &builder);
35
36void genPushDescriptor(mlir::Location loc, fir::FirOpBuilder &builder,
37 mlir::Value opaquePtr, mlir::Value boxValue);
38void genDescriptorAt(mlir::Location loc, fir::FirOpBuilder &builder,
39 mlir::Value opaquePtr, mlir::Value i,
40 mlir::Value retValueBox);
41
42void genDestroyDescriptorStack(mlir::Location loc, fir::FirOpBuilder &builder,
43 mlir::Value opaquePtr);
44} // namespace fir::runtime
45#endif // FORTRAN_OPTIMIZER_BUILDER_RUNTIME_TEMPORARYSTACK_H
Definition: FIRBuilder.h:55
Definition: AbstractConverter.h:31
@ Value
Lower argument to a value. Mainly intended for scalar arguments.
Definition: AbstractConverter.h:27