19#ifndef FORTRAN_LOWER_VECTORSUBSCRIPTS_H
20#define FORTRAN_LOWER_VECTORSUBSCRIPTS_H
22#include "flang/Optimizer/Builder/BoxValue.h"
38class AbstractConverter;
39class StatementContext;
61 using ElementalGeneratorWithBoolReturn =
65 : vector{std::move(vector)}, size{size} {}
76 using LoweredSubscript =
77 std::variant<mlir::Value, LoweredTriplet, LoweredVectorSubscript>;
84 : loweredBase{std::move(loweredBase)}, loweredSubscripts{std::move(
86 componentPath{std::move(componentPath)},
87 substringBounds{substringBounds}, elementType{elementType} {};
101 const ElementalGeneratorWithBoolReturn &elementalGenerator,
102 mlir::Value initialCondition);
109 template <
typename LoopType,
typename Generator>
112 const Generator &elementalGenerator,
113 mlir::Value initialCondition);
119 mlir::Location loc, mlir::Value shape,
121 mlir::ValueRange inductionVariables);
137 MaybeSubstring substringBounds;
139 mlir::Type elementType;
Definition: AbstractConverter.h:82
Definition: StatementContext.h:46
Definition: VectorSubscripts.h:56
void loopOverElements(fir::FirOpBuilder &builder, mlir::Location loc, const ElementalGenerator &elementalGenerator)
Definition: VectorSubscripts.cpp:306
std::function< void(const fir::ExtendedValue &)> ElementalGenerator
Definition: VectorSubscripts.h:60
mlir::Type getElementType()
Return the type of the elements of the array section.
Definition: VectorSubscripts.h:105
mlir::Value loopOverElementsWhile(fir::FirOpBuilder &builder, mlir::Location loc, const ElementalGeneratorWithBoolReturn &elementalGenerator, mlir::Value initialCondition)
Definition: VectorSubscripts.cpp:314
Definition: BoxValue.h:478
Definition: FIRBuilder.h:55
VectorSubscriptBox genVectorSubscriptBox(mlir::Location loc, Fortran::lower::AbstractConverter &converter, Fortran::lower::StatementContext &stmtCtx, const Fortran::evaluate::Expr< Fortran::evaluate::SomeType > &expr)
Definition: VectorSubscripts.cpp:250
Definition: bit-population-count.h:20
Definition: AbstractConverter.h:31
Definition: VectorSubscripts.h:70
Definition: VectorSubscripts.h:63