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

Investigate eliminate region_scope_tree #97426

Open
nikomatsakis opened this issue May 26, 2022 · 0 comments
Open

Investigate eliminate region_scope_tree #97426

nikomatsakis opened this issue May 26, 2022 · 0 comments
Labels
C-optimization Category: An issue highlighting optimization opportunities or PRs implementing such I-slow Issue: Problems and improvements with respect to performance of generated code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nikomatsakis
Copy link
Contributor

In #95563 and #97383, we found that computing the region_scope_tree is a non-trivial cost, especially in incremental builds. I was discussing with @dingxiangfei2009 and I am of the opinion that we can probably remove the region_scope_tree entirely now that we have moved over to the MIR borrow checker (i.e., NLL). We looked over the places that the region_scope_tree is used and it seems to be primarily dealing with "when do we run destructors". I think that we could probably just store the hir-id of statements and blocks and it's not important to model the full detail of the region-scope-tree. We didn't look closely into it though and it will require some detailed examination, so for now we are filing an issue to follow up on later.

@nikomatsakis nikomatsakis added I-slow Issue: Problems and improvements with respect to performance of generated code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 26, 2022
@workingjubilee workingjubilee added the C-optimization Category: An issue highlighting optimization opportunities or PRs implementing such label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-optimization Category: An issue highlighting optimization opportunities or PRs implementing such I-slow Issue: Problems and improvements with respect to performance of generated code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants