[PATCH] D101701: [nofree] Refine concurrency requirements

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 7 08:36:45 PDT 2021


jdoerfert added a comment.

I'm late for the party, apologies.

Let me put down some thoughts:

1. What is the motivation here? I mean, which functions, except very few intrinsic, would be "strong" `nofree` but not `nosync`?
2. Doesn't this just mean we would check for `nosync` in order to derive `nofree`? What would be different?
3. Have you considered the pointer `nofree` and if it does not suffices for your use case:

  %ptr = not_captured i8*
  call @completely_unknown(i8* nofree nocapture)  ; <-- doesn't free %ptr even though it could free other stuff.



================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:1457
+    if (!A.checkForAllCallLikeInstructions(CheckForNoFree, *this) ||
+        !A.checkForAllReadWriteInstructions(CheckForNoRemoteFree, *this))
       return indicatePessimisticFixpoint();
----------------
You would ask `AANoSync` for the status on all those instructions, and that is the crucial point why I don't even see the benefit here. See main comment.


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