You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While arm_neon.td does provide a complete description of everything necessary to generate something like arm_neon.h, each individual intrinsic is implemented in terms of clang builtins, and these don't necessarily directly correspond to individual LLVM IR operations. There's still lots of special-case hand-written C++ that turns clang builtins into IR sequences: https://github.com/dotnet/llvm-project/blob/release/9.x/clang/lib/CodeGen/CGBuiltin.cpp#L6906-L9277
Complete auto-generation would require transliterating these exceptions to some sort of "meta" IR construction DSL. It seems to me that it might be better to scrape each header for prototypes and generate a large file to be fed to clang -O2 -g0 -emit-llvm and then postprocess the resulting bitcode.
For now, I think I'll auto-generate the lower-effort stuff and hand-write the rest.
See https://github.com/dotnet/llvm-project/blob/release/9.x/clang/include/clang/Basic/arm_neon.td and https://github.com/dotnet/llvm-project/blob/release/9.x/clang/utils/TableGen/NeonEmitter.cpp.
The text was updated successfully, but these errors were encountered: