FLANG
Transformational.h
1//===-- Transformational.h --------------------------------------*- C++ -*-===//
2// Generate transformational intrinsic runtime API calls.
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef FORTRAN_OPTIMIZER_BUILDER_RUNTIME_TRANSFORMATIONAL_H
11#define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_TRANSFORMATIONAL_H
12
13#include "mlir/Dialect/Func/IR/FuncOps.h"
14
15namespace fir {
16class ExtendedValue;
17class FirOpBuilder;
18} // namespace fir
19
20namespace fir::runtime {
21
22void genBesselJn(fir::FirOpBuilder &builder, mlir::Location loc,
23 mlir::Value resultBox, mlir::Value n1, mlir::Value n2,
24 mlir::Value x, mlir::Value bn2, mlir::Value bn2_1);
25
26void genBesselJnX0(fir::FirOpBuilder &builder, mlir::Location loc,
27 mlir::Type xTy, mlir::Value resultBox, mlir::Value n1,
28 mlir::Value n2);
29
30void genBesselYn(fir::FirOpBuilder &builder, mlir::Location loc,
31 mlir::Value resultBox, mlir::Value n1, mlir::Value n2,
32 mlir::Value x, mlir::Value bn1, mlir::Value bn1_1);
33
34void genBesselYnX0(fir::FirOpBuilder &builder, mlir::Location loc,
35 mlir::Type xTy, mlir::Value resultBox, mlir::Value n1,
36 mlir::Value n2);
37
38void genCshift(fir::FirOpBuilder &builder, mlir::Location loc,
39 mlir::Value resultBox, mlir::Value arrayBox,
40 mlir::Value shiftBox, mlir::Value dimBox);
41
42void genCshiftVector(fir::FirOpBuilder &builder, mlir::Location loc,
43 mlir::Value resultBox, mlir::Value arrayBox,
44 mlir::Value shiftBox);
45
46void genEoshift(fir::FirOpBuilder &builder, mlir::Location loc,
47 mlir::Value resultBox, mlir::Value arrayBox,
48 mlir::Value shiftBox, mlir::Value boundBox, mlir::Value dimBox);
49
50void genEoshiftVector(fir::FirOpBuilder &builder, mlir::Location loc,
51 mlir::Value resultBox, mlir::Value arrayBox,
52 mlir::Value shiftBox, mlir::Value boundBox);
53
54void genMatmul(fir::FirOpBuilder &builder, mlir::Location loc,
55 mlir::Value matrixABox, mlir::Value matrixBBox,
56 mlir::Value resultBox);
57
58void genMatmulTranspose(fir::FirOpBuilder &builder, mlir::Location loc,
59 mlir::Value matrixABox, mlir::Value matrixBBox,
60 mlir::Value resultBox);
61
62void genPack(fir::FirOpBuilder &builder, mlir::Location loc,
63 mlir::Value resultBox, mlir::Value arrayBox, mlir::Value maskBox,
64 mlir::Value vectorBox);
65
66void genReshape(fir::FirOpBuilder &builder, mlir::Location loc,
67 mlir::Value resultBox, mlir::Value sourceBox,
68 mlir::Value shapeBox, mlir::Value padBox, mlir::Value orderBox);
69
70void genSpread(fir::FirOpBuilder &builder, mlir::Location loc,
71 mlir::Value resultBox, mlir::Value sourceBox, mlir::Value dim,
72 mlir::Value ncopies);
73
74void genTranspose(fir::FirOpBuilder &builder, mlir::Location loc,
75 mlir::Value resultBox, mlir::Value sourceBox);
76
77void genUnpack(fir::FirOpBuilder &builder, mlir::Location loc,
78 mlir::Value resultBox, mlir::Value vectorBox,
79 mlir::Value maskBox, mlir::Value fieldBox);
80
81} // namespace fir::runtime
82
83#endif // FORTRAN_OPTIMIZER_BUILDER_RUNTIME_TRANSFORMATIONAL_H
Definition: FIRBuilder.h:55
Definition: AbstractConverter.h:31