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

use tbaa.struct to inform LLVM about struct/enum padding #6736

Closed
thestinger opened this issue May 25, 2013 · 12 comments
Closed

use tbaa.struct to inform LLVM about struct/enum padding #6736

thestinger opened this issue May 25, 2013 · 12 comments
Labels
A-codegen Area: Code generation 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. I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@thestinger
Copy link
Contributor

This will allow LLVM to be lazier when copying the contents.

@catamorphism
Copy link
Contributor

Visiting for bug triage. Performance improvements are always good, but this one doesn't look like a release blocker.

@pcwalton
Copy link
Contributor

#10613 is an example of how this bites us.

@brson
Copy link
Contributor

brson commented Feb 3, 2014

Can anybody mentor this?

@emberian
Copy link
Member

I'm working on this.

@erickt
Copy link
Contributor

erickt commented Dec 16, 2014

@cmr blogged about trying to implement this here.

@Aatch
Copy link
Contributor

Aatch commented Jan 20, 2015

Investigation in to how LLVM uses tbaa.struct suggests that it doesn't actually help with padding, it just informs LLVM of the types inside what would otherwise be an opaque pointer to help with alias analysis.

If/When we get actual TBAA, outputing tbaa.struct metadata may be useful, but my investigations have shown that LLVM doesn't use it for avoiding padding, etc.

Maybe somebody with more knowledge on LLVM could confirm? @dotdash?

@dotdash
Copy link
Contributor

dotdash commented Jan 20, 2015

I came to the same conclusion when I looked at the LLVM code.
Am 20.01.2015 21:15 schrieb "James Miller" notifications@github.com:

Investigation in to how LLVM uses tbaa.struct suggests that it doesn't
actually help with padding, it just informs LLVM of the types inside what
would otherwise be an opaque pointer to help with alias analysis.

If/When we get actual TBAA, outputing tbaa.struct metadata may be useful,
but my investigations have shown that LLVM doesn't use it for avoiding
padding, etc.

Maybe somebody with more knowledge on LLVM could confirm? @dotdash
https://github.com/dotdash?


Reply to this email directly or view it on GitHub
#6736 (comment).

@thestinger
Copy link
Contributor Author

It used to use it but it was lost after various rewrites of the relevant passes. It could be taught to make use of it again, of course.

@emberian emberian self-assigned this Mar 25, 2015
@sanxiyn sanxiyn added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Oct 5, 2015
@emberian emberian removed their assignment Jan 5, 2016
@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 19, 2017
@nox
Copy link
Contributor

nox commented Mar 30, 2018

Hey, psst. @rust-lang/wg-codegen

@nox
Copy link
Contributor

nox commented Mar 30, 2018

Also cc @rust-lang/compiler.

@nox
Copy link
Contributor

nox commented Mar 30, 2018

Given @cmr's blog post and @Aatch and @dotdash comments which seem to indicate that it doesn't actually help with padding, I suggest we just close this issue.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 15, 2018

I agree, without a concrete case of something that we want to improve, this issue is not really actionable

@oli-obk oli-obk closed this as completed Apr 15, 2018
flip1995 pushed a commit to flip1995/rust that referenced this issue Feb 25, 2021
…lip1995

Add a minimal reproducer for the ICE in rust-lang#6179

This PR is an auxiliary PR for rust-lang#6179, just add a minimal reproducer for the ICE discussed in rust-lang#6179.
See rust-lang#6179 for more details.

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation 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. I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests