[PATCH] D127812: [AArch64] Function multiversioning support added.

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 12:22:49 PDT 2022


aaron.ballman added a comment.

In D127812#3602645 <https://reviews.llvm.org/D127812#3602645>, @erichkeane wrote:

> In D127812#3601476 <https://reviews.llvm.org/D127812#3601476>, @danielkiss wrote:
>
>> Your understanding is correct. `target` attribute has two usage model. One is just redefine the to be used codegen options, this is used already widely for Arm and AArch64. The other use of the `target` attribute is the multi versioning and the rational for the `target_version` attribute is the easier distinction between the two usage mode, also not to break any code out there by changing the behaviour of an attribute.
>
> I don't think differentiating the uses here is a good idea.  I think it would have been a GREAT idea about 10 years ago, but that ship has already sailed once GCC started using it that way however.  We should be keeping the current behavior, otherwise we're going to have a horrible mix of target/target_version working inconsistently between platforms.

That largely is my concern as well. The existing behavior of `target` is just that -- the existing behavior. I think deviating from that existing behavior will be confusing in practice. Adding additional attributes doesn't improve that confusion because users then have to know to decide between two very similar attributes, which means they then need to educate themselves on the differences between them. If we're going to push them towards the documentation to correctly use the attribute anyway, that's basically the same situation they're in today with the confusing dual behavior of `target`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127812



More information about the llvm-commits mailing list