[go: up one dir, main page]

RISC-V: dispatch instr functions during block construction

  • closes RV-296
  • closes RV-179

What

Dispatch Instruction::run_* during block construction.

Why

This avoids a match on every single instruction run, and instead use the pre-dispatched function over the state directly.

How

We leverage the EnrichedCell introduced in !15595 (merged) - we derive the function to run from the given opcode when we write the instruction into the block cache.

Manually Testing

make -C src/riscv all

Benchmarking

!15595 (merged) This MR Improvement
AMD Ryzen 7 7840U 3.193 TPS 3.881 TPS +21.5%
Benchmark Machine 2.452 TPS 2.937 TPS +19.8%

Tasks for the Author

  • Link all Linear issues related to this MR using magic words (e.g. part of, relates to, closes).
  • Eliminate dead code and other spurious artefacts introduced in your changes.
  • Document new public functions, methods and types.
  • Make sure the documentation for updated functions, methods, and types is correct.
  • Add tests for bugs that have been fixed.
  • Put in reasonable effort to ensure that CI will pass.
  • Benchmark performance and populate the table above if needed.
  • Write commit messages to reflect the changes they're about.
  • Self-review your changes to ensure they are high-quality.
  • Complete all of the above before assigning this MR to reviewers.
Edited by Emma Turner

Merge request reports

Loading