Hello, I'm studying on O3CPU, version 22.0.0.2. And I saw this in rename.Rename::squash(const InstSeqNum &squash_seq_num, ThreadID tid), starting from line 368,
// Squash any instructions from decode. for (int i=0; i<fromDecode->size; i++) { if (fromDecode->insts[i]->threadNumber == tid && fromDecode->insts[i]->seqNum > squash_seq_num) { fromDecode->insts[i]->setSquashed(); wroteToTimeBuffer = true; } } // Clear the instruction list and skid buffer in case they have any // insts in them. insts[tid].clear(); // Clear the skid buffer in case it has any data in it. skidBuffer[tid].clear(); My question is, the `fromDecode->inst` should already be inserted in variable `insts` in `sortInsts()`, but the code first set the fromDecode->insts[I] to squashed() by `fromDecode->insts[i]->setSquashed();` and clear the `insts` (The InstQueue), is this for-loop a redundant? In my opinion, these cleared instructions won't need the "squashed" information, it doesn't matter. -- Best regards, DPY ᐧ
_______________________________________________ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org