-
Notifications
You must be signed in to change notification settings - Fork 787
[WIP][SYCL] Update usage rules of SYCL_EXTERNAL #962
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,15 @@ | |
|
||
int bar(int b); | ||
|
||
class A { | ||
public: | ||
// TODO: check for constructor/destructor as well | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One more There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not sure that it's so hard to defer it to another patch. |
||
|
||
// CHECK-DAG: define linkonce_odr spir_func void @_ZN1A3fooEv | ||
__attribute__((sycl_device)) | ||
void foo() {} | ||
}; | ||
|
||
// CHECK-DAG: define spir_func i32 @_Z3fooii | ||
__attribute__((sycl_device)) | ||
int foo(int a, int b) { return a + bar(b); } | ||
|
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.
Not sure if it worth to check for explicit
SYCLDeviceAttr
. Also, it would be good to hear feedback about thisif
in general: is it the right place and properif
?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'm ok with the place. I believe that in a happy future we will outline device code in other way: do this in CodeGen like OpenMP. We already try to do this in llorg, and we do some changes in this function for this.
So, could you please make your changes to this function not conflicting with https://reviews.llvm.org/D71016#change-cNmcQq4FKHx8 ?
And, I'm not sure that checking for explicit
SYCLDeviceAttr
is needed.