ΒΆbool PointerMayBeCapturedBefore(
    const llvm::Value* V,
    bool ReturnCaptures,
    bool StoreCaptures,
    const llvm::Instruction* I,
    const llvm::DominatorTree* DT,
    bool IncludeI = false,
    llvm::OrderedBasicBlock* OBB = nullptr,
    unsigned int MaxUsesToExplore =
        DefaultMaxUsesToExplore)

Description

PointerMayBeCapturedBefore - Return true if this pointer value may be captured by the enclosing function (which is required to exist). If a DominatorTree is provided, only captures which happen before the given instruction are considered. This routine can be expensive, so consider caching the results. The boolean ReturnCaptures specifies whether returning the value (or part of it) from the function counts as capturing it or not. The boolean StoreCaptures specified whether storing the value (or part of it) into memory anywhere automatically counts as capturing it or not. Captures by the provided instruction are considered if the final parameter is true. An ordered basic block in \p OBB could be used to speed up capture-tracker queries. MaxUsesToExplore specifies how many uses should the analysis explore for one value before giving up due too "too many uses".

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

Parameters

const llvm::Value* V
bool ReturnCaptures
bool StoreCaptures
const llvm::Instruction* I
const llvm::DominatorTree* DT
bool IncludeI = false
llvm::OrderedBasicBlock* OBB = nullptr
unsigned int MaxUsesToExplore = DefaultMaxUsesToExplore