From 477e7039b36dc816bf1116631ace714d0c83dd21 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Sun, 19 Jun 2011 21:43:42 -0400 Subject: [PATCH] inorder: clear reg. dep entry after removing from list this will safeguard future code from trying to remove from the list twice. That code wouldnt break but would waste time. --- src/cpu/inorder/inorder_dyn_inst.hh | 3 +++ src/cpu/inorder/reg_dep_map.cc | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/cpu/inorder/inorder_dyn_inst.hh b/src/cpu/inorder/inorder_dyn_inst.hh index c2d37d716..205bb0f82 100644 --- a/src/cpu/inorder/inorder_dyn_inst.hh +++ b/src/cpu/inorder/inorder_dyn_inst.hh @@ -943,6 +943,9 @@ class InOrderDynInst : public FastAlloc, public RefCounted /** Sets this instruction as entered on the CPU Reg Dep Map */ void setRegDepEntry() { status.set(RegDepMapEntry); } + /** Unsets this instruction as entered on the CPU Reg Dep Map */ + void clearRegDepEntry() { status.reset(RegDepMapEntry); } + /** Returns whether or not the entry is on the CPU Reg Dep Map */ bool isRegDepEntry() const { return status[RegDepMapEntry]; } diff --git a/src/cpu/inorder/reg_dep_map.cc b/src/cpu/inorder/reg_dep_map.cc index 2f8a2924c..fa2cc8daf 100644 --- a/src/cpu/inorder/reg_dep_map.cc +++ b/src/cpu/inorder/reg_dep_map.cc @@ -157,6 +157,8 @@ RegDepMap::remove(DynInstPtr inst) remove(reg_type, flat_idx, inst); } + + inst->clearRegDepEntry(); } } -- 2.30.2