-
Notifications
You must be signed in to change notification settings - Fork 13.3k
decide whether global addresses should be significant by default #8958
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
Comments
Nominating for the backwards compatible milestone (well defined would work too). |
If we do decide to do this, an interesting statistic to see beforehand would be the size difference in the standard libraries or librustc. When I was dealing with |
One thing to note is that string constants are already merged, so only the address of the slice object itself is significant right now. |
TLS should not involve fn addresses at all - it was an expedient. Agree we shouldn't make promises about fn addresses if it's useful for optimizations. |
Accepted backwards-compatible |
does this relate to static muts? |
I thought this was only doable for constants, but it does appear you could tag I don't think it would ever actually result in an optimization with |
I think addresses should be insignifacant and tls should be done with type_id. |
Nominating for closure with the following policy:
|
Maybe |
Sounds like there's some more to do here. Leaving open. |
What's the current thinking here?
|
@brson, that is my understanding. |
I am working on this, but it's hit some issues with the way we handle inlining with |
`#[inline(never)]` is used. Closes rust-lang#8958. This can break some code that relied on the addresses of statics being distinct; add `#[inline(never)]` to the affected statics. [breaking-change]
Lint simple expressions in `manual_filter_map`, `manual_find_map` changelog: Lint simple expressions in [`manual_filter_map`], [`manual_find_map`] The current comparison rules out `.find(|a| a.is_some()).map(|b| b.unwrap())` because `a` being a reference can effect more complicated expressions, this adds a simple check for that case and adds the necessary derefs There's some overlap with `option_filter_map` so `lint_filter_some_map_unwrap` now returns a `bool` to indicate it linted
We have
#[address_insignificant]
now because it's needed to have LLVM merge constants. I think insignificant addresses should be the default, and TLS should be done with a macro applying an#[address_significant]
attribute.Issue #8957 covers functions, since the situation is different as we already merge them.
The text was updated successfully, but these errors were encountered: