[SPIR-V](6/6) Add the module analysis pass and the simplest tests
authorIlia Diachkov <iliya.diyachkov@intel.com>
Thu, 14 Apr 2022 00:46:45 +0000 (03:46 +0300)
committerMichal Paszkowski <michal.paszkowski@outlook.com>
Tue, 19 Apr 2022 23:10:25 +0000 (01:10 +0200)
commit153dee34f16105dc0db6eb6d5bc617b4e5a31bc6
treec86d173f1daa3f1a325e9e8479f5388d12039de5
parenteab7d3639b3c6dc9dda9a0ab1643f0e45ad2d9d6
[SPIR-V](6/6) Add the module analysis pass and the simplest tests

This patch adds one SPIRV analysis pass and extends AsmPrinter. It is
essential for minimum SPIR-V output. Also it adds several simplest tests
to show that the target basically works.

Differential Revision: https://reviews.llvm.org/D116465

Authors: Aleksandr Bezzubikov, Lewis Crawford, Ilia Diachkov,
Michal Paszkowski, Andrey Tretyakov, Konrad Trifunovic

Co-authored-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Co-authored-by: Ilia Diachkov <iliya.diyachkov@intel.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
16 files changed:
llvm/lib/Target/SPIRV/CMakeLists.txt
llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVInstPrinter.cpp
llvm/lib/Target/SPIRV/SPIRV.h
llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
llvm/lib/Target/SPIRV/SPIRVMCInstLower.cpp
llvm/lib/Target/SPIRV/SPIRVMCInstLower.h
llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp [new file with mode: 0644]
llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h [new file with mode: 0644]
llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
llvm/test/CodeGen/SPIRV/function/identity-function.ll [new file with mode: 0644]
llvm/test/CodeGen/SPIRV/function/trivial-function-definition.ll [new file with mode: 0644]
llvm/test/CodeGen/SPIRV/function/trivial-function-with-attributes.ll [new file with mode: 0644]
llvm/test/CodeGen/SPIRV/function/trivial-function-with-call.ll [new file with mode: 0644]
llvm/test/CodeGen/SPIRV/lit.local.cfg [new file with mode: 0644]
llvm/test/CodeGen/SPIRV/metadata-opencl.ll [new file with mode: 0644]
llvm/test/CodeGen/SPIRV/transcoding/readonly.ll [new file with mode: 0644]