Skip to content

Commit 2ac6ecb

Browse files
committed
cpu-o3: filter not resolved btb entries in ittage resolve update
Change-Id: I13a7033fce6096dd2ad7a5e3c58f935486b28a63
1 parent 9d21f10 commit 2ac6ecb

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/cpu/pred/btb/btb_ittage.cc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,17 @@ BTBITTAGE::update(const FetchStream &stream)
219219
all_entries_to_update.push_back(stream.updateNewBTBEntry);
220220
}
221221

222-
// only update indirect branches that are not returns
223-
auto remove_it = std::remove_if(all_entries_to_update.begin(), all_entries_to_update.end(),
224-
[](const BTBEntry &e) { return !(e.isIndirect && !e.isReturn); });
225-
all_entries_to_update.erase(remove_it, all_entries_to_update.end());
222+
// // only update indirect branches that are not returns
223+
if (getResolvedUpdate()) {
224+
auto remove_it =
225+
std::remove_if(all_entries_to_update.begin(), all_entries_to_update.end(),
226+
[](const BTBEntry &e) { return !(e.isIndirect && !e.isReturn && e.resolved); });
227+
all_entries_to_update.erase(remove_it, all_entries_to_update.end());
228+
} else {
229+
auto remove_it = std::remove_if(all_entries_to_update.begin(), all_entries_to_update.end(),
230+
[](const BTBEntry &e) { return !(e.isIndirect && !e.isReturn); });
231+
all_entries_to_update.erase(remove_it, all_entries_to_update.end());
232+
}
226233

227234
// get tage predictions from meta
228235
// TODO: use component idx

0 commit comments

Comments
 (0)