sdesmalen added a comment.

In D75298#1898770 <https://reviews.llvm.org/D75298#1898770>, @efriedma wrote:

> Can we avoid a gigantic, expensive to parse arm_sve.h somehow?  Given that 
> the compiler has to know the signatures for all these buitins anyway, can we 
> just make including arm_sve.h set some flag in the compiler to make it 
> recognize all the SVE intrinsics?  This is different from the way we handle 
> intrinsics on other targets, but SVE seems like a good opportunity to try a 
> new approach.


We actually tried this and already simplified the header file as much as 
possible. The header file now only contains preprocessor macros and function 
declarations, but no definitions, so should be relatively easy to parse. All 
code-gen itself is handled in CGBuiltin.
The main reason we couldn't remove the header file is because of the 
short-forms/overloaded intrinsics. I wouldn't know of a way to create 
overloaded intrinsics without having to manually do the usual arithmetic 
conversions similar to how this is currently done for some overloaded builtins 
like `SemaBuiltinAtomicOverloaded` in SemaChecking.cpp.

I also wonder if this problem isn't better solved using pre-compiled modules at 
some point?

> Please update the documentation comment at the top of Builtins.def .

Good spot, fixed it!


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

https://reviews.llvm.org/D75298



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to