[PATCH] D97717: [SYCL] Rework the SYCL driver options
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 3 05:11:42 PST 2021
aaron.ballman added a comment.
In D97717#2599728 <https://reviews.llvm.org/D97717#2599728>, @bader wrote:
> @aaron.ballman, it looks like unittests should be updated as well. Please, take a look at failures in pre-merge checks.
Thanks, I'll correct those!
================
Comment at: clang/include/clang/Basic/LangOptions.def:252
LANGOPT(SYCLIsDevice , 1, 0, "Generate code for SYCL device")
+LANGOPT(SYCLIsHost , 1, 0, "SYCL host compilation")
ENUM_LANGOPT(SYCLVersion , SYCLMajorVersion, 1, SYCL_None, "Version of the SYCL standard used")
----------------
bader wrote:
> I'm okay with that change, but IIRC, @ABataev suggested to have both -fsycl and -fsycl-is-device options to align with OpenMP mode (full discussion is here - https://reviews.llvm.org/D72857#inline-674377).
Thanks for pointing this out!
As far as the frontend is concerned, being in "SCYL" mode is not a useful construct because you don't know *which* SYCL mode you're in (host or device). Downstream, we're finding that having `SYCL`, `SYCLIsDevice`, and `SYCLIsHost` introduces bugs because developers may check `SYCL` when they mean `SYCLIsDevice` or they do things like check `SYCL && SYCLIsDevice` which is redundant.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97717/new/
https://reviews.llvm.org/D97717
More information about the cfe-commits
mailing list