diff options
author | Andrew Stubbs <ams@codesourcery.com> | 2021-11-16 10:32:35 +0000 |
---|---|---|
committer | Andrew Stubbs <ams@codesourcery.com> | 2021-12-10 10:45:09 +0000 |
commit | 4a87a8e4b13e979e7c8a626a8f4082715a48e21e (patch) | |
tree | 2f91529327ffcb7d066bcef4e4da203af311d13f /include | |
parent | a5f65cf7ad640ae398eba7a45c712322ce841809 (diff) | |
download | gcc-4a87a8e4b13e979e7c8a626a8f4082715a48e21e.zip gcc-4a87a8e4b13e979e7c8a626a8f4082715a48e21e.tar.gz gcc-4a87a8e4b13e979e7c8a626a8f4082715a48e21e.tar.bz2 |
amdgcn: Change offload variable table discovery
Up to now the libgomp GCN plugin has been finding the offload variables
by using a symbol lookup, but the AMD runtime requires that the symbols are
global for that to work. This was ensured by mkoffload as a post-procssing
step, but the LLVM 13 assembler no longer accepts this in the case where the
variable was previously declared differently.
This patch switches to locating the symbols directly from the
offload_var_table, which means that only one symbol needs to be forced
global.
This changes breaks the libgomp image compatibility so GOMP_VERSION_GCN has
also been bumped.
gcc/ChangeLog:
* config/gcn/mkoffload.c (process_asm): Process the variable table
completely differently.
(process_obj): Encode the varaible data differently.
include/ChangeLog:
* gomp-constants.h (GOMP_VERSION_GCN): Bump.
libgomp/ChangeLog:
* plugin/plugin-gcn.c (struct gcn_image_desc): Remove global_variables.
(GOMP_OFFLOAD_load_image): Locate the offload variables via the
table, not individual symbols.
Diffstat (limited to 'include')
-rw-r--r-- | include/gomp-constants.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/gomp-constants.h b/include/gomp-constants.h index 9e7db69..2cf0919 100644 --- a/include/gomp-constants.h +++ b/include/gomp-constants.h @@ -274,7 +274,7 @@ enum gomp_map_kind #define GOMP_VERSION 1 #define GOMP_VERSION_NVIDIA_PTX 1 #define GOMP_VERSION_INTEL_MIC 0 -#define GOMP_VERSION_GCN 1 +#define GOMP_VERSION_GCN 2 #define GOMP_VERSION_PACK(LIB, DEV) (((LIB) << 16) | (DEV)) #define GOMP_VERSION_LIB(PACK) (((PACK) >> 16) & 0xffff) |