-
Notifications
You must be signed in to change notification settings - Fork 795
[Driver][SYCL][NFC] Update interface to access SYCL header additions #15302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Move the ability to add the SYCL headers into the SYCLInstallation class to better conform to existing usage for other toolchains. Also improve the toolchain access for adding the headers using a virtual function.
clang/lib/Driver/ToolChains/SYCL.cpp
Outdated
| // ../include/sycl | ||
| // ../include/sycl/stl_wrappers | ||
| // ../include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@intel/llvm-reviewers-runtime, I suggest we remove the need for the driver to add 3 different locations for SYCL headers restricted by specific order. Considering that we expose only one header to the user API - sycl/sycl.hpp, the driver can include only one location and runtime library project can put everything into a single location or include from other locations. Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know about include/sycl vs include/, but the stl_wrappers path has to be added in the driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any conflicts between the files in ../include/sycl/stl_wrappers and ../include?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe maintainability benefits of having these headers in a separate dedicated folder outweigh the costs of having driver add one extra include path, if that's where you're going with your question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly is "maintainability benefits"? Note, these are directories of deployed compiler. We can still have separate directories in the sources code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, "smart" deploy is extra maintainability burden. Second, I want to be able to remove stl_wrappers from search path via manually modifying clang -cc1, merging them together with other includes would prevent that. I'm sure there are "third"/"fourth" if I were to think about it just a bit more.
|
@intel/dpcpp-clang-driver-reviewers, please take a look - thanks! |
|
@intel/llvm-gatekeepers, this should be ready for merge - thanks! |
| CC1Args.push_back("-internal-isystem"); | ||
| CC1Args.push_back(DriverArgs.MakeArgString(IncludePath)); | ||
| void SYCLToolChain::AddSYCLIncludeArgs(const ArgList &DriverArgs, | ||
| ArgStringList &CC1Args) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this have the 'override' specifier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, the override is not needed for the function definition of the derived class, as the declaration states the override.
|
Had to fix some conflicts, after update things are clean. @intel/llvm-gatekeepers can this be merged? |
Move the ability to add the SYCL headers into the SYCLInstallation class to better conform to existing usage for other toolchains. Also improve the toolchain access for adding the headers using a virtual function.