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

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 12:40:18 PDT 2022


dantrushin added a comment.

In D125690#3516881 <https://reviews.llvm.org/D125690#3516881>, @nikic wrote:

> 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//.

Copying arrays of pointers in environments with moving garbage collector is different from copying of 'primitive' types of the same types.
Well, I understand that upstream may not take it as a 'justification'.

Anyway, I think that `discouraged` part is worth more explicit mentioning in opaque pointers guide - thhat was not clear to me while reading it.


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