Skip to content

Conversation

@MochalovaAn
Copy link
Contributor

@MochalovaAn MochalovaAn commented Jul 20, 2020

User may get their function a name the same as SPIR-V instruction.
In that case thier function call will be translated to SPIR-V instruction call.
The only functions that should be translated to SPIR-V instructions are SPIR-V built-ins
and they should have __spirv prefix.
Add checking for __spirv prefix in demangler to filter SPIR-V built-ins from other function calls

Signed-off-by: amochalo [email protected]

Copy link
Contributor

@AlexeySotkin AlexeySotkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash your commits and add a meaningful commit message.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the test shorter. You only need a call to the BitReverse function.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these 2 lines capture the same ID and one of them can be removed.

User may get their function a name the same as SPIR-V instruction.
In that case thier function call will be translated to SPIR-V instruction call.
The only functions that should be translated to SPIR-V instructions are SPIR-V built-ins and they should have __spirv prefix.
Add checking for __spirv prefix in demangler to filter SPIR-V built-ins from other function calls.
@MochalovaAn MochalovaAn changed the title [SYCL] Bug fix in translator [SYCL] Fix translation of user functions into SPIR-V instructions Aug 3, 2020
@bader bader deleted the BitRev branch August 20, 2020 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants