Louis Delhez (Gerrit)
2018-11-26 22:02:14 UTC
Louis Delhez has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/14635
Change subject: cpu: Use correct way index in the LTAGE loop predictor
......................................................................
cpu: Use correct way index in the LTAGE loop predictor
The first way was always used in specLoopUpdate regardless of the branch.
Change-Id: I03d1abb955cbfe3600b141a91282e1077562645a
---
M src/cpu/pred/ltage.cc
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/pred/ltage.cc b/src/cpu/pred/ltage.cc
index d6cc087..6aa76c2 100644
--- a/src/cpu/pred/ltage.cc
+++ b/src/cpu/pred/ltage.cc
@@ -311,7 +311,7 @@
LTAGE::specLoopUpdate(Addr pc, bool taken, BranchInfo* bi)
{
if (bi->loopHit>=0) {
- int index = lindex(pc);
+ int index = bi->loopIndex + bi->loopHit;
if (taken != ltable[index].dir) {
ltable[index].currentIterSpec = 0;
} else {
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14635
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I03d1abb955cbfe3600b141a91282e1077562645a
Gerrit-Change-Number: 14635
Gerrit-PatchSet: 1
Gerrit-Owner: Louis Delhez <***@ucla.edu>
Gerrit-MessageType: newchange
https://gem5-review.googlesource.com/c/public/gem5/+/14635
Change subject: cpu: Use correct way index in the LTAGE loop predictor
......................................................................
cpu: Use correct way index in the LTAGE loop predictor
The first way was always used in specLoopUpdate regardless of the branch.
Change-Id: I03d1abb955cbfe3600b141a91282e1077562645a
---
M src/cpu/pred/ltage.cc
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/pred/ltage.cc b/src/cpu/pred/ltage.cc
index d6cc087..6aa76c2 100644
--- a/src/cpu/pred/ltage.cc
+++ b/src/cpu/pred/ltage.cc
@@ -311,7 +311,7 @@
LTAGE::specLoopUpdate(Addr pc, bool taken, BranchInfo* bi)
{
if (bi->loopHit>=0) {
- int index = lindex(pc);
+ int index = bi->loopIndex + bi->loopHit;
if (taken != ltable[index].dir) {
ltable[index].currentIterSpec = 0;
} else {
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14635
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I03d1abb955cbfe3600b141a91282e1077562645a
Gerrit-Change-Number: 14635
Gerrit-PatchSet: 1
Gerrit-Owner: Louis Delhez <***@ucla.edu>
Gerrit-MessageType: newchange