FLANG
fir::InsertionPoint Class Reference

#include <Optimizer/Transforms/StackArrays.h>

Public Member Functions

template<class T>
 InsertionPoint (T *ptr, bool saveRestoreStack=false)
 InsertionPoint (std::nullptr_t null)
mlir::Operation * tryGetOperation () const
 Get contained operation, or nullptr.
mlir::Block * tryGetBlock () const
 Get contained block, or nullptr.
bool shouldSaveRestoreStack () const
 operator bool () const
bool operator== (const InsertionPoint &rhs) const
bool operator!= (const InsertionPoint &rhs) const

Detailed Description

Stores where an alloca should be inserted. If the PointerUnion is an Operation the alloca should be inserted /after/ the operation. If it is a block, the alloca can be placed anywhere in that block.

Member Function Documentation

◆ shouldSaveRestoreStack()

bool fir::InsertionPoint::shouldSaveRestoreStack ( ) const
inline

Get whether the stack should be saved/restored. If yes, an llvm.stacksave intrinsic should be added at the start of the allocation block, and an llvm.stackrestore intrinsic should be added before its terminator.


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