[llvm] [LangRef] Specify that dereferenceable implies a spurious read (PR #218413)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 03:56:15 PDT 2026


nikic wrote:

> > "nofree"/"nofreeobj" is used to infer that a pointer which was dereferenceable on entry remains dereferenceable throughout the function. That doesn't work if noalias is involved: a pointer can become non-dereferenceable, even if it's not actually freed in the conventional sense.
> 
> What do you have in mind here? `noalias` parameter should be fine as they lose their effect upon return. Are you thinking of noalias metadata within a function?

I believe this is referring to the "nofree pointer escapes to another thread and is used by a noalias argument there" case.

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


More information about the llvm-commits mailing list