Skip to content
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

[SR-15531] Major Compile Speed Regression when Compiling postgres-nio on Latest Swift Snapshot #57834

Closed
swift-ci opened this issue Nov 30, 2021 · 12 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-15531
Radar rdar://problem/87607890
Original Reporter rnantes (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

Building on: M1 Xcode Version 13.2 beta 2 (13C5081f)
Also fails using arm64 docker image: nightly-main-focal

Swift Toochain Snapshot: swift-DEVELOPMENT-SNAPSHOT-2021-11-20

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @asl
Priority Medium

md5: 90440516aba2a6ac967a7cf807cd91d7

Issue Description:

Compile speed regression when compiling latest release of postgres-nio on latest Swift Toochain snapshot: swift-DEVELOPMENT-SNAPSHOT-2021-11-20.

~67 min compile time on M1 Max using latest snapshot vs ~1 min with Swift 5.5 release

postgres-nio github issue

@BradLarson
Copy link
Collaborator

We've seen the same on an internal codebase during aarch64 builds. Anecdotally, it seems like the two steps that seemed to drag on were linking and "Wrapping AST for [target] for debugging". Haven't yet tried with a top-of-tree build newer than 2021-11-20.

@swift-ci
Copy link
Collaborator Author

swift-ci commented Dec 9, 2021

Comment by Reid Nantes (JIRA)

Swift Development Snapshot 2021-12-06 still has this issue

@asl
Copy link
Collaborator

asl commented Jan 10, 2022

This is an LLVM issue with GlobalISel. See llvm/llvm-project#53109 for more information

@swift-ci
Copy link
Collaborator Author

Comment by Reid Nantes (JIRA)

Swift Development Snapshot 2022-01-09 still has this issue

@asl
Copy link
Collaborator

asl commented Jan 13, 2022

rnantes (JIRA User) It uses the same revision of LLVM, so nothing changed

@swift-ci
Copy link
Collaborator Author

Comment by Reid Nantes (JIRA)

@asl Posted just to show this issue still is relevant. I've also posted in the [Swift Forums | https://forums.swift.org/t/major-compile-performance-regression-swift-5-6/54604]

@DougGregor
Copy link
Member

@swift-ci create

@asl
Copy link
Collaborator

asl commented Jan 15, 2022

Ok, here is the full story. The issue was exposed by LLVM mainline d0af732 and subsequently fixed in LLVM mainline by 64bef13. The underlying issue seems to be quite clear.

Swift is currently using stable/20210726 branch, so was unlucky enough to make this branch in a ~3 week window between these changes 🙂

I submitted apple#3804 which backports 64bef13 to stable/20210726 branch

@asl
Copy link
Collaborator

asl commented Jan 21, 2022

The PR was merged. Likely it should be cherry-picked to an appropriate Swift 5.6 branches.

@asl
Copy link
Collaborator

asl commented Feb 2, 2022

Backport to swift/release/5.6 submitted in apple/llvm-project#3853

@asl
Copy link
Collaborator

asl commented Feb 21, 2022

rnantes (JIRA User) Will you please confirm that the issue had gone with the latest swift nightly snapshot? So we can close this issue.

Thanks!

@swift-ci
Copy link
Collaborator Author

Comment by Reid Nantes (JIRA)

I can confirm this now works as expected on the latest swift nightly snapshot. Thank you @asl for your work this.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

4 participants