From 2b62fec3590024a7ce82ef5d4647397d37ed37eb Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Sat, 11 May 2019 21:41:14 +0800 Subject: try not expose if L1 hit --- src/cpu/o3/lsq_unit_impl.hh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'src/cpu/o3/lsq_unit_impl.hh') diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh index 164a768bb..56870b5a3 100644 --- a/src/cpu/o3/lsq_unit_impl.hh +++ b/src/cpu/o3/lsq_unit_impl.hh @@ -1197,6 +1197,23 @@ LSQUnit::exposeLoads() load_inst->postSreqHigh->getVaddr()); } + bool split = false; + if (TheISA::HasUnalignedMemAcc && sreqLow) { + split = true; + } else { + assert(req); + } + + if (load_inst->isL1HitLow() && (!split || load_inst->isL1HitHigh()) ) { + load_inst->setExposeCompleted(); + load_inst->setExposeSent(); + --loadsToVLD; + incrLdIdx(loadVLDIdx); + iewStage->instToCommit(load_inst); + iewStage->activityThisCycle(); + continue; + } + PacketPtr data_pkt = NULL; PacketPtr snd_data_pkt = NULL; @@ -1206,13 +1223,6 @@ LSQUnit::exposeLoads() state->inst = load_inst; state->noWB = true; - bool split = false; - if (TheISA::HasUnalignedMemAcc && sreqLow) { - split = true; - } else { - assert(req); - } - bool onlyExpose = false; if (!split) { if (load_inst->needExposeOnly() || load_inst->isL1HitLow()){ @@ -1325,10 +1335,6 @@ LSQUnit::exposeLoads() ++lsqCacheBlocked; break; } else { - // Here is to fix memory leakage - // it is ugly, but we have to do it now. - load_inst->needDeletePostReq(false); - // if all the packets we sent out is expose, // we assume the expose is alreay completed if (onlyExpose) { -- cgit v1.2.3