diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2015-12-02 17:00:42 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2015-12-02 17:00:42 +0000 |
commit | e3b5aeaf8325da211d0be7b3717dc7425dd5e259 (patch) | |
tree | f05569538df50145019f05cc7a3ac868191c8128 /llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | |
parent | 942003acc6f595fdc324c98812b802880aedb14d (diff) | |
download | llvm-e3b5aeaf8325da211d0be7b3717dc7425dd5e259.zip llvm-e3b5aeaf8325da211d0be7b3717dc7425dd5e259.tar.gz llvm-e3b5aeaf8325da211d0be7b3717dc7425dd5e259.tar.bz2 |
AMDGPU/SI: Don't emit group segment global variables
Summary: Only global or readonly segment variables should appear in object files.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15111
llvm-svn: 254519
Diffstat (limited to 'llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp index e70f79d..81ade51 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// #include "AMDGPUBaseInfo.h" +#include "AMDGPU.h" +#include "llvm/IR/GlobalValue.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCSectionELF.h" #include "llvm/MC/SubtargetFeature.h" @@ -66,5 +68,9 @@ MCSection *getHSATextSection(MCContext &Ctx) { ELF::SHF_AMDGPU_HSA_CODE); } +bool isGroupSegment(const GlobalValue *GV) { + return GV->getType()->getAddressSpace() == AMDGPUAS::LOCAL_ADDRESS; +} + } // End namespace AMDGPU } // End namespace llvm |