[PATCH] D101701: [RFC][nofree] Refine concurrency requirements

Stefan Stipanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 5 00:33:47 PDT 2021


sstefan1 added a comment.

In D101701#2735040 <https://reviews.llvm.org/D101701#2735040>, @reames wrote:

> I am neutral on the proposed change, but I would very much like to hear from @sstefan1, the original author of the nofree attribute.

I'm not actually the one who introduced it, but I think this sounds good. Attributor changes look good as well.



================
Comment at: llvm/docs/LangRef.rst:1619
 
     A ``nofree`` function is explicitly allowed to free memory which it
+    allocated.  As a result, perhaps surprisingly, a ``nofree`` function can
----------------
If I'm not wrong, this part hasn't been implemented yet? We won't infer `nofree` for a function that frees memory it allocated.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:1413
 
+  bool isReleaseAtomic(Instruction *I) {
+    if (!I->isAtomic())
----------------
Maybe make this static, like `AANoSyncImpl` does?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101701



More information about the llvm-commits mailing list