Home | History | Annotate | Download | only in Analysis

Lines Matching defs: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
39 : ReturnCaptures(ReturnCaptures), Captured(false) {}
41 void tooManyUses() override { Captured = true; }
43 bool captured(const Use *U) override {
47 Captured = true;
53 bool Captured;
65 ReturnCaptures(ReturnCaptures), IncludeI(IncludeI), Captured(false) {}
67 void tooManyUses() override { Captured = true; }
129 bool captured(const Use *U) override {
136 Captured = true;
147 bool Captured;
151 /// PointerMayBeCaptured - Return true if this pointer value may be captured
161 "It doesn't make sense to ask whether a global is captured.");
171 return SCT.Captured;
175 /// captured by the enclosing function (which is required to exist). If a
189 "It doesn't make sense to ask whether a global is captured.");
205 return CB.Captured;
221 // is captured to avoid taking too much compile time.
239 // Not captured if the callee is readonly, doesn't return a copy through
245 // Not captured if only passed via 'nocapture' arguments. Note that
247 // be captured. This is a subtle point considering that (for example)
250 // captured, even though the loaded value might be the pointer itself
256 // The parameter is not marked 'nocapture' - captured.
257 if (Tracker->captured(U))
262 // Loading from a pointer does not cause it to be captured.
265 // "va-arg" from a pointer does not cause it to be captured.
269 // Stored the pointer - conservatively assume it may be captured.
270 if (Tracker->captured(U))
272 // Storing to the pointee does not cause the pointer to be captured.
279 // The original value is not captured via this if the new value isn't.
283 // is captured to avoid taking too much compile time.
303 if (Tracker->captured(U))
307 // Something else - be conservative and say it is captured.
308 if (Tracker->captured(U))