forked from sysprog21/rv32emu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Substitute memset/memcpy calls with faster alternatives
1. Because RISC-V use jal instruction as function call, so we remove recursive jump tranlation to detect function call. 2. To identify memset/memcpy, we analyze the pattern of the first basic block of memset/memcpy for comparison. If the basic block aligns with the pattern, we extract the instruction sequence starting from the initial PC of the basic block and then compare it with the pre-recorded memset/memcpy instruction sequence.Upon detecting a memset/memcpy, we substitute the basic block with the standard library function memset/memcpy. Based on performance results below, we gain 3% performance improvement when running coreMark and lost 1% performance when running dhrysone. The performance impact is resulted in the number of invoking memset/memcpy times. * Intel Core i7-11700 | Metric | origin | proposed |Speedup| |------------+---------+----------+-------| | Dhrystone | 1413.11 | 1447.11 | +2% | | CoreMark | 1497.35 | 1525.31 | +2% | See: sysprog21#153
- Loading branch information
Showing
1 changed file
with
271 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters