#define __CPU_O3_MEM_DEP_UNIT_HH__
#include <list>
+#include <memory>
#include <set>
#include "base/hashmap.hh"
-#include "base/refcnt.hh"
#include "base/statistics.hh"
#include "cpu/inst_seq.hh"
#include "debug/MemDepUnit.hh"
class MemDepEntry;
- typedef RefCountingPtr<MemDepEntry> MemDepEntryPtr;
+ typedef std::shared_ptr<MemDepEntry> MemDepEntryPtr;
/** Memory dependence entries that track memory operations, marking
* when the instruction is ready to execute and what instructions depend
* upon it.
*/
- class MemDepEntry : public RefCounted {
+ class MemDepEntry {
public:
/** Constructs a memory dependence entry. */
MemDepEntry(DynInstPtr &new_inst)
{
ThreadID tid = inst->threadNumber;
- MemDepEntryPtr inst_entry = new MemDepEntry(inst);
+ MemDepEntryPtr inst_entry = std::make_shared<MemDepEntry>(inst);
// Add the MemDepEntry to the hash.
memDepHash.insert(
{
ThreadID tid = inst->threadNumber;
- MemDepEntryPtr inst_entry = new MemDepEntry(inst);
+ MemDepEntryPtr inst_entry = std::make_shared<MemDepEntry>(inst);
// Insert the MemDepEntry into the hash.
memDepHash.insert(
ThreadID tid = barr_inst->threadNumber;
- MemDepEntryPtr inst_entry = new MemDepEntry(barr_inst);
+ MemDepEntryPtr inst_entry = std::make_shared<MemDepEntry>(barr_inst);
// Add the MemDepEntry to the hash.
memDepHash.insert(