[clang] [llvm] [OpenMP] Fix launch_bounds for OpenMP ompx_attribute (PR #195665)

Kevin Sala Penades via cfe-commits cfe-commits at lists.llvm.org
Thu May 7 19:46:24 PDT 2026


kevinsala wrote:

> Why don't we do that then? Pass nullptr if sm < 90 and avoid the IgnoreArch flag. Am I missing something?

Mainly two reasons:
- My understanding is that `launch_bounds` for `ompx_attribute` should work for non-nvptx targets as well. The arch checks in `CreateLaunchBoundsAttr` are only thought for nvptx. Targeting non-nvptx archs ends up in an unreachable.
- Even if we fix the problem above, why should we discard the max blocks information in the parsing stage? Sounds like this decision should be made later, in the codegen. Also, the max blocks information is used for other purposes other than `maxclusterrank` in the OpenMPIRBuilder.

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


More information about the cfe-commits mailing list