llvm-project/clang/lib
Yaxun (Sam) Liu 171da443d5 [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
2022-02-05 17:26:52 -05:00
..
APINotes [clang][APINotes] Fix -Wunused-function warning (NFC) 2021-04-01 09:52:43 +08:00
ARCMigrate [clang] Use true/false instead of 1/0 (NFC) 2022-01-09 00:19:47 -08:00
AST [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"". 2022-02-04 20:17:34 +01:00
ASTMatchers Add `isConstinit` matcher 2022-01-24 08:35:42 -05:00
Analysis [clang][dataflow] Enable comparison of distinct values in Environment 2022-02-01 15:25:59 +00:00
Basic [clang][macho] add clang frontend support for emitting macho files with two build version load commands 2022-02-02 08:30:39 -08:00
CodeGen [HIPSPV] Fix literals are mapped to Generic address space 2022-02-05 17:26:52 -05:00
CrossTU Revert "[analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file" 2021-12-16 20:46:51 -05:00
DirectoryWatcher [clang] [DirectoryWatcher] Remove leading \\?\ from GetFinalPathNameByHandleW 2021-11-08 22:21:30 +02:00
Driver [Driver] Default to -fno-math-errno for musl 2022-02-04 19:20:30 -08:00
Edit [clang] Use true/false instead of 1/0 (NFC) 2022-01-09 00:19:47 -08:00
Format [clang-format][NFC] Fix a bug in setting type FunctionLBrace 2022-02-04 11:36:30 -08:00
Frontend [OpenMP] Completely remove old device runtime 2022-02-04 15:31:33 -05:00
FrontendTool [clang] Add an extract-api driver option 2022-01-26 11:31:12 -08:00
Headers [PowerPC] Fix SSE translation on FreeBSD 2022-02-06 01:20:31 +08:00
Index [clang] Visit enum base specifiers in libIndex 2021-10-25 13:16:14 +02:00
IndexSerialization
Interpreter [clang] Remove unused forward declarations (NFC) 2022-01-08 11:56:40 -08:00
Lex [HeaderSearch] Track framework name in LookupFile 2022-02-04 13:32:39 -05:00
Parse [clang-format] Format ParseOpenMP.cpp changes 2022-01-27 09:00:34 +00:00
Rewrite Add assert on End iteration distance to Rewriter::getRewrittenText. 2022-01-25 17:26:13 +00:00
Sema [clang] added allocsize attribute to allocation functions 2022-02-05 14:26:35 +01:00
Serialization [NFC] [AST] Move isSameEntity into ASTContext 2022-01-27 10:30:50 +08:00
StaticAnalyzer [analyzer] Add support for __attribute__((returns_nonnull)). 2022-02-02 11:46:52 -08:00
Testing
Tooling [syntax][pseudo] Introduce the C++ spec grammar. 2022-02-04 11:58:50 +01:00
CMakeLists.txt [clang-repl] Recommit "Land initial infrastructure for incremental parsing" 2021-05-13 06:30:29 +00:00