Repository navigation
use tbaa.struct to inform LLVM about struct/enum padding #6736
Description
Activity
Visiting for bug triage. Performance improvements are always good, but this one doesn't look like a release blocker.
#10613 is an example of how this bites us.
Can anybody mentor this?
I'm working on this.
Investigation in to how LLVM uses
tbaa.structsuggests 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.structmetadata 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?
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).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.
- addedA-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
on Oct 5, 2015 - addedC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
on Jul 19, 2017 Hey, psst. @rust-lang/wg-codegen
Also cc @rust-lang/compiler.
I agree, without a concrete case of something that we want to improve, this issue is not really actionable
This will allow LLVM to be lazier when copying the contents.