1 //===-- Support.h - generate support 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_SUPPORT_H 10 #define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_SUPPORT_H 11 12 namespace mlir { 13 class Value; 14 class Location; 15 } // namespace mlir 16 17 namespace fir { 18 class FirOpBuilder; 19 } 20 21 namespace fir::runtime { 22 23 /// Generate call to `CopyAndUpdateDescriptor` runtime routine. 24 void genCopyAndUpdateDescriptor(fir::FirOpBuilder &builder, mlir::Location loc, 25 mlir::Value to, mlir::Value from, 26 mlir::Value newDynamicType, 27 mlir::Value newAttribute, 28 mlir::Value newLowerBounds); 29 30 /// Generate call to `IsAssumedSize` runtime routine. 31 mlir::Value genIsAssumedSize(fir::FirOpBuilder &builder, mlir::Location loc, 32 mlir::Value box); 33 34 } // namespace fir::runtime 35 #endif // FORTRAN_OPTIMIZER_BUILDER_RUNTIME_SUPPORT_H 36