class PtrUseVisitorBase::PtrInfo

Declaration

class PtrUseVisitorBase::PtrInfo { /* full declaration omitted */ };

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.

Declared at: llvm/include/llvm/Analysis/PtrUseVisitor.h:54

Member Variables

private PointerIntPair<llvm::Instruction*, 1, bool> AbortedInfo
private PointerIntPair<llvm::Instruction*, 1, bool> EscapedInfo

Method Overview

Methods

PtrInfo()

Declared at: llvm/include/llvm/Analysis/PtrUseVisitor.h:56

llvm::Instruction* getAbortingInst() const

Description

Get the instruction causing the visit to abort.

Declared at: llvm/include/llvm/Analysis/PtrUseVisitor.h:75

Returns

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

llvm::Instruction* getEscapingInst() const

Description

Get the instruction causing the pointer to escape.

Declared at: llvm/include/llvm/Analysis/PtrUseVisitor.h:80

Returns

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

bool isAborted() const

Description

Did we abort the visit early?

Declared at: llvm/include/llvm/Analysis/PtrUseVisitor.h:67

bool isEscaped() const

Description

Is the pointer escaped at some point?

Declared at: llvm/include/llvm/Analysis/PtrUseVisitor.h:70

void reset()

Description

Reset the pointer info, clearing all state.

Declared at: llvm/include/llvm/Analysis/PtrUseVisitor.h:59

void setAborted(llvm::Instruction* I = nullptr)

Description

Mark the visit as aborted. Intended for use in a void return.

Declared at: llvm/include/llvm/Analysis/PtrUseVisitor.h:84

Parameters

llvm::Instruction* I = nullptr
The instruction which caused the visit to abort, if available.

void setEscaped(llvm::Instruction* I = nullptr)

Description

Mark the pointer as escaped. Intended for use in a void return.

Declared at: llvm/include/llvm/Analysis/PtrUseVisitor.h:91

Parameters

llvm::Instruction* I = nullptr
The instruction which escapes the pointer, if available.

void setEscapedAndAborted(
    llvm::Instruction* I = nullptr)

Description

Mark the pointer as escaped, and the visit as aborted. Intended for use in a void return.

Declared at: llvm/include/llvm/Analysis/PtrUseVisitor.h:100

Parameters

llvm::Instruction* I = nullptr
The instruction which both escapes the pointer and aborts the visit, if available.