UoB-HPC / SimEng

The University of Bristol HPC Simulation Engine
https://uob-hpc.github.io/SimEng
Apache License 2.0
93 stars 20 forks source link

Bp update #422

Closed ABenC377 closed 2 months ago

ABenC377 commented 3 months ago

This update to the branch predictors (both Perceptron and Generic) replaces the hashmap that was previously being used to keep previous-state information between predict and update with a queue (called a Fetch Target Queue or FTQ) of previous-state information for the in-flight branches. The FTQ allows speculative updating of the global history (which is also included in this PR).

In terms of performance, it seems to be quite lateral. a full breakdown of stats across our benchmark suite is provided below. To summarise the results, most benchmarks have an improved misprediction rate with the update, but the changes in execution time are hit and miss with many becoming a bit slower (probably due to an increased number of interactions with the branch predictor through the pipeline).

I think this is still a worthwhile change to make to SimEng even though there isn't a clear-cut performance upgrade because it makes the flow of branches through the branch predictor more regular and so should facilitate more complicated branch predictors in the future (e.g., TAGE).