LLVM: llvm::CaptureTracker Struct Reference (original) (raw)
This callback is used in conjunction with PointerMayBeCaptured. More...
#include "[llvm/Analysis/CaptureTracking.h](CaptureTracking%5F8h%5Fsource.html)"
| 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. |
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.
◆ 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.
| CaptureTracker::~CaptureTracker ( ) | virtualdefault |
|---|
◆ captured()
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()
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 |
|---|
The documentation for this struct was generated from the following files:
- include/llvm/Analysis/CaptureTracking.h
- lib/Analysis/CaptureTracking.cpp