From a769963d16b7b259580fa2da1e84f62aae0a5a42 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Thu, 16 Oct 2014 05:49:49 -0400 Subject: o3: Use shared_ptr for MemDepEntry This patch transitions the o3 MemDepEntry from the ad-hoc RefCountingPtr to the c++11 shared_ptr. There are no changes in behaviour, and the code modifications are mainly replacing "new" with "make_shared". --- src/cpu/o3/mem_dep_unit_impl.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cpu/o3/mem_dep_unit_impl.hh') diff --git a/src/cpu/o3/mem_dep_unit_impl.hh b/src/cpu/o3/mem_dep_unit_impl.hh index 1e794d488..6684e4ff0 100644 --- a/src/cpu/o3/mem_dep_unit_impl.hh +++ b/src/cpu/o3/mem_dep_unit_impl.hh @@ -162,7 +162,7 @@ MemDepUnit::insert(DynInstPtr &inst) { ThreadID tid = inst->threadNumber; - MemDepEntryPtr inst_entry = new MemDepEntry(inst); + MemDepEntryPtr inst_entry = std::make_shared(inst); // Add the MemDepEntry to the hash. memDepHash.insert( @@ -259,7 +259,7 @@ MemDepUnit::insertNonSpec(DynInstPtr &inst) { ThreadID tid = inst->threadNumber; - MemDepEntryPtr inst_entry = new MemDepEntry(inst); + MemDepEntryPtr inst_entry = std::make_shared(inst); // Insert the MemDepEntry into the hash. memDepHash.insert( @@ -310,7 +310,7 @@ MemDepUnit::insertBarrier(DynInstPtr &barr_inst) ThreadID tid = barr_inst->threadNumber; - MemDepEntryPtr inst_entry = new MemDepEntry(barr_inst); + MemDepEntryPtr inst_entry = std::make_shared(barr_inst); // Add the MemDepEntry to the hash. memDepHash.insert( -- cgit v1.2.3