[PATCH] D123086: BuildLibCalls: add alloc-family attribute to many allocator functions

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 01:08:39 PDT 2022


nikic added a reviewer: nikic.
nikic added inline comments.


================
Comment at: llvm/docs/LangRef.rst:1570
+    allocator function, that is "malloc" for malloc/calloc/realloc/free, 
+    "_Znwm" for ::operator::new and ::operator::delete, and
+    "_ZnwmSt11align_val_t" for aligned ::operator::new and ::operator::delete.
----------------
Wrap `::operator::new` etc in double backticks?


================
Comment at: llvm/docs/LangRef.rst:1571
+    "_Znwm" for ::operator::new and ::operator::delete, and
+    "_ZnwmSt11align_val_t" for aligned ::operator::new and ::operator::delete.
 ``allocsize(<EltSizeParam>[, <NumEltsParam>])``
----------------
This doesn't specify what the semantics of the attribute are. I'd expect something along the lines of "only malloc/free pairs of the same allocator family can be optimized".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123086



More information about the llvm-commits mailing list