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 support for new allocsize attribute in LLVM #33075

Closed
alexcrichton opened this issue Apr 18, 2016 · 4 comments
Closed

Add support for new allocsize attribute in LLVM #33075

alexcrichton opened this issue Apr 18, 2016 · 4 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@alexcrichton
Copy link
Member

alexcrichton commented Apr 18, 2016

This is mostly a TODO issue for when we next upgrade LLVM. They have recently landed upstream support for a new attribute to tag functions with to indicate that they are an allocator.

This should hopefully obsolete our local patch and we should use these attributes instead.

@alexcrichton alexcrichton added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Apr 18, 2016
@Mark-Simulacrum
Copy link
Member

Did this happen? I'm not quite sure, but I feel like perhaps not. I think we do have a recent enough version of LLVM for this to be available....

@nagisa
Copy link
Member

nagisa commented Jun 12, 2017

So, this allocsize attribute has this comment attached to it:

allocsize should not imply that a function is a traditional allocation function (e.g. that can be optimized out/...); it just tells us how many bytes exist at the pointer handed back by the function.

and it seems that the whole purpose if it revolves around removing stuff like bound checks. It might still be super worth it to attach these attributes, but they won’t help with optimising out the allocations.

@nagisa
Copy link
Member

nagisa commented Jun 12, 2017

See also this

@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 25, 2017
@alexcrichton
Copy link
Member Author

It sounds like this isn't going to obsolete our local patch here, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

3 participants