We already add AMD GPU annotations, the NVIDIA ones are just a little
more convoluted to add/update but otherwise the same.
We see again that the interplay of ompx_attribute and deduced value
needs to be improved, see the TODO.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'm assuming merging these attributes is more complicated as we have code in clang and LLVM that handle it separately? It's unfortunate that the Nvidia backend uses module metadata for this.
Yes and no. That complication exists for AMD as well and causes the todo in https://reviews.llvm.org/D158382. The solution to both problems is somewhat clear and somewhat murky. If we would do the clang handling first, we could remember the upper bounds and do the llvm handling after. Right now it is the other way around and the clang handling would need to be 1) made aware of existing upper bounds, and 2) made aware of existing annotations (NVIDIA only).
I'm thinking about how to solve this best. I believe for now this is not a big problem and the progress is worth it.