[SYCL] Fix function attribute merging on template declarations#21158
[SYCL] Fix function attribute merging on template declarations#21158sarnex merged 7 commits intointel:syclfrom
Conversation
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
|
@intel/dpcpp-cfe-reviewers, friendly ping. |
Fznamznon
left a comment
There was a problem hiding this comment.
Makes sense, just a couple of questions.
https://github.com/intel/llvm/pull/20419/changes also brings changes for two other attributes - SYCLAddIRAttributesKernelParameterAttr and SYCLAddIRAttributesGlobalVariableAttr . Do they have the same problem?
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
|
Thank you, @Fznamznon,
I think so. The two other functions with similar logic are I fixed |
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
|
The failing end-to-end tests are unrelated to this change:
@intel/llvm-gatekeepers, this PR should be ready to merge. |
#20419 implements attribute merging for
add_ir_attributes_*attributes. This commit fixes an issue that occurs when merging attributes on function template declarations.Attribute merging is deferred until template instantiation if an attribute contains dependent expressions. Previously, we only checked if the existing attribute was dependent but not if the new attribute was dependent. This would cause the merge to fail but the new attribute would still be dropped from the AST. This commit ensures both attributes are checked and new dependent attributes do not disappear.