From e57ab463cff5df095fbd10ef046436a20dbb8f3a Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Wed, 11 Feb 2015 10:48:53 -0800 Subject: mem: remove redundant test in in Cache::recvTimingResp() For some reason we were checking mshr->hasTargets() even though we had already called mshr->getTarget() unconditionally earlier in the same function (which asserts if there are no targets). Get rid of this useless check, and while we're at it get rid of the redundant call to mshr->getTarget(), since we still have the value saved in a local var. --- src/mem/cache/cache_impl.hh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/mem/cache/cache_impl.hh') diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 8a038416e..ab475445e 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -1128,11 +1128,7 @@ Cache::recvTimingResp(PacketPtr pkt) } // First offset for critical word first calculations - int initial_offset = 0; - - if (mshr->hasTargets()) { - initial_offset = mshr->getTarget()->pkt->getOffset(blkSize); - } + int initial_offset = initial_tgt->pkt->getOffset(blkSize); while (mshr->hasTargets()) { MSHR::Target *target = mshr->getTarget(); -- cgit v1.2.3