inorder: inst. iterator cleanup
get rid of accessing iterators (for instructions) by reference
This commit is contained in:
parent
b43eeaf2e2
commit
d4b4ef1324
3 changed files with 7 additions and 7 deletions
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in a new issue