[all-commits] [llvm/llvm-project] c165a9: [SYCL] Rework the SYCL driver options

Aaron Ballman via All-commits all-commits at lists.llvm.org
Wed Mar 17 05:27:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c165a99a1b8861af87e0509a2e14debf2764804b
      https://github.com/llvm/llvm-project/commit/c165a99a1b8861af87e0509a2e14debf2764804b
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2021-03-17 (Wed, 17 Mar 2021)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Frontend/InitPreprocessor.cpp
    M clang/test/CodeGenSYCL/convergent.cpp
    M clang/test/CodeGenSYCL/filescope_asm.c
    M clang/test/Frontend/sycl-aux-triple.cpp
    A clang/test/Frontend/sycl.cpp
    M clang/test/Preprocessor/sycl-macro.cpp
    M clang/test/SemaSYCL/float128.cpp
    M clang/test/SemaSYCL/int128.cpp
    M clang/test/SemaSYCL/kernel-attribute.cpp
    M clang/test/SemaSYCL/prohibit-thread-local.cpp
    M clang/unittests/Frontend/CompilerInvocationTest.cpp

  Log Message:
  -----------
  [SYCL] Rework the SYCL driver options

SYCL compilations initiated by the driver will spawn off one or more
frontend compilation jobs (one for device and one for host). This patch
reworks the driver options to make upstreaming this from the downstream
SYCL fork easier.

This patch introduces a language option to identify host executions
(SYCLIsHost) and a -cc1 frontend option to enable this mode. -fsycl and
-fno-sycl become driver-only options that are rejected when passed to
-cc1. This is because the frontend and beyond should be looking at
whether the user is doing a device or host compilation specifically.
Because the frontend should only ever be in one mode or the other,
-fsycl-is-device and -fsycl-is-host are mutually exclusive options.




More information about the All-commits mailing list