cpu: implement L-TAGE branch predictor
Review Request #3743 - Created Nov. 22, 2016 and submitted
| Information | |
|---|---|
| Arthur Perais | |
| gem5 | |
| Reviewers | |
| Default | |
Changeset 11707:1d085f66c4ca
cpu: implement an L-TAGE branch predictor
This patch implements an L-TAGE predictor, based on André Seznec's code available from
CBP-2 (http://hpca23.cse.tamu.edu/taco/camino/cbp2/cbp-src/realistic-seznec.h). The
patch also changes the default branch predictor of o3 from the tournament predictor
to L-TAGE.This patch requires patch #3727 (http://reviews.gem5.org/r/3727/) to compile.
A few thing below. Overall, could you please add more comments? No need to write the entire TAGE paper in the comments, but a little high-level information would help new people coming to this code a lot.
-
src/cpu/o3/O3CPU.py (Diff revision 1) -
I'm not sure we want to make the TAGE predictor the default. Are there any products that use something like the TAGE predictor?
Alternatively, if the tournamentBP is much worse than current products, I can see the argument for make the TAGE predictor the default.
-
src/cpu/pred/BranchPredictor.py (Diff revision 1) -
Is the global history really 128 megabytes?
I'm not very familiar with the TAGE predictor. Does a real implementation somehow reduce this size and you're making a simplifying assumtion here?
-
src/cpu/pred/ltage.hh (Diff revision 1) -
Can you add some comments on all of these functions? Doxygen comments would be best.
-
src/cpu/pred/ltage.cc (Diff revision 1) -
I'm not sure if you're really using "histBufferSize" as a "MemorySize". This seems to just be a count that defaults to 2**27. Is this really a MemorySize?
Change Summary:
Modified patch according to comments (Tournament is still default, added comments, history size).
Diff: |
Revision 2 (+1167) |
|---|
Ship It!
Thanks for the updates. I'm still not clear on the histBufferSize (as detailed below).
-
src/cpu/pred/BranchPredictor.py (Diff revision 2) -
Comment is now wrong.
Also, does it make more sense to call this histBufferEntries (or histBufferBits) and make the default 221? (or would it be 221*8? <-- this is the confusion.)
I think it would be more clear to use bits or entries, personally. But if the branch predictor papers usually talk about the history buffer in terms of bytes instead of bits, I guess the current version makes more sense.
Thanks
-
src/cpu/pred/ltage.hh (Diff revision 2) -
Why not use a vector<bool>? This is what it's actually representing, correct?
I would argue for using the datatype that makes it most clear to future people reading this code.
Change Summary:
Fixed various comments and parameter type (in python config file) for the global history buffer size
Diff: |
Revision 3 (+1168) |
|---|
Ship It!
