[PATCH] D123084: BuildLibCalls: infer allocptr attribute for free and realloc() family functions

Augie Fackler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 17:35:27 PDT 2022


durin42 added a comment.

In D123084#3475301 <https://reviews.llvm.org/D123084#3475301>, @nikic wrote:

> In D123084#3475085 <https://reviews.llvm.org/D123084#3475085>, @durin42 wrote:
>
>> In D123084#3473893 <https://reviews.llvm.org/D123084#3473893>, @nikic wrote:
>>
>>> Need to handle LibFunc___kmpc_free_shared as well?
>>
>> No, for two reasons:
>>
>> 1. The attributes can be specified directly on the declaration in `llvm/Frontend/OpenMP/OMPKinds.def` (see D119583 <https://reviews.llvm.org/D119583>)
>>
>> 2. `MemoryBuiltins.cpp` never had any logic about `__kmpc_free_shared`: I can't tell if this was a bug or intentional, but what we have today matches the behavior of MemoryBuiltins.cpp.
>
> The reason I asked is that this function is currently listed in https://github.com/llvm/llvm-project/blob/5ee0123642fee177258b0fd99f3fd659be68de60/llvm/lib/Analysis/MemoryBuiltins.cpp#L470. Is it non-functional for some reason?

Huh. I could have sworn that wasn't there, but I even edited it. Well, fixed by adding D124491 <https://reviews.llvm.org/D124491> :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123084



More information about the llvm-commits mailing list