diff -r 47591444a7c5 src/cpu/o3/commit_impl.hh --- a/src/cpu/o3/commit_impl.hh Fri Mar 29 14:05:36 2013 -0500 +++ b/src/cpu/o3/commit_impl.hh Fri Mar 29 21:26:16 2013 -0500 @@ -1394,7 +1394,7 @@ // To match the old model, don't count nops and instruction // prefetches towards the total commit count. - if (!inst->isNop() && !inst->isInstPrefetch()) { + if (!inst->isInstPrefetch()) { cpu->instDone(tid, inst); } diff -r 47591444a7c5 src/cpu/o3/decode_impl.hh --- a/src/cpu/o3/decode_impl.hh Fri Mar 29 14:05:36 2013 -0500 +++ b/src/cpu/o3/decode_impl.hh Fri Mar 29 21:26:16 2013 -0500 @@ -684,15 +684,20 @@ DPRINTF(Decode, "[tid:%u]: Processing instruction [sn:%lli] with " "PC %s\n", tid, inst->seqNum, inst->pcState()); - if (inst->isSquashed()) { + if (inst->isSquashed() || inst->isNop()) { DPRINTF(Decode, "[tid:%u]: Instruction %i with PC %s is " - "squashed, skipping.\n", + "squashed/nop, skipping.\n", tid, inst->seqNum, inst->pcState()); ++decodeSquashedInsts; - --insts_available; + if (inst->isNop() && !inst->isSquashed()) { + DPRINTF(Decode, "[tid:%u]: Discarding nop [sn:%lli] with " + "PC %s\n", tid, inst->seqNum, inst->pcState()); + + cpu->instList.erase(inst->getInstListIt()); + } continue; } diff -r 47591444a7c5 src/cpu/o3/iew.hh --- a/src/cpu/o3/iew.hh Fri Mar 29 14:05:36 2013 -0500 +++ b/src/cpu/o3/iew.hh Fri Mar 29 21:26:16 2013 -0500 @@ -507,8 +507,6 @@ Stats::Scalar iewExecSquashedInsts; /** Number of executed software prefetches. */ Stats::Vector iewExecutedSwp; - /** Number of executed nops. */ - Stats::Vector iewExecutedNop; /** Number of executed meomory references. */ Stats::Vector iewExecutedRefs; /** Number of executed branches. */ diff -r 47591444a7c5 src/cpu/o3/iew_impl.hh --- a/src/cpu/o3/iew_impl.hh Fri Mar 29 14:05:36 2013 -0500 +++ b/src/cpu/o3/iew_impl.hh Fri Mar 29 21:26:16 2013 -0500 @@ -200,12 +200,6 @@ .desc("number of swp insts executed") .flags(total); - iewExecutedNop - .init(cpu->numThreads) - .name(name() + ".exec_nop") - .desc("number of nop insts executed") - .flags(total); - iewExecutedRefs .init(cpu->numThreads) .name(name() + ".exec_refs") @@ -1092,19 +1086,6 @@ inst->setCanCommit(); instQueue.insertBarrier(inst); add_to_iq = false; - } else if (inst->isNop()) { - DPRINTF(IEW, "[tid:%i]: Issue: Nop instruction encountered, " - "skipping.\n", tid); - - inst->setIssued(); - inst->setExecuted(); - inst->setCanCommit(); - - instQueue.recordProducer(inst); - - iewExecutedNop[tid]++; - - add_to_iq = false; } else if (inst->isExecuted()) { assert(0 && "Instruction shouldn't be executed.\n"); DPRINTF(IEW, "Issue: Executed branch encountered, "