FLANG
Public Member Functions | List of all members
Fortran::lower::IterationSpace Class Reference

#include <flang/Lower/IterationSpace.h>

Public Member Functions

template<typename A >
 IterationSpace (mlir::Value inArg, mlir::Value outRes, llvm::iterator_range< A > range)
 
 IterationSpace (const IterationSpace &from, llvm::ArrayRef< mlir::Value > idxs)
 
 IterationSpace (const IterationSpace &from, llvm::ArrayRef< mlir::Value > prefix, llvm::ArrayRef< mlir::Value > suffix)
 
bool empty () const
 
mlir::Value innerArgument () const
 
mlir::Value outerResult () const
 
llvm::SmallVector< mlir::Value > iterVec () const
 
mlir::Value iterValue (std::size_t i) const
 
void setIndexValue (std::size_t i, mlir::Value v)
 Set (rewrite) the Value at a given index.
 
void setIndexValues (llvm::ArrayRef< mlir::Value > vals)
 
void insertIndexValue (std::size_t i, mlir::Value av)
 
void setElement (fir::ExtendedValue &&ele)
 
mlir::Value getElement () const
 
fir::ExtendedValue elementExv () const
 Get the element as an extended value.
 
void clearIndices ()
 

Detailed Description

Abstraction of the iteration space for building the elemental compute loop of an array(-like) statement.

Constructor & Destructor Documentation

◆ IterationSpace()

Fortran::lower::IterationSpace::IterationSpace ( const IterationSpace from,
llvm::ArrayRef< mlir::Value >  prefix,
llvm::ArrayRef< mlir::Value >  suffix 
)
inlineexplicit

Create a copy of the from IterationSpace and prepend the prefix values and append the suffix values, respectively.

Member Function Documentation

◆ getElement()

mlir::Value Fortran::lower::IterationSpace::getElement ( ) const
inline

Get the value that will be merged into the resultant array. This is the computed value that will be stored to the lhs of the assignment.

◆ innerArgument()

mlir::Value Fortran::lower::IterationSpace::innerArgument ( ) const
inline

This is the output value as it appears as an argument in the innermost loop in the nest. The output value is threaded through the loop (and conditionals) to maintain proper SSA form.

◆ iterVec()

llvm::SmallVector< mlir::Value > Fortran::lower::IterationSpace::iterVec ( ) const
inline

Returns a vector for the iteration space. This vector is used to access elements of arrays in the compute loop.

◆ outerResult()

mlir::Value Fortran::lower::IterationSpace::outerResult ( ) const
inline

This is the output value as it appears as an output value from the outermost loop in the loop nest. The output value is threaded through the loop (and conditionals) to maintain proper SSA form.

◆ setElement()

void Fortran::lower::IterationSpace::setElement ( fir::ExtendedValue &&  ele)
inline

Set the element value. This is the SSA value that corresponds to an element of the resultant array value.


The documentation for this class was generated from the following file: