llvm-project
d9872ea9 - [CaptureTracking] Compute results with and without return capture (#195857)

Commit
74 days ago
[CaptureTracking] Compute results with and without return capture (#195857) Currently PointerMayBeCaptured/FindEarliestEscape accept a ReturnCaptures argument to determine whether returning the pointer should be considered a capture. If you want to do a capture check for both cases, you have to invoke the capture tracking API twice. This PR instead changes the low level APIs to return a pair of capture components, one where returns are considered non-capturing, and one where they are considered capturing. This is for use by https://github.com/llvm/llvm-project/pull/193939, where AA wants both our usual captures-before (ignoring returns) reasoning, and captures-anywhere (including returns). This will allow us to do this in one (cached) query.
Author
Parents
Loading