[all-commits] [llvm/llvm-project] 02d5b1: [HIPSPV] Fix literals are mapped to Generic addres...
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Mon Feb 7 07:33:01 PST 2022
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2022-02-07 (Mon, 07 Feb 2022)
[HIPSPV] Fix literals are mapped to Generic address space
This issue is an oversight in D108621.
Literals in HIP are emitted as global constant variables with default
address space which maps to Generic address space for HIPSPV. In
SPIR-V such variables translate to OpVariable instructions with
Generic storage class which are not legal. Fix by mapping literals
to CrossWorkGroup address space.
The literals are not mapped to UniformConstant because the “flat”
pointers in HIP may reference them and “flat” pointers are modeled
as Generic pointers in SPIR-V. In SPIR-V/OpenCL UniformConstant
pointers may not be casted to Generic.
Patch by: Henry Linjamäki
Reviewed by: Yaxun Liu
Differential Revision: https://reviews.llvm.org/D118876
More information about the All-commits