Lines Matching refs:Captured
1 //===--- CaptureTracking.cpp - Determine whether a pointer is captured ----===//
10 // This file contains routines that help determine which pointers are captured.
11 // A pointer value is captured if the function makes a copy of any part of the
12 // pointer that outlives the call. Not being captured means, more or less, that
36 : ReturnCaptures(ReturnCaptures), Captured(false) {}
38 void tooManyUses() { Captured = true; }
40 bool captured(Use *U) {
44 Captured = true;
50 bool Captured;
54 /// PointerMayBeCaptured - Return true if this pointer value may be captured
64 "It doesn't make sense to ask whether a global is captured.");
74 return SCT.Captured;
91 // is captured to avoid taking too much compile time.
110 // Not captured if the callee is readonly, doesn't return a copy through
116 // Not captured if only passed via 'nocapture' arguments. Note that
118 // be captured. This is a subtle point considering that (for example)
121 // captured, even though the loaded value might be the pointer itself
126 // The parameter is not marked 'nocapture' - captured.
127 if (Tracker->captured(U))
132 // Loading from a pointer does not cause it to be captured.
135 // "va-arg" from a pointer does not cause it to be captured.
139 // Stored the pointer - conservatively assume it may be captured.
140 if (Tracker->captured(U))
142 // Storing to the pointee does not cause the pointer to be captured.
148 // The original value is not captured via this if the new value isn't.
168 if (Tracker->captured(U))
172 // Something else - be conservative and say it is captured.
173 if (Tracker->captured(U))