Skip to content

Conversation

qwe661234
Copy link
Collaborator

@qwe661234 qwe661234 commented Feb 23, 2024

Considering the T1C ends with the indirect jump, our interpreter mode now records the target of the indirect jump, identifying the most frequent jump target for T1C. The T1 generated code for the indirect jump compares the selected jump target and executes the jump if the comparison results in equality. With this enhancement, T1C and T2C which are integrated later can proceed with an indirect jump if the target PC matches the selected jump target.

Based on the performance analysis, the benchmarks with significant number of indirect jump effectively improve the performance.

Metric N_in_jmp Original Propused Speedup
miniz 2098313 1.266 s 1.225 s +3.35%
sha512 10500727 1.905 s 1.861 s +2.36%
dhrystone 20000618 0.325 s 0.253 s +28.46%
nqueens 44658722 1.051 s 0.79 s +33.04%
qsort 275000250 1.978 s 1.517 s +30.39%

Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix typo and improve the descriptions about the beneficial scenario in git commit messages.

Considering the T1C ends with the indirect jump, our interpreter mode
now records the target of the indirect jump, identifying the most
frequent jump target for T1C. The T1 generated code for the indirect
jump compares the selected jump target and executes the jump if the
comparison results in equality. With this enhancement, T1C and T2C
which are integrated later can proceed with an indirect jump if the
target PC matches the selected jump target.

Based on the performance analysis, the benchmarks with significant
number of indirect jump effectively improve the performance.

| Metric   | N_in_jmp  | Original | Propused | Speedup |
|----------+-----------+----------+----------+---------|
|miniz	   |    2098313|   1.266 s|   1.225 s|   +3.35%|
|sha512    |   10500727|   1.905 s|   1.861 s|   +2.36%|
|dhrystone |   20000618|   0.325 s|   0.253 s|  +28.46%|
|nqueens   |   44658722|   1.051 s|    0.79 s|  +33.04%|
|qsort	   |  275000250|   1.978 s|   1.517 s|  +30.39%|
@jserv jserv merged commit dc13bec into sysprog21:master Feb 25, 2024
@jserv jserv added this to the release-2024.1 milestone Apr 30, 2024
vestata pushed a commit to vestata/rv32emu that referenced this pull request Jan 24, 2025
Improve the performance of indirect jump for T1C
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.

2 participants