Fix EII function aliases eliminated by LTO#153648
Fix EII function aliases eliminated by LTO#153648rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
d721f86 to
1aef424
Compare
|
r? jdonszelmann |
|
I'm not sure if this is the right fix. They might need to be added to |
|
hm, I wonder what the difference is between aliases and these shims. These shims pretty much act like aliases, and their symbol is the same as the EII declatation's. We already handle those symbols specially in a few places (look for the aliases field on CodegenAttrs). In fact, I personally thought we already kept them alive enough. I guess functions are optimized differently which makes some sense. In any case, I expect the problem to fundamentally also affect aliases of statics, something we don't test much at the moment, so the solution should apply to all aliases, not just these shims. |
1aef424 to
a80c922
Compare
a80c922 to
d81cc68
Compare
Thank you for your comment. My previous attempt was more of a hack than a fix. So I redesigned a better solution based on your suggestion. This should fix both my issue and #151271 now.
The new attempt will apply to any |
|
been having a bit of a backlog. This was mostly bjorn, but I agree with the discussions had and I think the current state of the PR seems correct to me. @bors r=me,bjorn3 |
|
@bors r=jdonszelmann,bjorn3 |
…donszelmann,bjorn3 Fix EII function aliases eliminated by LTO Add EII function aliases to `llvm.compiler.used` so that LLVM's LTO passes do not eliminate them. Fixes rust-lang#153645 Tracking issue: rust-lang#125418
Rollup of 7 pull requests Successful merges: - #142659 (compiler-builtins: Clean up features) - #153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - #153648 (Fix EII function aliases eliminated by LTO) - #153790 (Fix regression when dealing with generics/values with unresolved inference) - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error) - #153980 (refactor: move doc(rust_logo) check to parser) - #154551 (Skip suggestions pointing to macro def for assert_eq)
Rollup of 7 pull requests Successful merges: - #142659 (compiler-builtins: Clean up features) - #153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - #153648 (Fix EII function aliases eliminated by LTO) - #153790 (Fix regression when dealing with generics/values with unresolved inference) - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error) - #153980 (refactor: move doc(rust_logo) check to parser) - #154551 (Skip suggestions pointing to macro def for assert_eq)
…donszelmann,bjorn3 Fix EII function aliases eliminated by LTO Add EII function aliases to `llvm.compiler.used` so that LLVM's LTO passes do not eliminate them. Fixes rust-lang#153645 Tracking issue: rust-lang#125418
Rollup of 9 pull requests Successful merges: - #154582 (miri subtree update) - #142659 (compiler-builtins: Clean up features) - #153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - #153648 (Fix EII function aliases eliminated by LTO) - #153790 (Fix regression when dealing with generics/values with unresolved inference) - #154551 (Skip suggestions pointing to macro def for assert_eq) - #154574 (delete several `ui/consts` tests) - #154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename) - #154579 (remove debug requirement from hooks)
Rollup of 9 pull requests Successful merges: - rust-lang/rust#154582 (miri subtree update) - rust-lang/rust#142659 (compiler-builtins: Clean up features) - rust-lang/rust#153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - rust-lang/rust#153648 (Fix EII function aliases eliminated by LTO) - rust-lang/rust#153790 (Fix regression when dealing with generics/values with unresolved inference) - rust-lang/rust#154551 (Skip suggestions pointing to macro def for assert_eq) - rust-lang/rust#154574 (delete several `ui/consts` tests) - rust-lang/rust#154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename) - rust-lang/rust#154579 (remove debug requirement from hooks)
Rollup of 9 pull requests Successful merges: - rust-lang#154582 (miri subtree update) - rust-lang#142659 (compiler-builtins: Clean up features) - rust-lang#153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - rust-lang#153648 (Fix EII function aliases eliminated by LTO) - rust-lang#153790 (Fix regression when dealing with generics/values with unresolved inference) - rust-lang#154551 (Skip suggestions pointing to macro def for assert_eq) - rust-lang#154574 (delete several `ui/consts` tests) - rust-lang#154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename) - rust-lang#154579 (remove debug requirement from hooks)
Rollup of 9 pull requests Successful merges: - rust-lang/rust#154582 (miri subtree update) - rust-lang/rust#142659 (compiler-builtins: Clean up features) - rust-lang/rust#153574 (Avoid ICE when param-env normalization leaves unresolved inference variables) - rust-lang/rust#153648 (Fix EII function aliases eliminated by LTO) - rust-lang/rust#153790 (Fix regression when dealing with generics/values with unresolved inference) - rust-lang/rust#154551 (Skip suggestions pointing to macro def for assert_eq) - rust-lang/rust#154574 (delete several `ui/consts` tests) - rust-lang/rust#154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename) - rust-lang/rust#154579 (remove debug requirement from hooks)
Add EII function aliases to
llvm.compiler.usedso that LLVM's LTO passes do not eliminate them.Fixes #153645
Tracking issue: #125418