inorder: remove reqRemoveList
authorKorey Sewell <ksewell@umich.edu>
Fri, 18 Feb 2011 19:28:10 +0000 (14:28 -0500)
committerKorey Sewell <ksewell@umich.edu>
Fri, 18 Feb 2011 19:28:10 +0000 (14:28 -0500)
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

src/cpu/inorder/cpu.cc
src/cpu/inorder/cpu.hh
src/cpu/inorder/pipeline_stage.cc
src/cpu/inorder/resource.cc
src/cpu/inorder/resources/cache_unit.cc
src/cpu/inorder/resources/tlb_unit.cc
src/cpu/inorder/resources/use_def.cc

index 3a705258d2dca2634803fd9fd893882572967995..56b27e0d00e0205fe2a5a68a2b05bee3e77d6970 100644 (file)
@@ -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()
 {
index 2a5c815e17af37e185edcd315b3a4c157558c5bc..073a0a982ef8e786a2387bf3988522e432468c79 100644 (file)
@@ -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.
      */
index bc31a8537a713dc885b6698c8d0a9368a54a667d..5de963b0e4ecbc1cc0e7fb9fa5b0bb878063871c 100644 (file)
@@ -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;
             }
 
index 5a31125c6c160b29a98a67ad6949a130a659fd26..568e2759d682f09f06ca164ea7cb495ea4e53656 100644 (file)
@@ -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
index 47fafe45a0ec376884a42a514c0970dcf6f384d2..11902f51e96e37f1a64ae33d2c91f0180be42609 100644 (file)
@@ -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 {
index 2e19ea92825f03722f4bac2c86cf7aa05312bccd..0b273eabcc7c158f76b26009cd80dfc0dbe4c7bf 100644 (file)
@@ -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());
          }
index dd178403bb33da0ac3ebb30356ee962f1b1ec717..a37e459a8780e6b41092730ddfeb0f2825b71f71 100644 (file)
@@ -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());
         }