FLANG
Public Member Functions | List of all members
fir::AbstractIrBox Class Reference

Base class for values associated to a fir.box or fir.ref<fir.box>. More...

#include <flang/Optimizer/Builder/BoxValue.h>

Inheritance diagram for fir::AbstractIrBox:
fir::AbstractBox fir::AbstractArrayBox fir::BoxValue fir::MutableBoxValue

Public Member Functions

 AbstractIrBox (mlir::Value addr)
 
 AbstractIrBox (mlir::Value addr, llvm::ArrayRef< mlir::Value > lbounds, llvm::ArrayRef< mlir::Value > extents)
 
fir::BaseBoxType getBoxTy () const
 Get the fir.box<type> part of the address type.
 
mlir::Type getBaseTy () const
 
mlir::Type getMemTy () const
 
mlir::Type getEleTy () const
 Get the scalar type related to the described entity.
 
bool hasRank () const
 Is the entity an array or an assumed rank ?
 
bool hasAssumedRank () const
 Is this an assumed rank ?
 
unsigned rank () const
 
bool isCharacter () const
 Is this a character entity ?
 
bool isDerived () const
 Is this a derived type entity ?
 
bool isDerivedWithLenParameters () const
 
bool isPolymorphic () const
 Is this a polymorphic entity?
 
bool isUnlimitedPolymorphic () const
 Is this a CLASS(*)/TYPE(*)?
 
- Public Member Functions inherited from fir::AbstractBox
 AbstractBox (mlir::Value addr)
 
mlir::Value getAddr () const
 
- Public Member Functions inherited from fir::AbstractArrayBox
 AbstractArrayBox (llvm::ArrayRef< mlir::Value > extents, llvm::ArrayRef< mlir::Value > lbounds)
 
const llvm::SmallVectorImpl< mlir::Value > & getExtents () const
 
const llvm::SmallVectorImpl< mlir::Value > & getLBounds () const
 
bool lboundsAllOne () const
 
std::size_t rank () const
 

Additional Inherited Members

- Protected Attributes inherited from fir::AbstractBox
mlir::Value addr
 
- Protected Attributes inherited from fir::AbstractArrayBox
llvm::SmallVector< mlir::Value, 4 > extents
 
llvm::SmallVector< mlir::Value, 4 > lbounds
 

Detailed Description

Base class for values associated to a fir.box or fir.ref<fir.box>.

Member Function Documentation

◆ getBaseTy()

mlir::Type fir::AbstractIrBox::getBaseTy ( ) const
inline

Return the part of the address type after memory and box types. That is the element type, maybe wrapped in a fir.array type.

◆ getMemTy()

mlir::Type fir::AbstractIrBox::getMemTy ( ) const
inline

Return the memory type of the data address inside the box:

  • for fir.box<fir.ptr<T>>, return fir.ptr<T>
  • for fir.box<fir.heap<T>>, return fir.heap<T>
  • for fir.box<T>, return fir.ref<T>

◆ rank()

unsigned fir::AbstractIrBox::rank ( ) const
inline

Returns the rank of the entity. Beware that zero will be returned for both scalars and assumed rank.


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