In some cases, we want to provide the alias name for the clang builtins.
For example, the arguments must be constant integers for some RISC-V builtins.
If we use wrapper functions, we could not constrain the arguments be constant
integer. This attribute is used to achieve the purpose.
Besides this, use clang_builtin_alias is more efficient than using
wrapper functions. We use this attribute to deal with test time issue
reported in https://bugs.llvm.org/show_bug.cgi?id=49962.
In our downstream testing, it could decrease the testing time from 6.3
seconds to 3.7 seconds for vloxei.c test.
Hrm, this is interesting -- this will allow the user to write __attribute__((clang_builtin_alias(...))) which is nice, but it also allows [[clang::clang_builtin_alias(...)]] which duplicates the clang in that spelling and feels a bit awkward.
While we could steal __attribute__((builtin_alias)) as it seems like no one is using it, that feels a bit heavy-handed as builtins may not be portable across compilers.
Based on that, I sort of think we should go with:
What do you think?