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

Add LLVM::OperandBundleDef#dispose #14095

Conversation

HertzDevil
Copy link
Contributor

This is necessary to prevent a memory leak.

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

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

Nice!

@straight-shoota
Copy link
Member

straight-shoota commented Dec 15, 2023

I'm curious, how did you notice this? Purely theoretical from working on the LLVM API or did you observe the memory leak somewhere?

@straight-shoota straight-shoota added this to the 1.11.0 milestone Dec 15, 2023
@HertzDevil
Copy link
Contributor Author

HertzDevil commented Dec 15, 2023

This was part of my patch there and is necessary because the call / invoke instructions do not own the operand bundles passed to construction, unlike e.g. LLVMValueRef. Even before the upstream patch it is natural that our own new OperandBundleDef inside llvm_ext.cc should be paired with a delete

@straight-shoota straight-shoota merged commit 3d9bc38 into crystal-lang:master Dec 16, 2023
55 checks passed
@HertzDevil HertzDevil deleted the feature/llvm-operand-bundle-dispose branch December 19, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants