PointerMayBeCapturedBefore overloads
Declared in <llvm/Analysis/CaptureTracking.h>
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. Captures by the provided instruction are considered if the final parameter is true. MaxUsesToExplore specifies how many uses the analysis should explore for one value before giving up due too "too many uses". If MaxUsesToExplore is zero, a default value is assumed. This function only considers captures of the passed value via its def-use chain, without considering captures of values it may be based on, or implicit captures such as for external globals.
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. Only consider components that are part of Mask. Once StopFn on the accumulated components returns true, the traversal is aborted early. By default, this happens when any of the components in Mask are captured. This function only considers captures of the passed value via its def-use chain, without considering captures of values it may be based on, or implicit captures such as for external globals.
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...