FLANG
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
fir::MutableBoxValue Class Reference

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

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

Public Member Functions

 MutableBoxValue (mlir::Value addr, mlir::ValueRange lenParameters, MutableProperties mutableProperties)
 
bool isPointer () const
 Is this a Fortran pointer ?
 
bool isAllocatable () const
 Is this an allocatable ?
 
MutableBoxValue clone (mlir::Value newBox) const
 
bool hasNonDeferredLenParams () const
 Does this entity has any non deferred LEN parameters?
 
llvm::ArrayRef< mlir::Value > nonDeferredLenParams () const
 Return the non deferred LEN parameters.
 
LLVM_DUMP_METHOD void dump () const
 
bool isDescribedByVariables () const
 
const MutablePropertiesgetMutableProperties () const
 
- Public Member Functions inherited from fir::AbstractIrBox
 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
 

Protected Member Functions

bool verify () const
 Validate the address type form in the constructor.
 

Protected Attributes

llvm::SmallVector< mlir::Value, 2 > lenParams
 
MutableProperties mutableProperties
 
- 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
 

Friends

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

Detailed Description

MutableBoxValue is used for entities that are represented by the address of a box. This is intended to be used for entities whose base address, shape and type are not constant in the entity lifetime (e.g Allocatables and Pointers).

Constructor & Destructor Documentation

◆ MutableBoxValue()

fir::MutableBoxValue::MutableBoxValue ( mlir::Value  addr,
mlir::ValueRange  lenParameters,
MutableProperties  mutableProperties 
)
inline

Create MutableBoxValue given the address addr of the box and the non deferred LEN parameters lenParameters. The non deferred LEN parameters must always be provided, even if they are constant and already reflected in the address type.

Member Function Documentation

◆ isDescribedByVariables()

bool fir::MutableBoxValue::isDescribedByVariables ( ) const
inline

Set of variable is used instead of a descriptor to hold the entity properties instead of a fir.ref<fir.box<>>.

◆ verify()

bool fir::MutableBoxValue::verify ( ) const
protected

Validate the address type form in the constructor.

Debug verifier for MutableBox ctor. There is no guarantee that this will always be called, so it should not have any functional side effects, the const is here to enforce that.

Member Data Documentation

◆ lenParams

llvm::SmallVector<mlir::Value, 2> fir::MutableBoxValue::lenParams
protected

Hold the non-deferred LEN parameter values (both for characters and derived). Non-deferred LEN parameters cannot change dynamically, as opposed to deferred type parameters (3.147.12.2).

◆ mutableProperties

MutableProperties fir::MutableBoxValue::mutableProperties
protected

Set of variables holding the extents, lower bounds and base address when it is deemed safe to work with these variables rather than directly with a descriptor.


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