[llvm-dev] Confusions around nocapture and sret
Xun Li via llvm-dev
llvm-dev at lists.llvm.org
Fri Feb 19 11:18:40 PST 2021
In the language reference (https://llvm.org/docs/LangRef.html), in the
definition of nocapture, it says "This is not a valid attribute for
return values". However I have seen it often that nocapture comes
together with sret attribute:
https://github.com/llvm/llvm-project/search?q=noalias+nocapture+sret
A few questions:
1. Is the LangRef out-of-date for sret+nocapture?
2. Is an sret argument to a function guaranteed to be nocapture? (i.e.
a pointer cannot escape through a sret argument?)
3. What about sret+noalias? Is that guaranteed to be nocapture?
--
Xun
More information about the llvm-dev
mailing list