[PATCH] D123083: Attributes: add a new `allocptr` attribute

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 00:49:41 PDT 2022


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LG



================
Comment at: llvm/include/llvm/IR/Attributes.td:54
 
+/// Parameter is the pointer to be maniuplated by the allocator function.
+def AllocatedPointer : EnumAttr<"allocptr", [ParamAttr]>;
----------------
manipulated


================
Comment at: llvm/lib/IR/Attributes.cpp:1807
+          .addAttribute(Attribute::ElementType)
+          // TODO(durin42): this might be safe to drop?
+          .addAttribute(Attribute::AllocatedPointer);
----------------
Possibly, but I think it's okay to keep it here -- being safe to drop is mainly important if the attribute can be inferred, while this one has to be placed by the frontend.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123083



More information about the llvm-commits mailing list