mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Update base for Update on "compiler: allow reordering of loadlocal after last assignment"
Extends the instruction reordering from the previous PR to allow reordering LoadLocal, but only after the last assignment of the loaded variable. Thus if we have: ``` t0 = StoreLocal const x = ... t1 = LoadLocal x t2 = foo t3 = bar t1 # t1 used here ``` We know that x isn't assigned after the first instruction, and can safely reorder the loadlocal to where it's first used: ``` t0 = StoreLocal const x = ... t2 = foo t1 = LoadLocal x t3 = bar t1 ``` Note that this assumes each LoadLocal temporary is used exactly once, which we already guarantee in BuildHIR. [ghstack-poisoned]
This commit is contained in: