Skip to content
Snippets Groups Projects
Commit faa3f49b authored by Mike Vitousek's avatar Mike Vitousek
Browse files

[compiler] Migrate PruneNonEscapingScopes to HIR

Summary:
PruneNonEscapingScopes does a pretty powerful escape analysis, which we might want to apply for other purposes in our HIR passes. This ports this pass to HIR. For the most part, this implementation is identical to the ReactiveFunction version. It now handles phis instead of conditional ReactiveExpressions, which it does by treating all the phi operands as possibly aliasing the lvalue. This also requires that we iterate the aliasing analysis to a fixpoint, because the HIR has backedges which the ReactiveFunctions don't.

In our fixtures, this only changes one result, which appears to have become more accurate. I plan on testing this internally in a sync before landing.

ghstack-source-id: 63aad5c97e8bd6ea58fb1363854d081f50a31fa3
Pull Request resolved: https://github.com/facebook/react/pull/31882
parent 6907aa2a
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment