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

Instantiate dominators algorithm only once #107151

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Jan 21, 2023

Remove inline from BasicBlocks::dominators to instantiate the dominator algorithm only once - in the rustc_middle crate.

Remove inline from BasicBlocks::dominators to instantiate the dominator
algorithm only once - in the rustc_middle crate.
@rustbot
Copy link
Collaborator

rustbot commented Jan 21, 2023

r? @davidtwco

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 21, 2023
@compiler-errors
Copy link
Member

Does this have perf implications? Or else what's the motivation for this?

@tmiasko
Copy link
Contributor Author

tmiasko commented Jan 22, 2023

Motivation is to avoid code generation of multiple copies of the same code (in optimized builds generic code is instantiated in each crate that uses it).

@compiler-errors
Copy link
Member

I guess there's not much harm in this. dominators is a pretty big function.

@bors r+ (unless @tmiasko thinks this needs a perf run, in which case I'm assuming it would've been started already)

@bors
Copy link
Contributor

bors commented Jan 22, 2023

📌 Commit ae39ee2 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 22, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 23, 2023
Rollup of 7 pull requests

Successful merges:

 - rust-lang#106796 (BPF: Disable atomic CAS)
 - rust-lang#106886 (Make stage2 rustdoc and proc-macro-srv disableable in x.py install)
 - rust-lang#107101 (Filter param-env predicates for errors before calling `to_opt_poly_trait_pred`)
 - rust-lang#107109 (ThinBox: Add intra-doc-links for Metadata)
 - rust-lang#107148 (remove error code from `E0789`, add UI test/docs)
 - rust-lang#107151 (Instantiate dominators algorithm only once)
 - rust-lang#107153 (Consistently use dominates instead of is_dominated_by)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c0f80e7 into rust-lang:master Jan 23, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 23, 2023
@tmiasko tmiasko deleted the dominators-no-inline branch January 23, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants