Extend two existing opt passes and add one new pass to collapse
serial/dynamic-index structures that were leaving high logic depth:
- opt_first_fit_alloc: recognize the "coalesce-matrix" first-fit
allocator variant (same_cat[i][k] coalescing gated on the leader's
enable, driven from a raw input enable). Rewrite both the lane_slot
allocation and the xbar field gather from one shared log-depth scan.
- opt_prienc: detect round-robin / rotated-priority scans (req scanned
from idx_last downward with wraparound) and rewrite the depth-N
idx--/req[idx] mux chain to rotate -> log-depth priority-encode ->
unrotate.
- opt_priokey (new): recognize priority-by-key one-hot accumulators and
replace each dynamic taken[key] read ($shiftx/$bmux) with the
equivalent pairwise-key-compare reduction, dropping the wide dynamic
indexing. Supports -strict for full-key-range formal validation.
Each includes self-contained tests (equiv_opt / sat -prove-asserts,
mux-bound and negative cases) in tests/opt/.
Co-authored-by: Cursor <cursoragent@cursor.com>