inorder: remove reqRemoveList
we are going to be getting away from creating new resource requests for every instruction so no more need to keep track of a reqRemoveList and clean it up every tick
This commit is contained in:
parent
991d0185c6
commit
ff48afcf4f
|
@ -636,8 +636,7 @@ InOrderCPU::tick()
|
|||
}
|
||||
activityRec.advance();
|
||||
|
||||
// Any squashed requests, events, or insts then remove them now
|
||||
cleanUpRemovedReqs();
|
||||
// Any squashed events, or insts then remove them now
|
||||
cleanUpRemovedEvents();
|
||||
cleanUpRemovedInsts();
|
||||
|
||||
|
@ -1435,28 +1434,6 @@ InOrderCPU::cleanUpRemovedInsts()
|
|||
removeInstsThisCycle = false;
|
||||
}
|
||||
|
||||
void
|
||||
InOrderCPU::cleanUpRemovedReqs()
|
||||
{
|
||||
while (!reqRemoveList.empty()) {
|
||||
ResourceRequest *res_req = reqRemoveList.front();
|
||||
|
||||
DPRINTF(RefCount, "[tid:%i] [sn:%lli]: Removing Request "
|
||||
"[stage_num:%i] [res:%s] [slot:%i] [completed:%i].\n",
|
||||
res_req->inst->threadNumber,
|
||||
res_req->inst->seqNum,
|
||||
res_req->getStageNum(),
|
||||
res_req->res->name(),
|
||||
(res_req->isCompleted()) ?
|
||||
res_req->getComplSlot() : res_req->getSlot(),
|
||||
res_req->isCompleted());
|
||||
|
||||
reqRemoveList.pop();
|
||||
|
||||
delete res_req;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
InOrderCPU::cleanUpRemovedEvents()
|
||||
{
|
||||
|
|
|
@ -593,10 +593,7 @@ class InOrderCPU : public BaseCPU
|
|||
/** Cleans up all instructions on the instruction remove list. */
|
||||
void cleanUpRemovedInsts();
|
||||
|
||||
/** Cleans up all instructions on the request remove list. */
|
||||
void cleanUpRemovedReqs();
|
||||
|
||||
/** Cleans up all instructions on the CPU event remove list. */
|
||||
/** Cleans up all events on the CPU event remove list. */
|
||||
void cleanUpRemovedEvents();
|
||||
|
||||
/** Debug function to print all instructions on the list. */
|
||||
|
@ -626,11 +623,6 @@ class InOrderCPU : public BaseCPU
|
|||
*/
|
||||
std::queue<ListIt> removeList;
|
||||
|
||||
/** List of all the resource requests that will be removed at the end
|
||||
* of this cycle.
|
||||
*/
|
||||
std::queue<ResourceRequest*> reqRemoveList;
|
||||
|
||||
/** List of all the cpu event requests that will be removed at the end of
|
||||
* the current cycle.
|
||||
*/
|
||||
|
|
|
@ -990,20 +990,6 @@ PipelineStage::processInstSchedule(DynInstPtr inst,int &reqs_processed)
|
|||
cpu->activateNextReadyContext();
|
||||
}
|
||||
|
||||
// Mark request for deletion
|
||||
// if it isnt currently being used by a resource
|
||||
if (!req->hasSlot()) {
|
||||
DPRINTF(InOrderStage, "[sn:%i] Deleting Request, has no "
|
||||
"slot in resource.\n", inst->seqNum);
|
||||
|
||||
cpu->reqRemoveList.push(req);
|
||||
} else {
|
||||
DPRINTF(InOrderStage, "[sn:%i] Ignoring Request Deletion, "
|
||||
"in resource [slot:%i].\n", inst->seqNum,
|
||||
req->getSlot());
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -322,9 +322,6 @@ Resource::squash(DynInstPtr inst, int stage_num, InstSeqNum squash_seq_num,
|
|||
if (resourceEvent[req_slot_num].scheduled())
|
||||
unscheduleEvent(req_slot_num);
|
||||
|
||||
// Mark request for later removal
|
||||
cpu->reqRemoveList.push(req_ptr);
|
||||
|
||||
// Mark slot for removal from resource
|
||||
slot_remove_list.push_back(req_ptr->getSlot());
|
||||
}
|
||||
|
@ -456,14 +453,6 @@ ResourceRequest::done(bool completed)
|
|||
// Used for debugging purposes
|
||||
if (completed) {
|
||||
complSlotNum = slotNum;
|
||||
|
||||
// Would like to start a convention such as all requests deleted in
|
||||
// resources/pipeline
|
||||
// but a little more complex then it seems...
|
||||
// For now, all COMPLETED requests deleted in resource..
|
||||
// all FAILED requests deleted in pipeline stage
|
||||
// *all SQUASHED requests deleted in resource
|
||||
res->cpu->reqRemoveList.push(res->reqMap[slotNum]);
|
||||
}
|
||||
|
||||
// Free Slot So Another Instruction Can Use This Resource
|
||||
|
|
|
@ -1171,9 +1171,6 @@ CacheUnit::squash(DynInstPtr inst, int stage_num,
|
|||
}
|
||||
|
||||
if (!cache_req->tlbStall && !cache_req->isMemAccPending()) {
|
||||
// Mark request for later removal
|
||||
cpu->reqRemoveList.push(req_ptr);
|
||||
|
||||
// Mark slot for removal from resource
|
||||
slot_remove_list.push_back(req_ptr->getSlot());
|
||||
} else {
|
||||
|
|
|
@ -257,9 +257,6 @@ TLBUnit::squash(DynInstPtr inst, int stage_num,
|
|||
if (resourceEvent[req_slot_num].scheduled())
|
||||
unscheduleEvent(req_slot_num);
|
||||
|
||||
// Mark request for later removal
|
||||
cpu->reqRemoveList.push(req_ptr);
|
||||
|
||||
// Mark slot for removal from resource
|
||||
slot_remove_list.push_back(req_ptr->getSlot());
|
||||
}
|
||||
|
|
|
@ -445,9 +445,6 @@ UseDefUnit::squash(DynInstPtr inst, int stage_num, InstSeqNum squash_seq_num,
|
|||
unscheduleEvent(req_slot_num);
|
||||
}
|
||||
|
||||
// Mark request for later removal
|
||||
cpu->reqRemoveList.push(req_ptr);
|
||||
|
||||
// Mark slot for removal from resource
|
||||
slot_remove_list.push_back(req_ptr->getSlot());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue