cpu: Only iterate over possible threads on the o3 cpu

Some places in O3 always iterated over "Impl::MaxThreads" even if a CPU had
fewer threads.  This removes a few of those instances.
This commit is contained in:
Mitch Hayenga 2014-09-09 04:36:34 -04:00
parent 9a595fac74
commit cd1bd7572a

View file

@ -419,7 +419,7 @@ template <class Impl>
void void
DefaultFetch<Impl>::drainResume() DefaultFetch<Impl>::drainResume()
{ {
for (ThreadID i = 0; i < Impl::MaxThreads; ++i) for (ThreadID i = 0; i < numThreads; ++i)
stalls[i].drain = false; stalls[i].drain = false;
} }
@ -887,7 +887,7 @@ DefaultFetch<Impl>::tick()
wroteToTimeBuffer = false; wroteToTimeBuffer = false;
for (ThreadID i = 0; i < Impl::MaxThreads; ++i) { for (ThreadID i = 0; i < numThreads; ++i) {
issuePipelinedIfetch[i] = false; issuePipelinedIfetch[i] = false;
} }
@ -927,7 +927,7 @@ DefaultFetch<Impl>::tick()
} }
// Issue the next I-cache request if possible. // Issue the next I-cache request if possible.
for (ThreadID i = 0; i < Impl::MaxThreads; ++i) { for (ThreadID i = 0; i < numThreads; ++i) {
if (issuePipelinedIfetch[i]) { if (issuePipelinedIfetch[i]) {
pipelineIcacheAccesses(i); pipelineIcacheAccesses(i);
} }