Skip to content

chore(brillig): Make codegen_mov_registers_to_registers general again and use it in jmp - #13307

Open
aakoshh wants to merge 4 commits into
masterfrom
af/general-parallel-move
Open

chore(brillig): Make codegen_mov_registers_to_registers general again and use it in jmp#13307
aakoshh wants to merge 4 commits into
masterfrom
af/general-parallel-move

Conversation

@aakoshh

@aakoshh aakoshh commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Problem Resolved

One of the phases in #13302

#10305 made this routine iterative, but also added a constraint that made it usable only for return values. This could have been used in linear scan during jumps; the current jmp handler used an ad-hoc method that grabs more temporary registers than the general routine would do to handle cycles.

Summary of Changes

  • Refactor codegen_mov_registers_to_registers to remove the restriction that destinations have to be consecutive memory registers
  • Update codegen_mov_registers_to_registers to handle a condition and emit conditional_mov.
  • Call codegen_mov_registers_to_registers from jmp_setup
  • Added a before/after test to show that a block which rotates its parameters (a cycle) now requires just 1 temporary registers, instead of as many as there are parameters being passed.

User Documentation

Check one:

  • No user documentation needed.
  • Documented in docs/.
  • [For Experimental Features] Documentation tracking issue created:

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@aakoshh
aakoshh marked this pull request as ready for review July 8, 2026 12:10
@aakoshh
aakoshh requested review from a team and jfecher and removed request for a team July 8, 2026 12:11
aakoshh added a commit that referenced this pull request Jul 8, 2026
… in jmp

Phase 0 prerequisite for the pluggable allocator seam (Phase 0.5).
resolve_edge will wrap the revived any-to-any mover this introduces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant