From a9320538915eaa0f495d1fec897bfc3966413461 Mon Sep 17 00:00:00 2001 From: Siavash Zangeneh Date: Wed, 2 Mar 2022 13:44:53 -0600 Subject: [PATCH] Fix in TAGE-SC-L local history recovery (#133) Now saving the branch PC in each checkpoint, and using the correct PC for local history recovery. --- src/bp/template_lib/tagescl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bp/template_lib/tagescl.h b/src/bp/template_lib/tagescl.h index 095331ed..fc51398d 100644 --- a/src/bp/template_lib/tagescl.h +++ b/src/bp/template_lib/tagescl.h @@ -31,6 +31,7 @@ struct Tage_SC_L_Prediction_Info { bool tage_or_loop_prediction; SC_Prediction_Info sc; bool final_prediction; + uint64_t br_pc; }; class Tage_SC_L_Base { @@ -215,7 +216,7 @@ void Tage_SC_L::flush_branch_and_repair_state(int64_t branch_id, } if(CONFIG::USE_SC) { statistical_corrector_.local_recover_speculative_state( - br_pc, prediction_info.sc); + prediction_info.br_pc, prediction_info.sc); } } prediction_info_buffer_.deallocate_after(branch_id); @@ -279,4 +280,5 @@ void Tage_SC_L::update_speculative_state(int64_t branch_id, statistical_corrector_.update_speculative_state( br_pc, branch_dir, br_target, br_type, &prediction_info.sc); } + prediction_info.br_pc = br_pc; }