-
Notifications
You must be signed in to change notification settings - Fork 766
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
[SYCL] Link sycl-devicelib-host lib in clang-cl + fscyl by default. #6503
Conversation
Hi, @mdtoguchi Thanks very much. |
Signed-off-by: jinge90 <ge.jin@intel.com>
clang/lib/Driver/ToolChains/MSVC.cpp
Outdated
@@ -142,6 +142,9 @@ void visualstudio::Linker::ConstructJob(Compilation &C, const JobAction &JA, | |||
CmdArgs.push_back("-defaultlib:sycl-devicelib-host.lib"); | |||
} | |||
|
|||
if (C.getDriver().IsCLMode() && Args.hasArg(options::OPT_fsycl)) | |||
CmdArgs.push_back("-defaultlib::sycl-devicelib-host.lib"); | |||
|
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.
Changes are good, can we add a test to check as well?
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.
Hi, @mdtoguchi
Test is added, could you review again?
Thanks very much.
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.
Is there any particular reason why this lib is being added to the link
command line and not being added to the default directives of the generated host object via --dependent-lib=sycl-device-lib-host
?
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.
Hi, @mdtoguchi
Just checked the code, “dependent-lib=sycl-devicelib-host” is the right approach, I will update the patch.
Thanks very much.
Signed-off-by: jinge90 <ge.jin@intel.com>
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.
Thanks! LGTM
Hi, @mdtoguchi |
Signed-off-by: jinge90 <ge.jin@intel.com>
Hi, @tfzhu |
@jinge90, if you can't find it in https://github.com/intel/llvm/issues, please, open a new issue. |
Hi, @pvchupin Thanks very much. |
Under some conditions, a trivial `mov xN xN` instruction was emitted on tail calls. Consider the following code: ``` class Test { public: virtual void f() {} }; void call_f(Test *t) { t->f(); } ``` Correponding assembly: ``` _Z6call_fP4Test: ldr x16, [x0] mov x17, x0 movk x17, #6503, lsl #48 autda x16, x17 ldr x1, [x16] =====> mov x16, x16 movk x16, #54167, lsl #48 braa x1, x16 ``` This patch makes such movs being omitted. Co-authored-by: Anatoly Trosinenko <atrosinenko@accesssoftek.com>
Signed-off-by: jinge90 ge.jin@intel.com