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.
This commit is contained in:
Steve Reinhardt 2015-02-11 10:48:53 -08:00
parent 89bb03a1a6
commit e57ab463cf

View file

@ -1128,11 +1128,7 @@ Cache<TagStore>::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();