[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

Jon Chesterfield via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 23:07:51 PDT 2024


JonChesterfield wrote:

Probably want a longer prefix. _gpu or_llvm or similar.

If the shared header gets the declarations then people can include the intrin.h and look at it to see what functions they have available, without going and looking through all the implementations. That seems like a good thing. Can put descriptive comments in the main header then.

With a little care Fortran could do the compile header to bitcode thing. 

Otherwise all looks very familiar. We've written things like this repeatedly over the years, would be nice to stop doing that. Doesn't help with normalising IR as written though, would need the periodically suggested GPU IR intrinsics to do that, which presumably seems like too much work? Does have advantages like pattern matching on the intrinsics in instcombine though, and would make this header redundant.

https://github.com/llvm/llvm-project/pull/110179


More information about the cfe-commits mailing list