Skip to content

[SILOptimizer] Added MandatoryCombiner. #27049

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

Conversation

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented Sep 6, 2019

Minimal commit to get the mandatory combiner rolling. The intent of the mandatory combiner is to do basic transformations after the diagnostics passes have run at the beginning of both the Onone and the performance pipelines. For now, it simply visits reachable instructions and does no work.

In a subsequent commit, apply instructions will be processed and replaced if they are calls to partial applies defined in the same function. At that point an attempt will be made to eliminate the partial apply altogether.

For now, the pass does no work and is not part of any pipeline.

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please ASAN test

@swift-ci
Copy link
Contributor

swift-ci commented Sep 6, 2019

Build failed
Swift Test OS X Platform
Git Sha - e816d87b606b6fb7ecd6287015c9847a5b37e9bf

@nate-chandler nate-chandler force-pushed the add-mandatory-combiner-frame branch from e816d87 to fcba7e5 Compare September 6, 2019 01:24
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

1 similar comment
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please ASAN test

1 similar comment
@nate-chandler
Copy link
Contributor Author

@swift-ci please ASAN test

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

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

Looks overall very reasonable. I found some small things. As a meta comment, SmallVector, SmallVectorImpl are both imported into the swift namespace so you don't need to put llvm::. You can find the list in this header: include/swift/Basic/LLVM.h.

@nate-chandler nate-chandler force-pushed the add-mandatory-combiner-frame branch 3 times, most recently from 82c57de to 0d371c1 Compare September 6, 2019 16:35
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

3 similar comments
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

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

Is my understanding correct? Assuming so, LGTM

@nate-chandler nate-chandler force-pushed the add-mandatory-combiner-frame branch from 0d371c1 to 0ad2183 Compare September 6, 2019 19:30
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Sep 6, 2019

Build failed
Swift Test Linux Platform
Git Sha - 0d371c108857fefea894e3afa4e4c8927ed62347

@swift-ci
Copy link
Contributor

swift-ci commented Sep 6, 2019

Build failed
Swift Test OS X Platform
Git Sha - 0d371c108857fefea894e3afa4e4c8927ed62347

@nate-chandler nate-chandler force-pushed the add-mandatory-combiner-frame branch from 0ad2183 to df105d8 Compare September 6, 2019 20:17
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

3 similar comments
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

Minimal commit to get the mandatory combiner rolling.  The intent of the
mandatory combiner is to do basic transformations after the diagnostics
passes have run at the beginning of both the Onone and the performance
pipelines.  For now, it simply visits reachable instructions and does
no work.  In a subsequent commit, apply instructions will be processed
and replaced if they are calls to partial applies defined in the same
function.  At that point an attempt will be made to eliminate the
partial apply altogether.

For now, the pass does no work and is not part of any pipeline.
@nate-chandler nate-chandler force-pushed the add-mandatory-combiner-frame branch from df105d8 to 211e656 Compare September 6, 2019 23:19
@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test and merge

@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test and merge

@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test OS X platform

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean smoke test OS X platform

@gottesmm gottesmm merged commit 8779ce7 into swiftlang:master Sep 7, 2019
@nate-chandler nate-chandler deleted the add-mandatory-combiner-frame branch July 5, 2023 23:29
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