FLANG
|
#include <flang/Optimizer/Builder/TemporaryStorage.h>
Public Member Functions | |
HomogeneousScalarStack (mlir::Location loc, fir::FirOpBuilder &builder, fir::SequenceType declaredType, mlir::Value extent, llvm::ArrayRef< mlir::Value > lengths, bool allocateOnHeap, bool stackThroughLoops, llvm::StringRef name) | |
void | pushValue (mlir::Location loc, fir::FirOpBuilder &builder, mlir::Value value) |
void | resetFetchPosition (mlir::Location loc, fir::FirOpBuilder &builder) |
mlir::Value | fetch (mlir::Location loc, fir::FirOpBuilder &builder) |
void | destroy (mlir::Location loc, fir::FirOpBuilder &builder) |
hlfir::Entity | moveStackAsArrayExpr (mlir::Location loc, fir::FirOpBuilder &builder) |
bool | canBeFetchedAfterPush () const |
Data structure to stack simple scalars that all have the same type and type parameters, and where the total number of elements that will be pushed is known or can be maximized. It is implemented inlined and does not require runtime.
|
inline |
"fetch" cannot be called right after "pushValue" because the counter is both used for pushing and fetching.
hlfir::Entity fir::factory::HomogeneousScalarStack::moveStackAsArrayExpr | ( | mlir::Location | loc, |
fir::FirOpBuilder & | builder | ||
) |
Move the temporary storage into a rank one array expression value (hlfir.expr<?xT>). The temporary should not be used anymore after this call.