Skip to content

EscapeAnalysis: fix a quadratic behavior in ConnectionGraph::getNode #34867

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

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

eeckstein
Copy link
Contributor

Fixes a compile time problem. The single linked list of merge targets in connection graph nodes can be very large.
Update the final merge target in the map, so that it has to be traversed only once for a given SILValue.

rdar://problem/71602804

Fixes a compile time problem. The single linked list of merge targets in connection graph nodes can be very large.
Update the final merge target in the map, so that it has to be traversed only once for a given SILValue.

rdar://problem/71602804
@eeckstein eeckstein requested a review from atrick November 24, 2020 14:50
@eeckstein
Copy link
Contributor Author

@swift-ci test

// If the compiler needs more than 5 minutes, there is probably a real problem.
// So please don't just increase the timeout in case this fails.

// RUN: %{python} %S/../../test/Inputs/timeout.py 240 %target-swift-frontend -O -parse-as-library -sil-verify-none -c %t/main.swift -o %t/main.o
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should really be a scale test, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this is the end-to-end test.
But it's probably worth adding a scale-test, too. I'll take a look.

@eeckstein eeckstein merged commit d01aa21 into swiftlang:main Dec 1, 2020
@eeckstein eeckstein deleted the fix-escape-analysis branch December 1, 2020 09:02
Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eeckstein thanks. Hopefully this works out, but I can't be sure without testing with -escapes-internal-verify. Did you do that?

@eeckstein
Copy link
Contributor Author

No, I was not aware that we have this option.

@atrick
Copy link
Contributor

atrick commented Dec 1, 2020

@eeckstein I don't think any of the -escapes-internal-verify failures are related to this change
#34909
I filed a bug to investigate separately: rdar://71863005 (EscapeAnalysis ConnectionGraph: -escapes-internal-verify fails when building llbuild and SCK)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants