Skip to content

[herd] New implementation of solve-regs#1694

Closed
HadrienRenaud wants to merge 2 commits intoherd:masterfrom
HadrienRenaud:new-solve-regs
Closed

[herd] New implementation of solve-regs#1694
HadrienRenaud wants to merge 2 commits intoherd:masterfrom
HadrienRenaud:new-solve-regs

Conversation

@HadrienRenaud
Copy link
Copy Markdown
Collaborator

@HadrienRenaud HadrienRenaud commented Feb 2, 2026

This PR proposes a new way to compute read-from maps in registers.

Assumptions

  1. the order given by the event IDs is a linearisation of po | iico_data | iico_ctrl

Commits

  • [herd,asl] Make sure to generate the events in the correct order. (Make sure that assumption 1 is valid for ASL).
  • [herd] Implement solve_reg as a simple iteration on the event list

Performance

Comparing the output of make build && time make test-asl-vmsa test-aarch64-asl cata-test-asl on master, new-transitive-closure (#1690), current and current rebased on top of new-transitive-closure, we have:

branch time output
master 410.46s user 10.51s system 680% cpu 1:01.88 total
new-solve-regs 370.98s user 9.63s system 694% cpu 54.822 total
new-transitive-closure 193.03s user 7.33s system 654% cpu 30.601 total
new-solve-regs+new-transitive-closure 155.14s user 8.13s system 741% cpu 22.023 total

@HadrienRenaud
Copy link
Copy Markdown
Collaborator Author

HadrienRenaud commented Feb 9, 2026

Supplemented by #1704: main reason is that this PR is too brittle and the assumptions are too strong.

HadrienRenaud added a commit that referenced this pull request Feb 12, 2026
[herd] Improve implementation of solve-reg

This PR proposes a series of refactos to the algorithm constructing the read-from map in registers. The main performance gains are won in the first commit by using a forgotten memoisation. The following commits improve readability and bring slightly better performances.

This is a re-implementation of #1694, following feedback from @maranget. In short, the implementation in #1694, while faster, is too brittle and relies on too strong assumptions.
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