summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2015-06-11 15:34:59 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2015-06-11 15:34:59 +0000
commited64d62c70414db501f7bdda8dcf0b4fa0dd8bcc (patch)
tree919a068d98605c84fe33027bd6a662dc938760eb /llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
parentfd5286717c7be8a632f6ffc954eeda7dbc21d540 (diff)
downloadbcm5719-llvm-ed64d62c70414db501f7bdda8dcf0b4fa0dd8bcc.tar.gz
bcm5719-llvm-ed64d62c70414db501f7bdda8dcf0b4fa0dd8bcc.zip
Replace string GNU Triples with llvm::Triple in computeDataLayout(). NFC.
Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, jfb, rengolin Differential Revision: http://reviews.llvm.org/D10361 llvm-svn: 239538
Diffstat (limited to 'llvm/lib/Target/R600/AMDGPUTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/R600/AMDGPUTargetMachine.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp b/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
index 0e37127725c..bb5d9e99ff4 100644
--- a/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
@@ -51,11 +51,10 @@ static MachineSchedRegistry
SchedCustomRegistry("r600", "Run R600's custom scheduler",
createR600MachineScheduler);
-static std::string computeDataLayout(StringRef TT) {
- Triple Triple(TT);
+static std::string computeDataLayout(const Triple &TT) {
std::string Ret = "e-p:32:32";
- if (Triple.getArch() == Triple::amdgcn) {
+ if (TT.getArch() == Triple::amdgcn) {
// 32-bit private, local, and region pointers. 64-bit global and constant.
Ret += "-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-p24:64:64";
}
@@ -71,8 +70,8 @@ AMDGPUTargetMachine::AMDGPUTargetMachine(const Target &T, StringRef TT,
TargetOptions Options, Reloc::Model RM,
CodeModel::Model CM,
CodeGenOpt::Level OptLevel)
- : LLVMTargetMachine(T, computeDataLayout(TT), TT, CPU, FS, Options, RM, CM,
- OptLevel),
+ : LLVMTargetMachine(T, computeDataLayout(Triple(TT)), TT, CPU, FS, Options,
+ RM, CM, OptLevel),
TLOF(new TargetLoweringObjectFileELF()),
Subtarget(Triple(TT), CPU, FS, *this), IntrinsicInfo() {
setRequiresStructuredCFG(true);
OpenPOWER on IntegriCloud