summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2016-04-06 19:40:20 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2016-04-06 19:40:20 +0000
commitdf3a20cd8068c732a0b26bdf8c1857c7d97104b4 (patch)
tree11974d0749ffa9d399f72a66fd5787d6ec248103 /llvm/lib/AsmParser/LLParser.cpp
parent1b6188d2f865366ef94d65b65596f47c9196c20c (diff)
downloadbcm5719-llvm-df3a20cd8068c732a0b26bdf8c1857c7d97104b4.tar.gz
bcm5719-llvm-df3a20cd8068c732a0b26bdf8c1857c7d97104b4.zip
AMDGPU: Add a shader calling convention
This makes it possible to distinguish between mesa shaders and other kernels even in the presence of compute shaders. Patch By: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Differential Revision: http://reviews.llvm.org/D18559 llvm-svn: 265589
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 369dbb38f7c..c8543206e21 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -1616,6 +1616,12 @@ bool LLParser::ParseOptionalDLLStorageClass(unsigned &Res) {
/// ::= 'hhvmcc'
/// ::= 'hhvm_ccc'
/// ::= 'cxx_fast_tlscc'
+/// ::= 'amdgpu_vs'
+/// ::= 'amdgpu_tcs'
+/// ::= 'amdgpu_tes'
+/// ::= 'amdgpu_gs'
+/// ::= 'amdgpu_ps'
+/// ::= 'amdgpu_cs'
/// ::= 'cc' UINT
///
bool LLParser::ParseOptionalCallingConv(unsigned &CC) {
@@ -1651,6 +1657,10 @@ bool LLParser::ParseOptionalCallingConv(unsigned &CC) {
case lltok::kw_hhvmcc: CC = CallingConv::HHVM; break;
case lltok::kw_hhvm_ccc: CC = CallingConv::HHVM_C; break;
case lltok::kw_cxx_fast_tlscc: CC = CallingConv::CXX_FAST_TLS; break;
+ case lltok::kw_amdgpu_vs: CC = CallingConv::AMDGPU_VS; break;
+ case lltok::kw_amdgpu_gs: CC = CallingConv::AMDGPU_GS; break;
+ case lltok::kw_amdgpu_ps: CC = CallingConv::AMDGPU_PS; break;
+ case lltok::kw_amdgpu_cs: CC = CallingConv::AMDGPU_CS; break;
case lltok::kw_cc: {
Lex.Lex();
return ParseUInt32(CC);
OpenPOWER on IntegriCloud