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

Backport MergeFunctions scheduling fix #123

Merged
merged 2 commits into from
Dec 8, 2021

Conversation

nikic
Copy link

@nikic nikic commented Dec 4, 2021

Add an -enable-merge-functions option to allow testing of function
merging as it will actually happen in the optimization pipeline.
Based on that add a test where we currently produce two identical
functions without merging them due to incorrect pass scheduling
under the new pass manager.

(cherry picked from commit 5b94037)
MergeFunctions (as well as HotColdSplitting an IROutliner) are
incorrectly scheduled under the new pass manager. The code makes
it look like they run towards the end of the module optimization
pipeline (as they should), while in reality the run at the start.
This is because the OptimizePM populated around them is only
scheduled later.

I'm fixing this by moving these three passes until after OptimizePM
to avoid splitting the function pass pipeline. It doesn't seem
important to me that some of the function passes run after these
late module passes.

Differential Revision: https://reviews.llvm.org/D115098

(cherry picked from commit ae7f468)
@nikic
Copy link
Author

nikic commented Dec 7, 2021

r? @cuviper or @nagisa

Copy link
Member

@cuviper cuviper left a comment

Choose a reason for hiding this comment

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

LGTM

@cuviper cuviper merged commit 940b668 into rust-lang:rustc/13.0-2021-09-30 Dec 8, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 13, 2021
Update LLVM submodule

Update LLVM submodule with recent cherry-picks. In particular:
 * rust-lang/llvm-project#123
 * rust-lang/llvm-project#124
vext01 pushed a commit to vext01/llvm-project that referenced this pull request Mar 25, 2024
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.

2 participants