[all-commits] [llvm/llvm-project] a10a69: [SPIR-V] Add SPIR-V triple and clang target info.

Anastasia Stulova via All-commits all-commits at lists.llvm.org
Mon Nov 8 05:34:33 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a10a69fe9c74bef3630795d9f2f516d7b84e1cd3
      https://github.com/llvm/llvm-project/commit/a10a69fe9c74bef3630795d9f2f516d7b84e1cd3
  Author: Anastasia Stulova <anastasia.stulova at arm.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/lib/Basic/Targets.cpp
    M clang/lib/Basic/Targets/SPIR.cpp
    M clang/lib/Basic/Targets/SPIR.h
    M clang/lib/CodeGen/TargetInfo.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Frontend/InitPreprocessor.cpp
    M clang/lib/Headers/opencl-c-base.h
    M clang/lib/Headers/opencl-c.h
    A clang/test/CodeGenOpenCL/spirv_target.cl
    M clang/test/Headers/opencl-c-header.cl
    M clang/test/Preprocessor/predefined-macros.c
    M llvm/include/llvm/ADT/Triple.h
    M llvm/lib/Support/Triple.cpp
    M llvm/unittests/ADT/TripleTest.cpp

  Log Message:
  -----------
  [SPIR-V] Add SPIR-V triple and clang target info.

Add new triple and target info for ‘spirv32’ and ‘spirv64’ and,
thus, enabling clang (LLVM IR) code emission to SPIR-V target.

The target for SPIR-V is mostly reused from SPIR by derivation
from a common base class since IR output for SPIR-V is mostly
the same as SPIR. Some refactoring are made accordingly.

Added and updated tests for parts that are different between
SPIR and SPIR-V.

Patch by linjamaki (Henry Linjamäki)!

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




More information about the All-commits mailing list