[PATCH] D100676: [nofree] Attempt to further refine concurrency/capture requirements

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 09:32:32 PDT 2021


nlopes added a comment.

I'm not a fan of this semantics either. nofree should mean nofree (transitively).
A nofree function shouldn't be able to pass a pointer to another thread and get it freed.

The condition should be: deref before call + nofree call => deref after call. Anything else is too complicated (and very surprising given the name "no free").
nosync should be used when inferring nofree instead.



================
Comment at: llvm/docs/LangRef.rst:1616
+       parameters), and
+    c) known to be dereferenceable prior to a call to a function with
+    are still known to be dereferenceable after the call.
----------------
this sentence wasn't finished.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100676/new/

https://reviews.llvm.org/D100676



More information about the llvm-commits mailing list