[llvm] [BasicAA] Treat returns_twice functions as clobbering unescaped objects (PR #117902)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 19 10:57:58 PDT 2025
antoniofrighetto wrote:
Oops, sorry, I wonder which file I was looking at.
> (We could remove callCapturesBefore while keeping its additional precision by adding a CaptureAnalysis using CapturesBefore, possibly in conjunction with support for "chained" capture analysis where we try EarliestEscapeAnalysis before falling back to CatpuresBeforeAnalysis.)
Right, this makes sense, thanks for direction. With chained capture analysis, I assume we may want a ChainedCaptureAnalysis instance, to be passed to BatchAA, which is delegated to own the two EEA and CBA objects. Also, IIUC, we would not be interested in the mod/ref refinement done per-argument in callCapturesBefore() anymore – yet, if CBA is passed with OrAt, we should still be checking for possible pointer escaping at call-site level via return value.
https://github.com/llvm/llvm-project/pull/117902
More information about the llvm-commits
mailing list