-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
same functions are not merged in library #91490
Comments
Marking as regression-untriaged for now until we figure out which version this actually affects. That PR is in the latest stable (1.57.0), not nightly. |
@camelid The change was reverted for the release. The issue sounds like MergeFuncs doesn't run -- looking at https://github.com/llvm/llvm-project/blob/f178a05f220403f2a9d73c7640bfcc7dc2d7be72/llvm/lib/Passes/PassBuilderPipelines.cpp#L1194 I seem to have misscheduled the pass due to some unfortunate code structure: The passes are added in the middle of OptimizePM construction, but the OptimizePM is only actually scheduled afterwards, which means that MergeFuncs will run close to the start of the module pipeline, not the end. The same seems to have happened to IR outlining and hot-cold splitting. |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-medium |
This is fixed on nightly, apparently by #91657 |
Ok, closing then. That PR also added a test for this issue. |
I tried this code:
When compiled with the latest stable version and look at the objdump, I see a combined version of a and b, because they are optimized to the same instructions and then merged in the library.
On nightly (already bisected) two copies are stored and it takes the double amount of space (3.9kIB vs 4.1kIB).
Here's a godbolt link: https://rust.godbolt.org/z/zWovojdEE
Version it worked on
It most recently worked on: 1.57.0
Doesn't work since: 63cc2bb cc #88243 @nikic
@rustbot modify labels: +regression-from-stable-to-nightly +I-heavy
The text was updated successfully, but these errors were encountered: