mem_dep_unit.hh (10333:6be8945d226b) | mem_dep_unit.hh (10473:4cbe53150053) |
---|---|
1/* 2 * Copyright (c) 2012, 2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 30 unchanged lines hidden (view full) --- 39 * 40 * Authors: Kevin Lim 41 */ 42 43#ifndef __CPU_O3_MEM_DEP_UNIT_HH__ 44#define __CPU_O3_MEM_DEP_UNIT_HH__ 45 46#include <list> | 1/* 2 * Copyright (c) 2012, 2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 30 unchanged lines hidden (view full) --- 39 * 40 * Authors: Kevin Lim 41 */ 42 43#ifndef __CPU_O3_MEM_DEP_UNIT_HH__ 44#define __CPU_O3_MEM_DEP_UNIT_HH__ 45 46#include <list> |
47#include <memory> |
|
47#include <set> 48 49#include "base/hashmap.hh" | 48#include <set> 49 50#include "base/hashmap.hh" |
50#include "base/refcnt.hh" | |
51#include "base/statistics.hh" 52#include "cpu/inst_seq.hh" 53#include "debug/MemDepUnit.hh" 54 55struct SNHash { 56 size_t operator() (const InstSeqNum &seq_num) const { 57 unsigned a = (unsigned)seq_num; 58 unsigned hash = (((a >> 14) ^ ((a >> 2) & 0xffff))) & 0x7FFFFFFF; --- 100 unchanged lines hidden (view full) --- 159 /** Debugging function to dump the lists of instructions. */ 160 void dumpLists(); 161 162 private: 163 typedef typename std::list<DynInstPtr>::iterator ListIt; 164 165 class MemDepEntry; 166 | 51#include "base/statistics.hh" 52#include "cpu/inst_seq.hh" 53#include "debug/MemDepUnit.hh" 54 55struct SNHash { 56 size_t operator() (const InstSeqNum &seq_num) const { 57 unsigned a = (unsigned)seq_num; 58 unsigned hash = (((a >> 14) ^ ((a >> 2) & 0xffff))) & 0x7FFFFFFF; --- 100 unchanged lines hidden (view full) --- 159 /** Debugging function to dump the lists of instructions. */ 160 void dumpLists(); 161 162 private: 163 typedef typename std::list<DynInstPtr>::iterator ListIt; 164 165 class MemDepEntry; 166 |
167 typedef RefCountingPtr<MemDepEntry> MemDepEntryPtr; | 167 typedef std::shared_ptr<MemDepEntry> MemDepEntryPtr; |
168 169 /** Memory dependence entries that track memory operations, marking 170 * when the instruction is ready to execute and what instructions depend 171 * upon it. 172 */ | 168 169 /** Memory dependence entries that track memory operations, marking 170 * when the instruction is ready to execute and what instructions depend 171 * upon it. 172 */ |
173 class MemDepEntry : public RefCounted { | 173 class MemDepEntry { |
174 public: 175 /** Constructs a memory dependence entry. */ 176 MemDepEntry(DynInstPtr &new_inst) 177 : inst(new_inst), regsReady(false), memDepReady(false), 178 completed(false), squashed(false) 179 { 180#ifdef DEBUG 181 ++memdep_count; --- 101 unchanged lines hidden --- | 174 public: 175 /** Constructs a memory dependence entry. */ 176 MemDepEntry(DynInstPtr &new_inst) 177 : inst(new_inst), regsReady(false), memDepReady(false), 178 completed(false), squashed(false) 179 { 180#ifdef DEBUG 181 ++memdep_count; --- 101 unchanged lines hidden --- |