[PATCH] D97717: [SYCL] Rework the SYCL driver options
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 1 11:57:56 PST 2021
aaron.ballman created this revision.
aaron.ballman added reviewers: erichkeane, bader.
Herald added subscribers: jansvoboda11, dexonsmith, dang, Anastasia, ebevhan, yaxunl.
aaron.ballman requested review of this revision.
Herald added a project: clang.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D97717
Files:
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/InitPreprocessor.cpp
clang/test/CodeGenSYCL/convergent.cpp
clang/test/CodeGenSYCL/filescope_asm.c
clang/test/Frontend/sycl-aux-triple.cpp
clang/test/Preprocessor/sycl-macro.cpp
clang/test/SemaSYCL/float128.cpp
clang/test/SemaSYCL/int128.cpp
clang/test/SemaSYCL/kernel-attribute.cpp
clang/test/SemaSYCL/prohibit-thread-local.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97717.327219.patch
Type: text/x-patch
Size: 9178 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210301/1b2e0e53/attachment.bin>
More information about the cfe-commits
mailing list