[PATCH] D152914: [Draft] Make __builtin_cpu builtins target-independent

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 07:11:55 PDT 2023


nemanjai added a comment.

In D152914#4428692 <https://reviews.llvm.org/D152914#4428692>, @ilinpv wrote:

> Thank you for the patch, it comes in the right time - we are also working on AArch64 __builtin_cpu_supports, and I was thinking how to make it more general.
> I uploaded our RFC version for review https://reviews.llvm.org/D153153
>
>
> It would be great to have in __builtin_cpu_supports argument string of plus-separated features. Just SemaBuiltinCpuSupports need to handle this.

Hi Pavel,
I took a quick look at your patch. I think it would be preferable to make the builtins target-independent rather than implementing the builtin by the same name for multiple targets. Although I think it is very useful to support a plus-separated list for `__builtin_cpu_supports()`, I think that's probably something for a subsequent patch. We would need to figure out code generation for that - perhaps that part will have to be completely target specific.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152914



More information about the llvm-commits mailing list