struct CaptureTracker

Declaration

struct CaptureTracker { /* full declaration omitted */ };

Description

This callback is used in conjunction with PointerMayBeCaptured. In addition to the interface here, you'll need to provide your own getters to see whether anything was captured.

Declared at: llvm/include/llvm/Analysis/CaptureTracking.h:92

Method Overview

Methods

virtual bool captured(const llvm::Use* U)

Description

captured - Information about the pointer was captured by the user of use U. Return true to stop the traversal or false to continue looking for more capturing instructions.

Declared at: llvm/include/llvm/Analysis/CaptureTracking.h:109

Parameters

const llvm::Use* U

virtual bool isDereferenceableOrNull(
    llvm::Value* O,
    const llvm::DataLayout& DL)

Description

isDereferenceableOrNull - Overload to allow clients with additional knowledge about pointer dereferenceability to provide it and thereby avoid conservative responses when a pointer is compared to null.

Declared at: llvm/include/llvm/Analysis/CaptureTracking.h:114

Parameters

llvm::Value* O
const llvm::DataLayout& DL

virtual bool shouldExplore(const llvm::Use* U)

Description

shouldExplore - This is the use of a value derived from the pointer. To prune the search (ie., assume that none of its users could possibly capture) return false. To search it, return true. U->getUser() is always an Instruction.

Declared at: llvm/include/llvm/Analysis/CaptureTracking.h:104

Parameters

const llvm::Use* U

virtual void tooManyUses()

Description

tooManyUses - The depth of traversal has breached a limit. There may be capturing instructions that will not be passed into captured().

Declared at: llvm/include/llvm/Analysis/CaptureTracking.h:97

virtual ~CaptureTracker()

Declared at: llvm/include/llvm/Analysis/CaptureTracking.h:93