[AMDGPU] Add amdgpu_cs_chain[_preserve] CCs to IR & verifier
authorDiana Picus <Diana-Magda.Picus@amd.com>
Wed, 7 Jun 2023 08:18:31 +0000 (10:18 +0200)
committerDiana Picus <Diana-Magda.Picus@amd.com>
Thu, 22 Jun 2023 08:02:45 +0000 (10:02 +0200)
commit29dcc4c143a7fbe9bb8d4d6e60745b33760e93fd
tree07c9f55af75a3e15e77e63e59829cc19a30041d7
parent7c2604ca196c3ba0247509c0fde350e23f0cccb0
[AMDGPU] Add amdgpu_cs_chain[_preserve] CCs to IR & verifier

Add the amdgpu_cs_chain and amdgpu_cs_chain_preserve keywords to
LLVM IR and make sure we can parse and print them. Also make sure we
perform some basic checks in the IR verifier - similar to what we check
for many of the other AMDGPU calling conventions, plus the additional
restriction that we can't have direct calls to functions with these
calling conventions.

Differential Revision: https://reviews.llvm.org/D151994
llvm/include/llvm/AsmParser/LLToken.h
llvm/include/llvm/IR/CallingConv.h
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/Verifier.cpp
llvm/test/Assembler/amdgpu-cs-chain-cc.ll [new file with mode: 0644]
llvm/test/Verifier/amdgpu-cc.ll