The library for web and native user interfaces.
Mirrored from https://github.com/247TaxiDriver/QOS-React.git
Synced Nov 14, 05:30 UTC
[LeaveSSA] Process all phis in a block
I don't know if it's possible to write a test for this as I can't seem to get the codegen to change. For the following testcase: ``` function useFoo(setOne) { let x; let y; if (setOne) { x = 1; y = 3; } else { x = 2; y = 5; } return { x, y }; } ``` The LeaveSSA changes from: ``` .... bb1 (block): predecessor blocks: bb2 bb3 x$36:TPrimitive: phi(bb2: x$19, bb3: x$19) y$21[8:14]:TPrimitive: phi(bb2: y$21, bb3: y$21) ... ``` to ``` ... bb1 (block): predecessor blocks: bb2 bb3 x$36:TPrimitive: phi(bb2: x$19, bb3: x$19) y$38:TPrimitive: phi(bb2: y$21, bb3: y$21) ... ``` Notice how `y`'s reassignment got skipped previously.