[PATCH] D31211: [AMDGPU] Add target triple environment amdgiz and amdgizcl
Yaxun Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 14:26:43 PDT 2017
yaxunl updated this revision to Diff 92710.
yaxunl retitled this revision from "[AMDGPU] Add target triple environment amdnas and amdnascl" to "[AMDGPU] Add target triple environment amdgiz and amdgizcl".
yaxunl edited the summary of this revision.
yaxunl added a comment.
Rename the triple environment.
https://reviews.llvm.org/D31211
Files:
include/llvm/ADT/Triple.h
lib/Support/Triple.cpp
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
test/CodeGen/AMDGPU/env-amdgiz.ll
test/CodeGen/AMDGPU/env-amdgizcl.ll
Index: test/CodeGen/AMDGPU/env-amdgizcl.ll
===================================================================
--- /dev/null
+++ test/CodeGen/AMDGPU/env-amdgizcl.ll
@@ -0,0 +1,11 @@
+; RUN: llc -march=amdgcn -mtriple=amdgcn-amd-amdhsa-amdgizcl -verify-machineinstrs < %s
+; Just check the target feature and data layout is accepted without error.
+
+target datalayout = "e-p:64:64-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
+target triple = "amdgcn-amd-amdhsa-amdgizcl"
+
+define void @foo() {
+entry:
+ ret void
+}
+
Index: test/CodeGen/AMDGPU/env-amdgiz.ll
===================================================================
--- /dev/null
+++ test/CodeGen/AMDGPU/env-amdgiz.ll
@@ -0,0 +1,11 @@
+; RUN: llc -march=amdgcn -mtriple=amdgcn-amd-amdhsa-amdgiz -verify-machineinstrs < %s
+; Just check the target feature and data layout is accepted without error.
+
+target datalayout = "e-p:64:64-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
+target triple = "amdgcn-amd-amdhsa-amdgiz"
+
+define void @foo() {
+entry:
+ ret void
+}
+
Index: lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -177,9 +177,14 @@
// 32-bit private, local, and region pointers. 64-bit global, constant and
// flat.
- return "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32"
+ if (TT.getEnvironment() == Triple::AMDGIZ ||
+ TT.getEnvironment() == Triple::AMDGIZCL)
+ return "e-p:64:64-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32"
"-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128"
"-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64";
+ return "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32"
+ "-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128"
+ "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64";
}
LLVM_READNONE
Index: lib/Support/Triple.cpp
===================================================================
--- lib/Support/Triple.cpp
+++ lib/Support/Triple.cpp
@@ -224,6 +224,8 @@
case Itanium: return "itanium";
case Cygnus: return "cygnus";
case AMDOpenCL: return "amdopencl";
+ case AMDGIZ: return "amdgiz";
+ case AMDGIZCL: return "amdgizcl";
case CoreCLR: return "coreclr";
case OpenCL: return "opencl";
}
@@ -500,6 +502,8 @@
.StartsWith("itanium", Triple::Itanium)
.StartsWith("cygnus", Triple::Cygnus)
.StartsWith("amdopencl", Triple::AMDOpenCL)
+ .StartsWith("amdgiz", Triple::AMDGIZ)
+ .StartsWith("amdgizcl", Triple::AMDGIZCL)
.StartsWith("coreclr", Triple::CoreCLR)
.StartsWith("opencl", Triple::OpenCL)
.Default(Triple::UnknownEnvironment);
Index: include/llvm/ADT/Triple.h
===================================================================
--- include/llvm/ADT/Triple.h
+++ include/llvm/ADT/Triple.h
@@ -199,7 +199,9 @@
AMDOpenCL,
CoreCLR,
OpenCL,
- LastEnvironmentType = OpenCL
+ AMDGIZ,
+ AMDGIZCL,
+ LastEnvironmentType = AMDGIZCL,
};
enum ObjectFormatType {
UnknownObjectFormat,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31211.92710.patch
Type: text/x-patch
Size: 3303 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170322/1398e134/attachment.bin>
More information about the llvm-commits
mailing list