[PATCH] D125690: [MemIntrinsics] Add an API to get elementtype attribute value. NFC.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 12:26:29 PDT 2022


nikic added a comment.

In D125690#3516864 <https://reviews.llvm.org/D125690#3516864>, @dantrushin wrote:

> In D125690#3516808 <https://reviews.llvm.org/D125690#3516808>, @nikic wrote:
>
>> We generally do not add in-tree methods if they have no in-tree users. I'm also rather skeptical about what you're trying to do here -- this would need some more detailed explanation of the use case.
>
> Intrinsics allow to specify element type of its pointer arguments via `elementtype` attribute.
> Atomic memory intrinsics hide this possibility behind quite complicated hierarchy. This patch makes it accessible for any interested party. I don't see what's wrong with that?

Use of `elementtype` is discouraged -- it should only be used if there is no other solution. I don't want to add APIs legitimizing its use in this context without justification. For example, consider the llvm.memcpy.element.unordered.atomic intrinsics which specify an element //size// as an additional argument, rather than a precise element //type//.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125690



More information about the llvm-commits mailing list