Skip to content
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

[CERN] Crash occurs in a IR to SPIRV pass if source file has a custom class with separate constructor declaration and definition. #1874

Conversation

fadeeval
Copy link
Contributor

@fadeeval fadeeval commented Jun 11, 2020

In case separate constructor declaration and definition the IR representation has GlobalAlias objects which didn't process properly in getCalledFunction method of CallInst class.

Signed-off-by: Aleksander Fadeev [email protected]

Signed-off-by: Aleksander Fadeev <[email protected]>
@fadeeval fadeeval requested a review from bader as a code owner June 11, 2020 14:22
@fadeeval fadeeval changed the title [CERN] Crash occurs in a IR to SPIRV pass if source file has separate constructor declaration and defenition. [CERN] Crash occurs in a IR to SPIRV pass if source file has a custom class with separate constructor declaration and defenition. Jun 11, 2020
@fadeeval fadeeval changed the title [CERN] Crash occurs in a IR to SPIRV pass if source file has a custom class with separate constructor declaration and defenition. [CERN] Crash occurs in a IR to SPIRV pass if source file has a custom class with separate constructor declaration and definition. Jun 11, 2020
Comment on lines +1296 to +1300
if (auto Alias = dyn_cast_or_null<llvm::GlobalAlias>(getCalledOperand())) {
return dyn_cast_or_null<Function>(Alias->getAliasee());
} else {
return dyn_cast_or_null<Function>(getCalledOperand());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow, what are you trying to do?
IMO fix should be in the SPIRV translator

@fadeeval fadeeval closed this Jun 11, 2020
@fadeeval fadeeval deleted the private/fadeeval/Custom_class_in_SYCL_device_code_crash branch July 15, 2020 11:49
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.

2 participants