[PATCH] D71521: Support for library function aligned_alloc

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 16:53:56 PST 2019


bondhugula added a comment.

> I don't know what difference this really makes. FWIW, We recognize memalign/valloc already in some places but we don't treat them as allocators for some reason.



> Sure. Getting all of them, especially if there is almost no extra cost, is still worth it. Not everybody writes C11 and/or updated their code.

Reg. valloc, pvalloc: since these don't take an alignment argument, they are actually like malloc (as opposed to aligned_alloc) in nearly all cases except the heap to stack conversion. But this unfortunately means that they'll need another isPVallocLike/isVallocLike. So, modeling them is as much additional cost/code as this changelist I believe. Should be done separately if it's worth it.


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

https://reviews.llvm.org/D71521





More information about the llvm-commits mailing list