diff -r a440c1e9ccfb -r e490e8f78f64 src/cpu/o3/commit.hh --- a/src/cpu/o3/commit.hh Sat Feb 28 16:44:18 2015 -0600 +++ b/src/cpu/o3/commit.hh Sat Feb 28 16:46:53 2015 -0600 @@ -246,11 +246,6 @@ */ void updateStatus(); - /** Sets the next status based on threads' statuses, which becomes the - * current status at the end of the cycle. - */ - void setNextStatus(); - /** Returns if any of the threads have the number of ROB entries changed * on this cycle. Used to determine if the number of free ROB entries needs * to be sent back to previous stages. @@ -392,9 +387,6 @@ */ bool changedROBNumEntries[Impl::MaxThreads]; - /** A counter of how many threads are currently squashing. */ - ThreadID squashCounter; - /** Records if a thread has to squash this cycle due to a trap. */ bool trapSquash[Impl::MaxThreads]; diff -r a440c1e9ccfb -r e490e8f78f64 src/cpu/o3/commit_impl.hh --- a/src/cpu/o3/commit_impl.hh Sat Feb 28 16:44:18 2015 -0600 +++ b/src/cpu/o3/commit_impl.hh Sat Feb 28 16:46:53 2015 -0600 @@ -96,7 +96,6 @@ template DefaultCommit::DefaultCommit(O3CPU *_cpu, DerivO3CPUParams *params) : cpu(_cpu), - squashCounter(0), iewToCommitDelay(params->iewToCommitDelay), commitToIEWDelay(params->commitToIEWDelay), renameToROBDelay(params->renameToROBDelay), @@ -460,7 +459,6 @@ tcSquash[tid] = false; squashAfterInst[tid] = NULL; } - squashCounter = 0; rob->takeOverFrom(); } @@ -509,32 +507,6 @@ } template -void -DefaultCommit::setNextStatus() -{ - int squashes = 0; - - list::iterator threads = activeThreads->begin(); - list::iterator end = activeThreads->end(); - - while (threads != end) { - ThreadID tid = *threads++; - - if (commitStatus[tid] == ROBSquashing) { - squashes++; - } - } - - squashCounter = squashes; - - // If commit is currently squashing, then it will have activity for the - // next cycle. Set its next status as active. - if (squashCounter) { - _nextStatus = Active; - } -} - -template bool DefaultCommit::changedROBEntries() { @@ -856,6 +828,8 @@ list::iterator threads = activeThreads->begin(); list::iterator end = activeThreads->end(); + int num_squashing_threads = 0; + while (threads != end) { ThreadID tid = *threads++; @@ -941,11 +915,18 @@ } } + if (commitStatus[tid] == ROBSquashing) { + num_squashing_threads++; + } } - setNextStatus(); + // If commit is currently squashing, then it will have activity for the + // next cycle. Set its next status as active. + if (num_squashing_threads) { + _nextStatus = Active; + } - if (squashCounter != numThreads) { + if (num_squashing_threads != numThreads) { // If we're not currently squashing, then get instructions. getInsts();