Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Refactor type memory layouts and ABIs, to be more general and easier to optimize. #45225
To combat combinatorial explosion, type layouts are now described through 3 orthogonal properties:
Size optimizations implemented so far:
Code generation now takes advantage of
This PR implements most of rust-lang/rfcs#1230, the description there is confused in places (i.e. it's a list of special cases, but several of them happen to be the exact same optimization, just scattered).
EDIT: for an updated view on these hard cases, see rust-lang/rfcs#1230 (comment).
My approach with this PR has been to avoid doing anything that would pessimize codegen, and one example of this is that
But if I turn verbose mode on, there's an extra (manually wrapped for your convenience):
Printing just "