diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-02-18 14:28:10 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-02-18 14:28:10 -0500 |
commit | ff48afcf4f3d8cccc899c5840734228a5bebc045 (patch) | |
tree | 19df8347ad16ae2574fc948831581762421fb520 /src | |
parent | 991d0185c68b53a04ae5d1f1a05749bbfddced89 (diff) | |
download | gem5-ff48afcf4f3d8cccc899c5840734228a5bebc045.tar.xz |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/inorder/cpu.cc | 25 | ||||
-rw-r--r-- | src/cpu/inorder/cpu.hh | 10 | ||||
-rw-r--r-- | src/cpu/inorder/pipeline_stage.cc | 14 | ||||
-rw-r--r-- | src/cpu/inorder/resource.cc | 11 | ||||
-rw-r--r-- | src/cpu/inorder/resources/cache_unit.cc | 3 | ||||
-rw-r--r-- | src/cpu/inorder/resources/tlb_unit.cc | 3 | ||||
-rw-r--r-- | src/cpu/inorder/resources/use_def.cc | 3 |
7 files changed, 2 insertions, 67 deletions
diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc index 3a705258d..56b27e0d0 100644 --- a/src/cpu/inorder/cpu.cc +++ b/src/cpu/inorder/cpu.cc @@ -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(); @@ -1436,28 +1435,6 @@ InOrderCPU::cleanUpRemovedInsts() } 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() { while (!cpuEventRemoveList.empty()) { diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh index 2a5c815e1..073a0a982 100644 --- a/src/cpu/inorder/cpu.hh +++ b/src/cpu/inorder/cpu.hh @@ -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. */ diff --git a/src/cpu/inorder/pipeline_stage.cc b/src/cpu/inorder/pipeline_stage.cc index bc31a8537..5de963b0e 100644 --- a/src/cpu/inorder/pipeline_stage.cc +++ b/src/cpu/inorder/pipeline_stage.cc @@ -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; } diff --git a/src/cpu/inorder/resource.cc b/src/cpu/inorder/resource.cc index 5a31125c6..568e2759d 100644 --- a/src/cpu/inorder/resource.cc +++ b/src/cpu/inorder/resource.cc @@ -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 diff --git a/src/cpu/inorder/resources/cache_unit.cc b/src/cpu/inorder/resources/cache_unit.cc index 47fafe45a..11902f51e 100644 --- a/src/cpu/inorder/resources/cache_unit.cc +++ b/src/cpu/inorder/resources/cache_unit.cc @@ -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 { diff --git a/src/cpu/inorder/resources/tlb_unit.cc b/src/cpu/inorder/resources/tlb_unit.cc index 2e19ea928..0b273eabc 100644 --- a/src/cpu/inorder/resources/tlb_unit.cc +++ b/src/cpu/inorder/resources/tlb_unit.cc @@ -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()); } diff --git a/src/cpu/inorder/resources/use_def.cc b/src/cpu/inorder/resources/use_def.cc index dd178403b..a37e459a8 100644 --- a/src/cpu/inorder/resources/use_def.cc +++ b/src/cpu/inorder/resources/use_def.cc @@ -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()); } |