[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

Henry Linjamäki via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 2 03:21:12 PDT 2021


linjamaki created this revision.
Herald added subscribers: Naghasan, dexonsmith, wenlei, Anastasia, arphaman, hiraditya.
linjamaki requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

Add new architectures ‘spirv32’, ‘spirv64’ and ‘spirlogical’
in Triple, ported from LLVM SPIR-V Backend repository
(https://github.com/KhronosGroup/LLVM-SPIRV-Backend). Add basic and
code generation target info for ‘spirv32’ and ‘spirv64’ and, thus,
enabling clang (LLVM IR) code emission to SPIR-V target. The target
information for SPIR-V is mostly reused from the SPIR target info as
starter.

Enable testing for SPIR-V target in many existing code generation
related clang tests where the SPIR target is tested and added two new
tests. SYCL related tests were skipped - they are left for SYCL
developers to decide if they want to enable or switch to SPIR-V
target.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109144

Files:
  clang/include/clang/Basic/DiagnosticGroups.td
  clang/lib/Basic/Targets.cpp
  clang/lib/Basic/Targets/SPIR.cpp
  clang/lib/Basic/Targets/SPIR.h
  clang/lib/CodeGen/TargetInfo.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Frontend/InitPreprocessor.cpp
  clang/lib/Headers/opencl-c-base.h
  clang/lib/Headers/opencl-c.h
  clang/test/CodeGen/complex-math.c
  clang/test/CodeGen/ext-int-cc.c
  clang/test/CodeGen/spir-half-type.cpp
  clang/test/CodeGen/target-data.c
  clang/test/CodeGenCXX/builtin-calling-conv.cpp
  clang/test/CodeGenOpenCL/as_type.cl
  clang/test/CodeGenOpenCL/atomic-ops-libcall.cl
  clang/test/CodeGenOpenCL/blocks.cl
  clang/test/CodeGenOpenCL/cast_image.cl
  clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
  clang/test/CodeGenOpenCL/constant-addr-space-globals.cl
  clang/test/CodeGenOpenCL/enqueue-kernel-non-entry-block.cl
  clang/test/CodeGenOpenCL/fdeclare-opencl-builtins.cl
  clang/test/CodeGenOpenCL/fpmath.cl
  clang/test/CodeGenOpenCL/half.cl
  clang/test/CodeGenOpenCL/kernel-arg-info.cl
  clang/test/CodeGenOpenCL/opencl_types.cl
  clang/test/CodeGenOpenCL/overload.cl
  clang/test/CodeGenOpenCL/partial_initializer.cl
  clang/test/CodeGenOpenCL/preserve_vec3.cl
  clang/test/CodeGenOpenCL/printf.cl
  clang/test/CodeGenOpenCL/private-array-initialization.cl
  clang/test/CodeGenOpenCL/sampler.cl
  clang/test/CodeGenOpenCL/size_t.cl
  clang/test/CodeGenOpenCL/spir-calling-conv.cl
  clang/test/CodeGenOpenCL/spir-debug-info-pointer-address-space.cl
  clang/test/CodeGenOpenCL/spirv32_target.cl
  clang/test/CodeGenOpenCL/spirv64_target.cl
  clang/test/CodeGenOpenCL/to_addr_builtin.cl
  clang/test/CodeGenOpenCL/vectorLoadStore.cl
  clang/test/CodeGenOpenCL/vla.cl
  clang/test/CodeGenOpenCLCXX/address-space-castoperators.cpp
  clang/test/CodeGenOpenCLCXX/address-space-deduction.clcpp
  clang/test/CodeGenOpenCLCXX/address-space-deduction2.clcpp
  clang/test/CodeGenOpenCLCXX/addrspace-constructors.clcpp
  clang/test/CodeGenOpenCLCXX/addrspace-conversion.clcpp
  clang/test/CodeGenOpenCLCXX/addrspace-derived-base.clcpp
  clang/test/CodeGenOpenCLCXX/addrspace-new-delete.clcpp
  clang/test/CodeGenOpenCLCXX/addrspace-of-this.clcpp
  clang/test/CodeGenOpenCLCXX/addrspace-operators.clcpp
  clang/test/CodeGenOpenCLCXX/addrspace-references.clcpp
  clang/test/CodeGenOpenCLCXX/addrspace-with-class.clcpp
  clang/test/CodeGenOpenCLCXX/addrspace_cast.clcpp
  clang/test/CodeGenOpenCLCXX/atexit.clcpp
  clang/test/CodeGenOpenCLCXX/constexpr.clcpp
  clang/test/CodeGenOpenCLCXX/global_init.clcpp
  clang/test/CodeGenOpenCLCXX/local_addrspace_init.clcpp
  clang/test/CodeGenOpenCLCXX/method-overload-address-space.clcpp
  clang/test/CodeGenOpenCLCXX/reinterpret_cast.clcpp
  clang/test/CodeGenOpenCLCXX/template-address-spaces.clcpp
  clang/test/Driver/opencl.cl
  clang/test/Headers/opencl-builtins.cl
  clang/test/Headers/opencl-c-header.cl
  clang/test/Index/pipe-size.cl
  clang/test/Preprocessor/predefined-macros.c
  clang/test/Sema/Float16.c
  clang/test/SemaCXX/Float16.cpp
  llvm/include/llvm/ADT/Triple.h
  llvm/lib/Support/Triple.cpp
  llvm/unittests/ADT/TripleTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109144.370218.patch
Type: text/x-patch
Size: 65337 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210902/2bce4e9c/attachment-0001.bin>


More information about the cfe-commits mailing list