llvm-project
26417890 - [SPIRV] Remove redundant bitcasts for OpLifetimeStart/Stop. (#230623)

Commit
2 days ago
[SPIRV] Remove redundant bitcasts for OpLifetimeStart/Stop. (#230623) These bitcasts were introduced at a time when LLVM lifetime intrinsics allowed partial coverage of objects whose lifetimes were being annotated. Now that LLVM `lifetime.start`/`lifetime.stop` annotations only apply to `alloca`s and do not take in the size argument, it's easier to follow the SPIR-V spec by emitting `Size = 0` directly on the `OpVariable` instead. As per SPIR-V spec, void pointers must still be annotated with their size. This is similar to the changes at https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/3278 and is meant to reduce the output and match the SPIR-V - LLVM translator implementation.
Author
Parents
Loading