[AMDGPU] Set the default globals address space to 1
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 22 Jul 2020 13:41:06 +0000 (14:41 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Fri, 20 Nov 2020 15:46:53 +0000 (15:46 +0000)
commit51e09e1d5aa43296cf8baf26a74793fd86b0b0d2
tree7967ab4bbab619a28404b8e74298956de51e3510
parent3bc4157556b01e10288df120dd068e093ae20901
[AMDGPU] Set the default globals address space to 1

This will ensure that passes that add new global variables will create them
in address space 1 once the passes have been updated to no longer default
to the implicit address space zero.
This also changes AutoUpgrade.cpp to add -G1 to the DataLayout if it wasn't
already to present to ensure bitcode backwards compatibility.

Reviewed by: arsenm

Differential Revision: https://reviews.llvm.org/D84345
clang/lib/Basic/Targets/AMDGPU.cpp
clang/lib/CodeGen/CGClass.cpp
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/lib/CodeGen/CGVTT.cpp
clang/lib/CodeGen/ItaniumCXXABI.cpp
clang/test/CodeGen/target-data.c
clang/test/CodeGenOpenCL/amdgpu-env-amdgcn.cl
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/lib/IR/AutoUpgrade.cpp
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/unittests/Bitcode/DataLayoutUpgradeTest.cpp