diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:34 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:34 -0400 |
commit | d4b4ef13249f78714f5507ea6353d64b44ff8b25 (patch) | |
tree | b7e57403f2e87dbb987dca6d1f408c7fb84e7f5a /src | |
parent | b43eeaf2e22ef081e2bc73bff7a069bbf5eb5fda (diff) | |
download | gem5-d4b4ef13249f78714f5507ea6353d64b44ff8b25.tar.xz |
inorder: inst. iterator cleanup
get rid of accessing iterators (for instructions) by reference
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/inorder/cpu.cc | 6 | ||||
-rw-r--r-- | src/cpu/inorder/cpu.hh | 6 | ||||
-rw-r--r-- | src/cpu/inorder/inorder_dyn_inst.hh | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc index 8b49c4f24..ef6d5fb20 100644 --- a/src/cpu/inorder/cpu.cc +++ b/src/cpu/inorder/cpu.cc @@ -1221,7 +1221,7 @@ InOrderCPU::setMiscReg(int misc_reg, const MiscReg &val, ThreadID tid) InOrderCPU::ListIt -InOrderCPU::addInst(DynInstPtr &inst) +InOrderCPU::addInst(DynInstPtr inst) { ThreadID tid = inst->readTid(); @@ -1318,7 +1318,7 @@ InOrderCPU::instDone(DynInstPtr inst, ThreadID tid) // 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 @@ InOrderCPU::addToRemoveList(DynInstPtr &inst) } void -InOrderCPU::removeInst(DynInstPtr &inst) +InOrderCPU::removeInst(DynInstPtr inst) { DPRINTF(InOrderCPU, "Removing graduated instruction [tid:%i] PC %s " "[sn:%lli]\n", diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh index 75d4077d7..a468f8fa8 100644 --- a/src/cpu/inorder/cpu.hh +++ b/src/cpu/inorder/cpu.hh @@ -577,16 +577,16 @@ class InOrderCPU : public BaseCPU /** 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 --git a/src/cpu/inorder/inorder_dyn_inst.hh b/src/cpu/inorder/inorder_dyn_inst.hh index 033726df9..1ef2b2af4 100644 --- a/src/cpu/inorder/inorder_dyn_inst.hh +++ b/src/cpu/inorder/inorder_dyn_inst.hh @@ -989,7 +989,7 @@ class InOrderDynInst : public FastAlloc, public RefCounted 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; } |