[llvm] [BasicAA] Treat returns_twice functions as clobbering unescaped objects (PR #117902)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 6 07:39:58 PDT 2025


antoniofrighetto wrote:

@nikic Do you believe we should also be checking for returns_twice in callCapturesBefore(), along the following lines?

https://github.com/llvm/llvm-project/blob/f9f62ef4ae555a86878411e696b8b747851fc337/llvm/lib/Analysis/AliasAnalysis.cpp#L620-L626

AFAICT, if we are given a non-escaping memory location and the given call-site is returns_twice, we should continue conservatively say the call may clobber this location.

https://github.com/llvm/llvm-project/pull/117902


More information about the llvm-commits mailing list