[go: up one dir, main page]

RISC-V: inline parser & split cache paths for compressed/uncompressed

Relates to RV-172

What

Inline the parser into fetch_instr and write to the instruction cache on separate paths for compressed vs uncompressed instructions.

Why

Doing so allows the elimination of a check on the cache_uncompressed path. We do not allow caching of an instruction that crosses page boundaries - which only applies for uncompressed instructions.

While this has limited immediate impact, as the instruction cache always stores instructions as u32 in the state - it makes more of an impact for the block cache - as instructions are stored as u16 or u32 directly. Splitting caching paths allows avoiding a check on the u32 to determine if it's 'actually' compressed or not.

Manually Testing

make -C src/riscv all

Benchmarking

master This MR Improvement
$MyMachine 0.325 TPS (1/923 native) 0.339 TPS (1/885 native) +4.3%
Benchmark Machine 0.150 TPS (1/1033 native) 0.151 TPS (1/1026 native) +0.7%

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.
/assign @ole.kruger
/assign @victor-dumitrescu
/assign @felix.puscasu1
/assign @anastasia.courtney
/assign @emturner

/assign_reviewer @ole.kruger
/assign_reviewer @victor-dumitrescu
/assign_reviewer @felix.puscasu1
/assign_reviewer @anastasia.courtney
/assign_reviewer @emturner

/unassign me
/unassign_reviewer me

/ready
Edited by Emma Turner

Merge request reports

Loading