[clang] [Clang] Permit noescape on non-pointer types (PR #117344)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 3 06:36:20 PST 2024


erichkeane wrote:

> > I'd like to see a test that validates this changes with these types.
> 
> Sorry, I missed the part in CodeGen. So `noescape` is used to emit the `nocapute` parameter attribute in the LLVM IR. This parameter attribute is only valid for pointers and we currently do not seem to have a way in the LLVM IR to express nocapture for a field of a struct.
> 
> I changed the PR to make sure we do not emit `nocapture` in the IR where we should not and added some tests validating this.

Thanks! I guess this leaves me confused as to what the PURPOSE of this patch is if it doesn't allow the attribute to get to IR?  What is it that consumes this?  Do we have some sort of analysis tool that works on it?  If so, can we write a test that shows that behavior?

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


More information about the cfe-commits mailing list