nir: Rewinding in nir_opt_algebraic()
In !2000 (closed) I proposed a change to fix O(n^2) behavior in algebraic on the CTS by running algebraic top-to-bottom along with bottom-to-top. @cwabbott0 suggested that we could use the automaton to figure out how far back we needed to step the IP after a replacement. Slightly improves shader-db time, but is a big win for the affected CTS tests, and shader-db optimization results appear to be in the noise (<.01% changes on intel and freedreno)
This series is based on !2104 (merged)