[clang] [clang][SPIR-V] Set AS for the SPIR-V logical triple (PR #88939)

Alex Voicu via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 10:55:38 PDT 2024


AlexVlx wrote:

a) Thanks!; b) apologies for the noise; c) this was actually done on purpose, I actively eschewed changing Logical SPIRV because it wasn't actually clear to me if in the long run it'd have the same AS map / would use numerical 1 for globals. If Logical SPIRV is going to go with numerical 1 for globals, LGTM (perhaps it's worth reflecting that in [AutoUpgrade.cpp](https://github.com/llvm/llvm-project/blob/75054525ae58f26c86e418382164540760871186/llvm/lib/IR/AutoUpgrade.cpp#L5346) & associated tests, wherein the predicate guards autoupgrades from occuring on Logical SPIRV)! 

As a sidenote, as far as I can tell, this flared up because in LLVM's [SPIRV TargetMachine](https://github.com/llvm/llvm-project/blob/75054525ae58f26c86e418382164540760871186/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp#L56) there's no segregation between Logical & Physical SPIRV. Would it be worthwhile to add that?

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


More information about the cfe-commits mailing list