[all-commits] [llvm/llvm-project] cd19f3: [Driver][clang-linker-wrapper] Add initial support...

Nick Sarnie via All-commits all-commits at lists.llvm.org
Thu Jan 2 12:18:54 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd19f3f787b01481fd687834457686e16fffdbe6
      https://github.com/llvm/llvm-project/commit/cd19f3f787b01481fd687834457686e16fffdbe6
  Author: Nick Sarnie <nick.sarnie at intel.com>
  Date:   2025-01-02 (Thu, 02 Jan 2025)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/CMakeLists.txt
    M clang/lib/Driver/Driver.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/lib/Driver/ToolChains/SPIRV.h
    A clang/lib/Driver/ToolChains/SPIRVOpenMP.cpp
    A clang/lib/Driver/ToolChains/SPIRVOpenMP.h
    M clang/lib/Frontend/CompilerInvocation.cpp
    A clang/test/Driver/Inputs/spirv-openmp/lib/libomptarget-spirv64.bc
    A clang/test/Driver/spirv-openmp-toolchain.c
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

  Log Message:
  -----------
  [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (#120145)

This is the first of a series of patches to add support for OpenMP
offloading to SPIR-V through liboffload with the first intended target
being Intel GPUs. This patch implements the basic driver and
`clang-linker-wrapper` work for JIT mode. There are still many missing
pieces, so this is not yet usable.

We introduce `spirv64-intel-unknown` as the only currently supported
triple. The user-facing argument to enable offloading will be `-fopenmp
-fopenmp-targets=spirv64-intel`

Add a new `SPIRVOpenMPToolChain` toolchain based on the existing general
SPIR-V toolchain which will call all the required SPIR-V tools (and
eventually the SPIR-V backend) as well as add the corresponding device
RTL as an argument to the linker.

We can't get through the front end consistently yet, so it's difficult
to add any LIT tests that execute any tools, but front end changes are
planned very shortly, and then we can add those tests.

---------

Signed-off-by: Sarnie, Nick <nick.sarnie at intel.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list