On 15/01/2025 13:54, Kyrylo Tkachov via Gcc-help wrote:
The idea is that rather than implementing every ACLE intrinsic as a wrapper around an builtin, annotated with attributes like always_inline etc the compiler injects
the necessary intrinsic definitions directly into the language when it encounters this aarch64-specific pragma.
This has a number of advantages, among others:
* It avoids having to parse a large regular .h file during compilation
* It allows the compiler to handle some of the more elaborate features of SVE intrinsics such as overloading and type deduction during name resolution.
* It allows for more powerful custom validation of intrinsic arguments (like enforcing strict compile-time literal arguments for vector lanes) and more helpful error message
There are another couple of advantages as well:
- It allows the header file to work properly when function
multi-versioning is used (or in other cases where subsequent functions
are compiled with non-standard headers).
- It solves the problem that running the preprocessor as a separate step
(rather than when directly compiling the code) could produce different
(often incorrect) results.
Finally, for developers, it can also make bug reporting more straight
forward (see my second point).
R.