[PATCH] D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 25 02:40:41 PDT 2021
Anastasia added inline comments.
================
Comment at: clang/lib/Basic/Targets/SPIR.h:59
+ // translation). This mapping is enabled when the language mode is HIP.
+ 1, // cuda_device
+ // cuda_constant pointer can be casted to default/"flat" pointer, but in
----------------
I am slightly confused as in the LLVM project those address spaces are for SPIR not SPIR-V though. It is however used outside of LLVM project by some tools like SPIRV-LLVM Translator as a path to SPIR-V, but it has only been done as a workaround since we had no SPIR-V support in the LLVM project yet. And if we are adding it let's do it clean to avoid/resolve any confusion.
I think we need to keep both because some vendors do target/use SPIR but not SPIR-V.
So if you are interested in SPIR-V and not SPIR you should probably add a new target that will make things cleaner.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108621/new/
https://reviews.llvm.org/D108621
More information about the cfe-commits
mailing list