-
Notifications
You must be signed in to change notification settings - Fork 798
[SYCL] Add support for structs containing special types as free function kernel parameters #18692
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
| // TODO | ||
| unsupportedFreeFunctionParamType(); | ||
| bool enterStruct(const CXXRecordDecl *, ParmVarDecl *, | ||
| QualType ParamTy) final { |
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.
| QualType ParamTy) final { | |
| QualType) final { |
Since it is not used.
| bool leaveStruct(const CXXRecordDecl *, ParmVarDecl *PD, | ||
| QualType ParamTy) final { |
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.
| bool leaveStruct(const CXXRecordDecl *, ParmVarDecl *PD, | |
| QualType ParamTy) final { | |
| bool leaveStruct(const CXXRecordDecl *, ParmVarDecl *, | |
| QualType) final { |
| bool handleScalarType(ParmVarDecl *, QualType) final { | ||
| // TODO | ||
| unsupportedFreeFunctionParamType(); | ||
| bool handleScalarType(ParmVarDecl *PD, QualType ParamTy) final { |
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.
| bool handleScalarType(ParmVarDecl *PD, QualType ParamTy) final { | |
| bool handleScalarType(ParmVarDecl *, QualType) final { |
| bool handleNonDecompStruct(const CXXRecordDecl *, ParmVarDecl *PD, | ||
| QualType ParamTy) final { |
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.
| bool handleNonDecompStruct(const CXXRecordDecl *, ParmVarDecl *PD, | |
| QualType ParamTy) final { | |
| bool handleNonDecompStruct(const CXXRecordDecl *, ParmVarDecl *, | |
| QualType) final { |
| bool enterStruct(const CXXRecordDecl *, ParmVarDecl *, QualType) final { | ||
| // TODO | ||
| // ++StructDepth; | ||
| bool enterStruct(const CXXRecordDecl *, ParmVarDecl *PD, QualType Ty) final { |
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.
| bool enterStruct(const CXXRecordDecl *, ParmVarDecl *PD, QualType Ty) final { | |
| bool enterStruct(const CXXRecordDecl *, ParmVarDecl *, QualType Ty) final { |
| bool leaveStruct(const CXXRecordDecl *, FieldDecl *, QualType) final { | ||
| // TODO | ||
| unsupportedFreeFunctionParamType(); | ||
| bool leaveStruct(const CXXRecordDecl *, FieldDecl *FD, QualType Ty) final { |
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.
| bool leaveStruct(const CXXRecordDecl *, FieldDecl *FD, QualType Ty) final { | |
| bool leaveStruct(const CXXRecordDecl *, FieldDecl *, QualType) final { |
| assert(CurrentStructs.size() && | ||
| "Current free function parameter is not inside a structure!"); | ||
| return CurrentStructs.back(); | ||
| } |
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 this function used anywhere?
|
|
||
| FwdDeclEmitter.Visit(type.getDesugaredType(S.getASTContext())); | ||
|
|
||
| // this is a struct that contains a special type so its neither a |
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.
| // this is a struct that contains a special type so its neither a | |
| // This is a struct that contains a special type so it's neither a |
| // CHECK-NEXT: { kernel_param_kind_t::kind_pointer, 8, 0 }, | ||
| // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 4, 8 }, | ||
| // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 4, 12 }, | ||
| // CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 4, 0 }, |
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.
Can you please explain the changes to the offsets (i.e. previous value to 0) in this test?
|
I seem to have added a lot of unneeded reviewers due to a dirty local repository. Please ignore this PR, only @intel/dpcpp-cfe-reviewers are relevant here. |
Co-authored-by: premanandrao <premanand.m.rao@intel.com>
This reverts commit befc6a1.
|
@premanandrao please head over to #20844 as I'm closing this as the commit history has been completely messed up. I will address your review there instead. |
Add support for structs containing special types as free function kernel parameters.