FLANG
Public Types | Public Member Functions | Friends | List of all members
Fortran::lower::ImplicitIterSpace Class Reference

#include <flang/Lower/IterationSpace.h>

Inheritance diagram for Fortran::lower::ImplicitIterSpace:
Fortran::lower::StackableConstructExpr< llvm::SmallVector< FrontEndExpr > >

Public Types

using Base = StackableConstructExpr< llvm::SmallVector< FrontEndExpr > >
 
using FrontEndMaskExpr = FrontEndExpr
 

Public Member Functions

LLVM_DUMP_METHOD void dump () const
 
void append (FrontEndMaskExpr e)
 
llvm::SmallVector< FrontEndMaskExprgetExprs () const
 
void addMaskVariable (FrontEndExpr exp, mlir::Value var, mlir::Value shape, mlir::Value header)
 
mlir::Value lookupMaskVariable (FrontEndExpr exp)
 
mlir::Value lookupMaskShapeBuffer (FrontEndExpr exp)
 
mlir::Value lookupMaskHeader (FrontEndExpr exp)
 
llvm::SmallVector< llvm::SmallVector< FrontEndMaskExpr > > & getMasks ()
 
const llvm::SmallVector< llvm::SmallVector< FrontEndMaskExpr > > & getMasks () const
 
void shrinkStack ()
 
- Public Member Functions inherited from Fortran::lower::StackableConstructExpr< llvm::SmallVector< FrontEndExpr > >
bool empty () const
 
void growStack ()
 
void bind (FrontEndExpr e, GenerateElementalArrayFunc &&fun)
 Bind a front-end expression to a closure.
 
void rebind (FrontEndExpr e, GenerateElementalArrayFunc &&fun)
 Replace the binding of front-end expression e with a new closure.
 
GenerateElementalArrayFunc getBoundClosure (FrontEndExpr e) const
 Get the closure bound to the front-end expression, e.
 
bool isLowered (FrontEndExpr e) const
 Has the front-end expression, e, been lowered and bound?
 
StatementContextstmtContext ()
 

Friends

llvm::raw_ostream & operator<< (llvm::raw_ostream &, const ImplicitIterSpace &)
 

Additional Inherited Members

- Protected Member Functions inherited from Fortran::lower::StackableConstructExpr< llvm::SmallVector< FrontEndExpr > >
void shrinkStack ()
 
- Protected Attributes inherited from Fortran::lower::StackableConstructExpr< llvm::SmallVector< FrontEndExpr > >
llvm::SmallVector< llvm::SmallVector< FrontEndExpr > > stack
 
llvm::DenseMap< FrontEndExpr, GenerateElementalArrayFunc > vmap
 
StatementContext stmtCtx
 

Detailed Description

All array expressions have an implicit iteration space, which is isomorphic to the shape of the base array that facilitates the expression having a non-zero rank. This implied iteration space may be conditionalized (disjunctively) with an if-elseif-else like structure, specifically Fortran's WHERE construct.

This class is used in the bridge to collect the expressions from the front end (the WHERE construct mask expressions), forward them for lowering as array expressions in an "evaluate once" (copy-in, copy-out) semantics. See 10.2.3.2p3, 10.2.3.2p13, etc.

Member Function Documentation

◆ addMaskVariable()

void Fortran::lower::ImplicitIterSpace::addMaskVariable ( FrontEndExpr  exp,
mlir::Value  var,
mlir::Value  shape,
mlir::Value  header 
)
inline

Add a variable binding, var, along with its shape for the mask expression exp.

◆ lookupMaskShapeBuffer()

mlir::Value Fortran::lower::ImplicitIterSpace::lookupMaskShapeBuffer ( FrontEndExpr  exp)
inline

Lookup the variable containing the shape vector for the mask array expression results.

◆ lookupMaskVariable()

mlir::Value Fortran::lower::ImplicitIterSpace::lookupMaskVariable ( FrontEndExpr  exp)
inline

Lookup the variable corresponding to the temporary buffer that contains the mask array expression results.


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