aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2015-12-02 17:00:42 +0000
committerTom Stellard <thomas.stellard@amd.com>2015-12-02 17:00:42 +0000
commite3b5aeaf8325da211d0be7b3717dc7425dd5e259 (patch)
treef05569538df50145019f05cc7a3ac868191c8128 /llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
parent942003acc6f595fdc324c98812b802880aedb14d (diff)
downloadllvm-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.cpp6
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