13#ifndef LLVM_ANALYSIS_CAPTURETRACKING_H 
   14#define LLVM_ANALYSIS_CAPTURETRACKING_H 
   49                                     unsigned MaxUsesToExplore = 0);
 
   61      unsigned MaxUsesToExplore = 0);
 
   80                                           bool IncludeI = 
false,
 
   81                                           unsigned MaxUsesToExplore = 0,
 
   96      const LoopInfo *LI = 
nullptr, 
unsigned MaxUsesToExplore = 0);
 
  109  LLVM_ABI std::pair<Instruction *, CaptureComponents>
 
  112                      unsigned MaxUsesToExplore = 0);
 
  197                                     unsigned MaxUsesToExplore = 0);
 
This file defines the DenseMap class.
 
Represents which components of the pointer may be captured in which location.
 
A parsed version of the target data layout string in and methods for querying it.
 
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
 
A Use represents the edge between a Value definition and its users.
 
LLVM Value Representation.
 
An efficient, type-erasing, non-owning reference to a callable.
 
This is an optimization pass for GlobalISel generic memory operations.
 
LLVM_ABI std::pair< Instruction *, CaptureComponents > FindEarliestCapture(const Value *V, Function &F, bool ReturnCaptures, const DominatorTree &DT, CaptureComponents Mask, unsigned MaxUsesToExplore=0)
 
LLVM_ABI unsigned getDefaultMaxUsesToExploreForCaptureTracking()
getDefaultMaxUsesToExploreForCaptureTracking - Return default value of the maximal number of uses to ...
 
LLVM_ABI bool PointerMayBeCapturedBefore(const Value *V, bool ReturnCaptures, const Instruction *I, const DominatorTree *DT, bool IncludeI=false, unsigned MaxUsesToExplore=0, const LoopInfo *LI=nullptr)
PointerMayBeCapturedBefore - Return true if this pointer value may be captured by the enclosing funct...
 
CaptureComponents
Components of the pointer that may be captured.
 
LLVM_ABI bool PointerMayBeCaptured(const Value *V, bool ReturnCaptures, unsigned MaxUsesToExplore=0)
PointerMayBeCaptured - Return true if this pointer value may be captured by the enclosing function (w...
 
bool capturesAnything(CaptureComponents CC)
 
LLVM_ABI UseCaptureInfo DetermineUseCaptureKind(const Use &U, const Value *Base)
Determine what kind of capture behaviour U may exhibit.
 
bool capturesNothing(CaptureComponents CC)
 
This callback is used in conjunction with PointerMayBeCaptured.
 
virtual bool shouldExplore(const Use *U)
shouldExplore - This is the use of a value derived from the pointer.
 
Action
Action returned from captures().
 
@ ContinueIgnoringReturn
Continue traversal, but do not follow the return value of the user, even if it has additional capture...
 
@ Continue
Continue traversal, and also follow the return value of the user if it has additional capture compone...
 
@ Stop
Stop the traversal.
 
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...
 
virtual void tooManyUses()=0
tooManyUses - The depth of traversal has breached a limit.
 
virtual ~CaptureTracker()
 
Capture information for a specific Use.
 
bool isPassthrough() const
 
CaptureComponents UseCC
Components captured by this use.
 
UseCaptureInfo(CaptureComponents UseCC, CaptureComponents ResultCC=CaptureComponents::None)
 
CaptureComponents ResultCC
Components captured by the return value of the user of this Use.
 
static UseCaptureInfo passthrough()