-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.ICEBreaker-LLVMBugs identified for the LLVM ICE-breaker groupBugs identified for the LLVM ICE-breaker group
Description
Some code went from compiling in <10 seconds to (hours) in between commits 10f12fe..b3a0350 (unfortunately I don't have a smaller range right now).
The regression only happens when ThinLTO is enabled. Full LTO doesn't have the slowdown.
Here's the source code which is causing the regression. The function has about 20 .await
points, which I suspect might be related. It doesn't seem to have anything to do with inlining the awaited function (I replaced it with a panic and linking was still slow).
Here's the LLVM IR for the fast and slow cases (built with the above commits of rustc, respectively): llvm-ir.zip
EDIT: See below for a reproducer
cc @petrhosek
benbrittain
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.ICEBreaker-LLVMBugs identified for the LLVM ICE-breaker groupBugs identified for the LLVM ICE-breaker group