[PATCH] D123088: attributes: introduce allockind attr for describing allocator fn behavior
Augie Fackler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 08:49:52 PDT 2022
durin42 marked 3 inline comments as done.
durin42 added inline comments.
================
Comment at: llvm/docs/LangRef.rst:1601
+ describe more details of how the function behaves. The remaining options
+ are ignored for "free"-type functions.
``allocsize(<EltSizeParam>[, <NumEltsParam>])``
----------------
nikic wrote:
> Would it be preferable to forbid them (in the IR verifier) instead?
I guess. I've talked myself out of that a few times, because I could envision an allocator where free() needs the alignment passed in for some reason and then it might be nice to mark it as allocalign? I dunno.
I've added the validation now, and tweaked the langref. I guess we can always relax it...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123088/new/
https://reviews.llvm.org/D123088
More information about the llvm-commits
mailing list