LLVM API Documentation

Public Member Functions
llvm::detail::PtrUseVisitorBase::PtrInfo Class Reference

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

#include <PtrUseVisitor.h>

List of all members.

Public Member Functions

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

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 49 of file PtrUseVisitor.h.


Constructor & Destructor Documentation

Definition at line 51 of file PtrUseVisitor.h.


Member Function Documentation

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 70 of file PtrUseVisitor.h.

References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer().

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 75 of file PtrUseVisitor.h.

References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer().

Is the pointer escaped at some point?

Definition at line 65 of file PtrUseVisitor.h.

References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getInt().

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 79 of file PtrUseVisitor.h.

References I, llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::setInt(), and llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::setPointer().

Referenced by setEscapedAndAborted().

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 95 of file PtrUseVisitor.h.

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


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