-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
toml 0.4.9 to 0.5.3 compile for a long time on 2021-10-02 nightly #89524
Comments
Update: Compilation finished after about 40 minutes. |
@saethlin what's the command you use to reproduce this issue? Do you add some flags, such as |
@apiraino No flags. Just Are you having trouble reproducing? |
ah yes thank you @saethlin, I didn't read carefully your configuration. yes, I can now reproduce, I believe the issue is in one of the dependencies of Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-medium +T-compiler |
I'm poking at this. It's out of my expertise, but maybe I'll turn up something useful. I minimized pub fn parse(text: &str) -> toml::Value {
toml::from_str(text).unwrap()
} So the regression is reproduced just by something in The older commits compile in release within a few seconds, while the more recent commits need just over a minute. I suggest investigating this based on the older |
|
Looks like LLVM manages to blow up |
Adding some size instrumentation, we end up running the cgscc pipeline on this function four times, which includes inlining and the function simplification pipeline. On each inline, the size jumps from 325 originally to 16069 to 103390 to 778219 instructions. This is not due to devirt iteration. I can avoid the last one by dropping the UpdatedC reprocessing. Something is going catastrophically wrong here in the interaction between the CGSCC pass manager and the inliner. |
I think the issue here is recursive drop glue that gets recursively inlined. This looks similar to the report at https://bugs.llvm.org/show_bug.cgi?id=45253. |
@nikic do we think we can push the patch for fixing this forward on the LLVM side somehow? It seems desirable to fix this as soon as we can, though it likely won't make the next release given the short timeline... |
@Mark-Simulacrum I don't have much hope for a timely upstream fix. We can cherry-pick https://reviews.llvm.org/D98481. It has minor perf impact per #89830. |
Checking in, the problem documented in this issue no longer reproduces on nightly or stable (1.58.1). But the example documented in #89647 still seems to be a problem. |
Closing this one as the specific case doesn't reproduce anymore, and we have other issues tracking similar problems. |
It seems like both the panic setting and codegen-units setting are required.
I don't know what is going on, but LLVM seems to think it's doing something, but it's been doing the same something for the past 30 minutes.
perf top
says:rustc --version --verbose
:The text was updated successfully, but these errors were encountered: