Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
llvm::CaptureTracker Struct Referenceabstract

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

#include "llvm/Analysis/CaptureTracking.h"

Public Types

enum  Action { Stop , Continue , ContinueIgnoringReturn }
 Action returned from captures(). More...

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 Action captured (const Use *U, UseCaptureInfo CI)=0
 Use U directly captures CI.UseCC and additionally CI.ResultCC through the return value of the user of U.

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 139 of file CaptureTracking.h.

Member Enumeration Documentation

◆ Action

Action returned from captures().

Enumerator
Stop 

Stop the traversal.

Continue 

Continue traversal, and also follow the return value of the user if it has additional capture components (that is, if it has capture components in Ret that are not part of Other).

ContinueIgnoringReturn 

Continue traversal, but do not follow the return value of the user, even if it has additional capture components.

Should only be used if captures() has already taken the potential return captures into account.

Definition at line 141 of file CaptureTracking.h.

Constructor & Destructor Documentation

◆ ~CaptureTracker()

CaptureTracker::~CaptureTracker ( )
virtualdefault

Member Function Documentation

◆ captured()

virtual Action llvm::CaptureTracker::captured ( const Use * U,
UseCaptureInfo CI )
pure virtual

Use U directly captures CI.UseCC and additionally CI.ResultCC through the return value of the user of U.

Return one of Stop, Continue or ContinueIgnoringReturn to control further traversal.

Referenced by computePointerICmp(), and 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 56 of file CaptureTracking.cpp.

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

◆ 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().

References shouldExplore().

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


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