changeset 89c713a5aa1d in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=89c713a5aa1d
description:
        inorder: inst. iterator cleanup
        get rid of accessing iterators (for instructions) by reference

diffstat:

 src/cpu/inorder/cpu.cc              |  6 +++---
 src/cpu/inorder/cpu.hh              |  6 +++---
 src/cpu/inorder/inorder_dyn_inst.hh |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diffs (65 lines):

diff -r 641193dca496 -r 89c713a5aa1d src/cpu/inorder/cpu.cc
--- a/src/cpu/inorder/cpu.cc    Sun Jun 19 21:43:33 2011 -0400
+++ b/src/cpu/inorder/cpu.cc    Sun Jun 19 21:43:34 2011 -0400
@@ -1221,7 +1221,7 @@
 
 
 InOrderCPU::ListIt
-InOrderCPU::addInst(DynInstPtr &inst)
+InOrderCPU::addInst(DynInstPtr inst)
 {
     ThreadID tid = inst->readTid();
 
@@ -1318,7 +1318,7 @@
 // currently unused function, but substitute repetitive code w/this function
 // call
 void
-InOrderCPU::addToRemoveList(DynInstPtr &inst)
+InOrderCPU::addToRemoveList(DynInstPtr inst)
 {
     removeInstsThisCycle = true;
     if (!inst->isRemoveList()) {            
@@ -1336,7 +1336,7 @@
 }
 
 void
-InOrderCPU::removeInst(DynInstPtr &inst)
+InOrderCPU::removeInst(DynInstPtr inst)
 {
     DPRINTF(InOrderCPU, "Removing graduated instruction [tid:%i] PC %s "
             "[sn:%lli]\n",
diff -r 641193dca496 -r 89c713a5aa1d src/cpu/inorder/cpu.hh
--- a/src/cpu/inorder/cpu.hh    Sun Jun 19 21:43:33 2011 -0400
+++ b/src/cpu/inorder/cpu.hh    Sun Jun 19 21:43:34 2011 -0400
@@ -577,16 +577,16 @@
     /** Function to add instruction onto the head of the list of the
      *  instructions.  Used when new instructions are fetched.
      */
-    ListIt addInst(DynInstPtr &inst);
+    ListIt addInst(DynInstPtr inst);
 
     /** Function to tell the CPU that an instruction has completed. */
     void instDone(DynInstPtr inst, ThreadID tid);
 
     /** Add Instructions to the CPU Remove List*/
-    void addToRemoveList(DynInstPtr &inst);
+    void addToRemoveList(DynInstPtr inst);
 
     /** Remove an instruction from CPU */
-    void removeInst(DynInstPtr &inst);
+    void removeInst(DynInstPtr inst);
 
     /** Remove all instructions younger than the given sequence number. */
     void removeInstsUntil(const InstSeqNum &seq_num,ThreadID tid);
diff -r 641193dca496 -r 89c713a5aa1d src/cpu/inorder/inorder_dyn_inst.hh
--- a/src/cpu/inorder/inorder_dyn_inst.hh       Sun Jun 19 21:43:33 2011 -0400
+++ b/src/cpu/inorder/inorder_dyn_inst.hh       Sun Jun 19 21:43:34 2011 -0400
@@ -989,7 +989,7 @@
     ListIt instListIt;
 
     /** Returns iterator to this instruction in the list of all insts. */
-    ListIt &getInstListIt() { return instListIt; }
+    ListIt getInstListIt() { return instListIt; }
 
     /** Sets iterator for this instruction in the list of all insts. */
     void setInstListIt(ListIt _instListIt) { instListIt = _instListIt; }
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to