Commit 2040e14
committed
linker: batch mem2reg to process all variables in a single pass
mem2reg processed each variable independently.
This O(V*N) complexity caused multi-minute hangs on large post-inline
functions.
Batch all operations into single passes over the instructions.
Fixes #546. Measured on the proof-of-space-gpu shader:
mem2reg drops from 228s to 18s (13x), total link from 236s to 26s.
Also adds unit tests.1 parent 3089687 commit 2040e14
1 file changed
+804
-145
lines changed
0 commit comments