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

[llvm] Avoid creating new LLVM contexts when updating struct module #5397

Merged
merged 11 commits into from
Jul 13, 2022

Conversation

lin-hitonami
Copy link
Contributor

@lin-hitonami lin-hitonami commented Jul 12, 2022

Related issue = #5252

Types in modules imported from file/other contexts may be renamed to "original_type.xxx" when the type is imported multiple times. So, we need to insert a pointer cast when the parameter type of a function is renamed.

@netlify
Copy link

netlify bot commented Jul 12, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit 8757c13
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/62ce745b5867940008cf0866
😎 Deploy Preview https://deploy-preview-5397--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@lin-hitonami
Copy link
Contributor Author

/rebase

Copy link
Contributor

@jim19930609 jim19930609 left a comment

Choose a reason for hiding this comment

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

Detailed comments regarding the renaming rule would be nicer~

Copy link
Contributor

@jim19930609 jim19930609 left a comment

Choose a reason for hiding this comment

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

Thanks!

@lin-hitonami lin-hitonami merged commit f1068ae into taichi-dev:master Jul 13, 2022
@lin-hitonami lin-hitonami deleted the cast_type branch July 13, 2022 09:30
}
if (required->isPointerTy()) {
required = required->getPointerElementType();
provided = provided->getPointerElementType();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: is it cleaner to just return is_same_type(required->getPointerElementType(), provided->getPointerElementType()) here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah... I'll send another pr to fix this.

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.

None yet

3 participants