Skip to content

Investigate eliminate region_scope_tree #97426

Open
@nikomatsakis

Description

@nikomatsakis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchI-slowIssue: Problems and improvements with respect to performance of generated code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions