[clang] [llvm] [FunctionAttrs][Attributor] Update nofree inference (PR #196266)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Thu May 14 05:48:22 PDT 2026


================
@@ -297,12 +297,12 @@ define void @f2() #0 {
 
 ; TEST 12 NoFree argument - positive.
 define double @test12(ptr nocapture readonly %a) {
-; CHECK: Function Attrs: nofree nounwind
----------------
antoniofrighetto wrote:

I'm not immediately clear why the argument-level nofree is retained here, though the function attribute is not, and how the function could cause a free through synchronization. Is this desirable? I also wonder if we should orthogonally teach BuildLibCalls to annotate cos, sin, et alia with nosync.

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


More information about the llvm-commits mailing list