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
[SYCL] Add aspect names to sycl_used_aspects before cleaning up (#13486)
The `sycl_aspects` metadata kept track of the aspect names and their enum values as defined by [sycl/include/sycl/info/aspects.def](https://github.com/intel/llvm/blob/sycl/sycl/include/sycl/info/aspects.def).
This metadata was populated by the frontend by looking for the declaration of the SYCL aspects enum.
The `CleanupSYCLMetadata` pass then deletes this metadata after device compilation.
https://github.com/intel/llvm/blob/f6e73e8953e848ad87259798e9c861e9d44e93b0/clang/lib/CodeGen/BackendUtil.cpp#L1156-L1158
However, some processing in `sycl-post-link` that will be added in #12727 needs the
`sycl_aspects` metadata (which at that point, the metadata is already deleted by
`CleanupSYCLMetadata`).
To fix this, in this PR, before cleaning up the metadata in `CleanupSYCLMetadataPass`,
we update `sycl_used_aspects` metadata to include the aspect name.
Note that the aspect name might not exist, e.g. in the case of the negative-valued
"internal" aspects, in which case the value is passed along as normal.
0 commit comments