-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Refactoring after the PlaceValue
addition
#124153
Conversation
rustbot has assigned @compiler-errors. Use |
This comment has been minimized.
This comment has been minimized.
058e198
to
d8a45ef
Compare
This comment has been minimized.
This comment has been minimized.
7445e66
to
a9ef67f
Compare
/// of the specified size and alignment. | ||
/// | ||
/// The allocation itself is untyped. | ||
pub fn alloca<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx, Value = V>>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy that #122053 landed since it means that it's reasonable to alloca
a PlaceValue
without a type.
r? saethlin |
☔ The latest upstream changes (presumably #123886) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
I added `PlaceValue` in 123775, but kept that one line-by-line simple because it touched so many places. This goes through to add more helpers & docs, and change some `PlaceRef` to `PlaceValue` where the type didn't need to be included. No behaviour changes.
I don't exactly understand the entire context and do not know the code base, but reading through I found no technical issues that would've struck out. Seems like a mostly nice mechanical cleanup: The Thinking on it now, I wonder if the helper should be marked Another thought I had was if some of the fields on PlaceValue and/or PlaceRef would benefit from being less public, so as to avoid eg. Anyway, from someone not fully capable of saying this: Looks good to me. |
For code in the compiler, that attribute has very little impact because the dist build use PGO+LTO+BOLT which tends to find all the obvious inlinings. I agree that this is a nice improvement to a lot of this code. Thanks! @bors r+ |
I look forward to seeing restrictions get to the point where we'd be willing to use it in the compiler. Because I agree, but not enough to want to move everything to use accessor methods for things. If the fields being read-only was a possibility -- so you could still match the types, etc -- then I agree that'd be great. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (8b64adc): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 673.458s -> 676.399s (0.44%) |
I added
PlaceValue
in #123775, but kept that one line-by-line simple because it touched so many places.This goes through to add more helpers & docs, and change some
PlaceRef
toPlaceValue
where the type didn't need to be included.No behaviour changes -- the codegen is exactly the same.