LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::detail::PtrUseVisitorBase::PtrInfo Class Reference

This class provides information about the result of a visit. More...

#include "llvm/Analysis/PtrUseVisitor.h"

Public Member Functions

 PtrInfo ()
 
void reset ()
 Reset the pointer info, clearing all state. More...
 
bool isAborted () const
 Did we abort the visit early? More...
 
bool isEscaped () const
 Is the pointer escaped at some point? More...
 
InstructiongetAbortingInst () const
 Get the instruction causing the visit to abort. More...
 
InstructiongetEscapingInst () const
 Get the instruction causing the pointer to escape. More...
 
void setAborted (Instruction *I=nullptr)
 Mark the visit as aborted. More...
 
void setEscaped (Instruction *I=nullptr)
 Mark the pointer as escaped. More...
 
void setEscapedAndAborted (Instruction *I=nullptr)
 Mark the pointer as escaped, and the visit as aborted. More...
 

Detailed Description

This class provides information about the result of a visit.

After walking all the users (recursively) of a pointer, the basic infrastructure records some commonly useful information such as escape analysis and whether the visit completed or aborted early.

Definition at line 62 of file PtrUseVisitor.h.

Constructor & Destructor Documentation

◆ PtrInfo()

llvm::detail::PtrUseVisitorBase::PtrInfo::PtrInfo ( )
inline

Definition at line 64 of file PtrUseVisitor.h.

Member Function Documentation

◆ getAbortingInst()

Instruction* llvm::detail::PtrUseVisitorBase::PtrInfo::getAbortingInst ( ) const
inline

Get the instruction causing the visit to abort.

Returns
a pointer to the instruction causing the abort if one is available; otherwise returns null.

Definition at line 83 of file PtrUseVisitor.h.

Referenced by AllocaSlices::SliceBuilder::SliceBuilder().

◆ getEscapingInst()

Instruction* llvm::detail::PtrUseVisitorBase::PtrInfo::getEscapingInst ( ) const
inline

Get the instruction causing the pointer to escape.

Returns
a pointer to the instruction which escapes the pointer if one is available; otherwise returns null.

Definition at line 88 of file PtrUseVisitor.h.

Referenced by AllocaSlices::SliceBuilder::SliceBuilder().

◆ isAborted()

bool llvm::detail::PtrUseVisitorBase::PtrInfo::isAborted ( ) const
inline

Did we abort the visit early?

Definition at line 75 of file PtrUseVisitor.h.

Referenced by AllocaSlices::SliceBuilder::SliceBuilder(), and llvm::PtrUseVisitor< SliceBuilder >::visitPtr().

◆ isEscaped()

bool llvm::detail::PtrUseVisitorBase::PtrInfo::isEscaped ( ) const
inline

Is the pointer escaped at some point?

Definition at line 78 of file PtrUseVisitor.h.

Referenced by AllocaSlices::SliceBuilder::SliceBuilder().

◆ reset()

void llvm::detail::PtrUseVisitorBase::PtrInfo::reset ( )
inline

Reset the pointer info, clearing all state.

Definition at line 67 of file PtrUseVisitor.h.

Referenced by llvm::PtrUseVisitor< SliceBuilder >::visitPtr().

◆ setAborted()

void llvm::detail::PtrUseVisitorBase::PtrInfo::setAborted ( Instruction I = nullptr)
inline

Mark the visit as aborted.

Intended for use in a void return.

Parameters
IThe instruction which caused the visit to abort, if available.

Definition at line 92 of file PtrUseVisitor.h.

References I.

Referenced by setEscapedAndAborted().

◆ setEscaped()

void llvm::detail::PtrUseVisitorBase::PtrInfo::setEscaped ( Instruction I = nullptr)
inline

Mark the pointer as escaped.

Intended for use in a void return.

Parameters
IThe instruction which escapes the pointer, if available.

Definition at line 99 of file PtrUseVisitor.h.

References I.

Referenced by setEscapedAndAborted(), llvm::PtrUseVisitor< SliceBuilder >::visitCallSite(), llvm::PtrUseVisitor< SliceBuilder >::visitPtrToIntInst(), and llvm::PtrUseVisitor< SliceBuilder >::visitStoreInst().

◆ setEscapedAndAborted()

void llvm::detail::PtrUseVisitorBase::PtrInfo::setEscapedAndAborted ( Instruction I = nullptr)
inline

Mark the pointer as escaped, and the visit as aborted.

Intended for use in a void return.

Parameters
IThe instruction which both escapes the pointer and aborts the visit, if available.

Definition at line 108 of file PtrUseVisitor.h.

References I, setAborted(), and setEscaped().


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