[PATCH] D117923: BuildLibCalls: add allocalign attributes for memalign and aligned_alloc

Augie Fackler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 8 11:59:43 PST 2022


durin42 added a comment.

In D117923#3301283 <https://reviews.llvm.org/D117923#3301283>, @jyknight wrote:

> In D117923#3301220 <https://reviews.llvm.org/D117923#3301220>, @nikic wrote:
>
>> Unlike C allocator functions, we do not annotate operator new in SLC. Operator new annotations are left to clang. I believe you should already find handling for aligned new there and just need to switch it to use the new attribute rather than emitting an alignment assumption.
>
> Except that they _are_ currently special-cased in LLVM, just hardcoded in MemoryBuiltins.cpp vs having attributes defined for the behaviors. It seemed simpler to keep the division of labor between LLVM/Clang, until everything can be moved over at once. But, I don't feel strongly about this -- if you feel the opposite is better, OK.

There's new patches in the stack now (annotated correctly in phabricator) that add the correct attribute-adding stuff to clang, and then removes the allocalign column from the table in MemoryBuiltins.cpp. PTAL?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117923



More information about the llvm-commits mailing list