LLVM 20.0.0git
Public Member Functions | List of all members
llvm::CaptureTracker Struct Referenceabstract

This callback is used in conjunction with PointerMayBeCaptured. More...

#include "llvm/Analysis/CaptureTracking.h"

Public Member Functions

virtual ~CaptureTracker ()
 
virtual void tooManyUses ()=0
 tooManyUses - The depth of traversal has breached a limit.
 
virtual bool shouldExplore (const Use *U)
 shouldExplore - This is the use of a value derived from the pointer.
 
virtual bool captured (const Use *U)=0
 captured - Information about the pointer was captured by the user of use U.
 
virtual bool isDereferenceableOrNull (Value *O, const DataLayout &DL)
 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.
 

Detailed 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.

Definition at line 83 of file CaptureTracking.h.

Constructor & Destructor Documentation

◆ ~CaptureTracker()

CaptureTracker::~CaptureTracker ( )
virtualdefault

Member Function Documentation

◆ captured()

virtual bool llvm::CaptureTracker::captured ( const Use U)
pure virtual

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.

Referenced by computePointerICmp(), and llvm::PointerMayBeCaptured().

◆ isDereferenceableOrNull()

bool CaptureTracker::isDereferenceableOrNull ( Value O,
const DataLayout DL 
)
virtual

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.

Definition at line 59 of file CaptureTracking.cpp.

References DL.

Referenced by llvm::PointerMayBeCaptured().

◆ shouldExplore()

bool CaptureTracker::shouldExplore ( const Use U)
virtual

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.

Definition at line 57 of file CaptureTracking.cpp.

Referenced by llvm::PointerMayBeCaptured().

◆ tooManyUses()

virtual void llvm::CaptureTracker::tooManyUses ( )
pure virtual

tooManyUses - The depth of traversal has breached a limit.

There may be capturing instructions that will not be passed into captured().

Referenced by computePointerICmp(), and llvm::PointerMayBeCaptured().


The documentation for this struct was generated from the following files: