[SYCL][ESIMD] Fix propagation of ESIMD attribute for inlined functions #16193
+55
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The internal compiler uses aggressive inlining, and we have a case where a wrapper function that calls an ESIMD function has had the ESIMD functions body inlined into it. The parent function does not have the ESIMD attribute, so this causes the pass that propagates the ESIMD attribute to fail, which ends up causing
sycl-post-link
to do the wrong thing. It works fine when the inlining does not happen because this pass propagates the attribute. Extend the ESIMD attribute propagation pass to also consider functions that call ESIMD intrinsics as ESIMD functions.