llvm::PointerMayBeCapturedBefore

PointerMayBeCapturedBefore overloads

Synopses

Declared in <llvm/Analysis/CaptureTracking.h>

Return true if this pointer may be captured before a given instruction.

bool
PointerMayBeCapturedBefore(
    Value const* V,
    bool ReturnCaptures,
    Instruction const* I,
    DominatorTree const* DT,
    bool IncludeI = false,
    unsigned int MaxUsesToExplore = 0,
    LoopInfo const* LI = nullptr);
» more...

Return which components of the pointer may be captured on the path to I.

CaptureComponents
PointerMayBeCapturedBefore(
    Value const* V,
    bool ReturnCaptures,
    Instruction const* I,
    DominatorTree const* DT,
    bool IncludeI,
    CaptureComponents Mask,
    function_ref<bool(CaptureComponents)> StopFn = capturesAnything,
    LoopInfo const* LI = nullptr,
    unsigned int MaxUsesToExplore = 0);
» more...

Return Value

  • True if the pointer may be captured before I.
  • Capture components that may be captured on the path to I.

Parameters

NameDescription
VPointer value whose captures are queried.
ReturnCapturesWhether returning the value (or part of it) counts as capturing it.
IInstruction before which captures are considered.
DTOptional dominator tree used to restrict captures to those before I.
IncludeIWhether captures by I itself are considered.
MaxUsesToExploreHow many uses to explore before giving up; zero means use the default.
LIOptional loop info used to prune reachability checks.
MaskCapture components to consider.
StopFnPredicate that aborts traversal when it returns true on the accumulated components.