RISC-V: Concatenate block at next address when possible.
Closes RV-228.
What
When encountering a block on address translation, the interpreter now checks whether the new block can be appended to the one currently being built.
Why
It is often the case that two sequential blocks are very often ran together, so combining them together will save the overhead of exiting and running a new block.
How
Each time a new instruction is added to a current block, the next instruction is checked to see if a block exists there. If it does, and the block is suitable to be appended (the size of it would fit in the current block, and the fence counter matches), then it is appended.
Manually Testing
make -C src/riscv all
Benchmarking
master |
This MR | Improvement | |
|---|---|---|---|
| M3 MBP | 3.482 TPS | 3.723 TPS | 6.92% |
| Benchmark Machine | 2.642 TPS | 2.869 TPS | 8.59% |
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. make -C src/riscvdune build src/lib_riscvdune build src/rust_deps
-
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 Neelay Sant