[clang] [lldb] [Clang][SPIRV] Add __spirv_event_t builtin type (PR #207077)

Vyacheslav Levytskyy via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 29 06:00:15 PDT 2026


VyacheslavLevytskyy wrote:

LGTM, just some observations.

There are a few __spirv_event_t cases that would be nice to cover in the tests.

1) A test for a non-default address space.

For example,
`__spirv_event_t __attribute__((address_space(7))) e;`
lowers to
`@e = addrspace(7) global target("spirv.Event") zeroinitializer, align 8`
but no test currently exercises __attribute__((address_space(...))) on __spirv_event_t.

2) Given that address-space-qualified declarations are accepted, it would also be good to cover the associated sizeof/alignof behavior.

Size and alignment are computed using the default address-space pointer properties, independent of the declaration's address space. That's fine today because the SPIR-V target uses a single pointer width/alignment for all address spaces.
So, probably it would be nice to cover sizeof/alignof for an address-space-qualified __spirv_event_t.

3) Arrays of __spirv_event_t (__spirv_event_t list[N]) also seem worth covering, as a common way of representing event lists.

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


More information about the cfe-commits mailing list