[PATCH] D75298: [Clang][SVE] Parse builtin type string for scalable vectors

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 3 17:17:33 PST 2020


efriedma added a comment.

> This is because many of the builtins are protected by an architecture guard like `#ifdef __ARM_FEATURE_SVE` or `#ifdef __ARM_FEATURE_SVE2`.

I think TARGET_HEADER_BUILTIN has support for requiring target features.  Granted, we don't use it much at the moment, so there might be some non-obvious issue with this.

> Do you happen to know which method in Sema does this? I had a look before, but couldn't find where we could do something like this.

See Sema::LazilyCreateBuiltin, and its caller Sema::LookupBuiltin.

> The reason for using #defines for the non-overloaded intrinsics was mainly performance, the preprocessor was much faster than having to parse all declarations, with the only downside being the redirection in the diagnostics.

Oh, that makes sense.


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

https://reviews.llvm.org/D75298





More information about the cfe-commits mailing list