Optimize performance of icache #1543
Labels
area: performance
Issue involves performance issues
effort: weeks
Expect this issue to require weeks or more of invested effort to resolve
type: feature-non-IEEE
Request to add new feature, outside IEEE 1800
Author Name: Wilson Snyder (@wsnyder)
Original Redmine Issue: 1543 from https://www.veripool.org
Feature tracking bug.
The biggest performance cost presently is icache pressure. We should figure out techniques to improve icache performance as this has the potential for 2x performance gains.
First we need to hand-craft some experiments and possible solutions so we find a good path.
One idea is this:
One idea is to build new functions with generic input/outputs, then call those functions (basically reverse-inline). This will result in more instructions, but less code size which will typically be beneficial especially if no branches are used. One possible method:
Build a graph of common code and sights referencing that code. This will look though the existing statements and convert I/O to that statement to generic variables. The code at that point forms a potential function which references those variables generically. If the number of vars is small, hash the potential function, so we now have a function signature, and create a graph from the potential call sight to the potential function. Once the graph is built, find frequent common signatures, build a function corresponding signature, and replace the original logic with calls to that function.
Note Verilator presently has a V3Combine step that finds multiple functions with identical code and combines them into a single function, but this is very limited.
The text was updated successfully, but these errors were encountered: