Investigate eliminate region_scope_tree
#97426
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.
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 theregion_scope_tree
entirely now that we have moved over to the MIR borrow checker (i.e., NLL). We looked over the places that theregion_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.The text was updated successfully, but these errors were encountered: