43 using GenInitValueCBTy =
45 mlir::Type type, mlir::Value ompOrig)>;
46 using GenCombinerCBTy = std::function<void(
48 mlir::Value op1, mlir::Value op2,
bool isByRef)>;
51 enum ReductionIdentifier {
68 static bool doReductionByRef(mlir::Type reductionType);
69 static bool doReductionByRef(mlir::Value reductionVar);
71 static ReductionIdentifier
72 getReductionType(
const omp::clause::ProcedureDesignator &pd);
74 static ReductionIdentifier
75 getReductionType(omp::clause::DefinedOperator::IntrinsicOperator intrinsicOp);
77 static ReductionIdentifier
78 getReductionType(
const fir::ReduceOperationEnum &pd);
81 supportedIntrinsicProcReduction(
const omp::clause::ProcedureDesignator &pd);
83 static const semantics::SourceName
86 static const semantics::SourceName
87 getRealName(
const omp::clause::ProcedureDesignator &pd);
89 static std::string getReductionName(llvm::StringRef name,
91 mlir::Type ty,
bool isByRef);
93 static std::string getReductionName(ReductionIdentifier redId,
95 mlir::Type ty,
bool isByRef);
104 static mlir::Value getReductionInitValue(mlir::Location loc, mlir::Type type,
105 ReductionIdentifier redId,
108 template <
typename FloatOp,
typename IntegerOp>
110 mlir::Type type, mlir::Location loc,
111 mlir::Value op1, mlir::Value op2);
112 template <
typename FloatOp,
typename IntegerOp,
typename ComplexOp>
114 mlir::Type type, mlir::Location loc,
115 mlir::Value op1, mlir::Value op2);
119 ReductionIdentifier redId,
120 mlir::Type type, mlir::Value op1,
125 template <
typename DeclareRedType>
128 mlir::Type type, mlir::Location loc,
bool isByRef,
129 GenCombinerCBTy genCombinerCB, GenInitValueCBTy genInitValueCB);
135 template <
typename OpType>
137 llvm::StringRef reductionOpName,
138 const ReductionIdentifier redId,
139 mlir::Type type, mlir::Location loc,
144 template <
typename OpType,
typename RedOperatorListTy>
147 const RedOperatorListTy &redOperatorList,
148 llvm::SmallVectorImpl<mlir::Value> &reductionVars,
149 llvm::SmallVectorImpl<bool> &reduceVarByRef,
150 llvm::SmallVectorImpl<mlir::Attribute> &reductionDeclSymbols,
151 const llvm::SmallVectorImpl<const semantics::Symbol *> &reductionSymbols);
static bool processReductionArguments(mlir::Location currentLocation, lower::AbstractConverter &converter, const RedOperatorListTy &redOperatorList, llvm::SmallVectorImpl< mlir::Value > &reductionVars, llvm::SmallVectorImpl< bool > &reduceVarByRef, llvm::SmallVectorImpl< mlir::Attribute > &reductionDeclSymbols, const llvm::SmallVectorImpl< const semantics::Symbol * > &reductionSymbols)
Definition ReductionProcessor.cpp:680
static DeclareRedType createDeclareReductionHelper(AbstractConverter &converter, llvm::StringRef reductionOpName, mlir::Type type, mlir::Location loc, bool isByRef, GenCombinerCBTy genCombinerCB, GenInitValueCBTy genInitValueCB)
Definition ReductionProcessor.cpp:559