efriedma added a comment. > The main reason we couldn't remove the header file is because of the > short-forms/overloaded intrinsics
How are you planning to handle them with your current approach? Anyway, that isn't really relevant to the question of why we need to `#define svld1_u8(...) __builtin_sve_svld1_u8(__VA_ARGS__)`, as opposed to just making svld1_u8 an intrinsic. > 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. The current Builtins.def infrastructure isn't really designed around it, but it would be possible to add overloaded intrinsics. Currently, when a builtin name is looked up, we create one FunctionDecl. But we could change it to make/return a list of FunctionDecls, instead, and pass them to standard overload resolution. > I also wonder if this problem isn't better solved using pre-compiled modules > at some point? Sort of? I mean, yes, loading a precompiled module is somewhat cheaper than parsing C. But it still isn't free, it doesn't really change the fact that the indirection isn't doing anything useful, and we're still making preprocessing/diagnostics more complicated by using defines. 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