13#ifndef FORTRAN_OPTIMIZER_TRANSFORMS_UTILS_H
14#define FORTRAN_OPTIMIZER_TRANSFORMS_UTILS_H
18using MinlocBodyOpGeneratorTy = llvm::function_ref<mlir::Value(
19 fir::FirOpBuilder &, mlir::Location,
const mlir::Type &, mlir::Value,
20 mlir::Value, mlir::Value,
const llvm::SmallVectorImpl<mlir::Value> &)>;
21using InitValGeneratorTy = llvm::function_ref<mlir::Value(
22 fir::FirOpBuilder &, mlir::Location,
const mlir::Type &)>;
23using AddrGeneratorTy = llvm::function_ref<mlir::Value(
24 fir::FirOpBuilder &, mlir::Location,
const mlir::Type &, mlir::Value,
28void genMinMaxlocReductionLoop(fir::FirOpBuilder &builder, mlir::Value array,
29 fir::InitValGeneratorTy initVal,
30 fir::MinlocBodyOpGeneratorTy genBody,
31 fir::AddrGeneratorTy getAddrFn,
unsigned rank,
32 mlir::Type elementType, mlir::Location loc,
33 mlir::Type maskElemType, mlir::Value resultArr,
34 bool maskMayBeLogicalScalar);
Definition AbstractConverter.h:34