mem_dep_unit.hh (10510:7e54a9a9f6b2) | mem_dep_unit.hh (11168:f98eb2da15a4) |
---|---|
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 --- 32 unchanged lines hidden (view full) --- 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> 48#include <set> | 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 --- 32 unchanged lines hidden (view full) --- 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> 48#include <set> |
49#include <unordered_map> |
|
49 | 50 |
50#include "base/hashmap.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; --- 173 unchanged lines hidden (view full) --- 232 }; 233 234 /** Finds the memory dependence entry in the hash map. */ 235 inline MemDepEntryPtr &findInHash(const DynInstPtr &inst); 236 237 /** Moves an entry to the ready list. */ 238 inline void moveToReady(MemDepEntryPtr &ready_inst_entry); 239 | 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; --- 173 unchanged lines hidden (view full) --- 232 }; 233 234 /** Finds the memory dependence entry in the hash map. */ 235 inline MemDepEntryPtr &findInHash(const DynInstPtr &inst); 236 237 /** Moves an entry to the ready list. */ 238 inline void moveToReady(MemDepEntryPtr &ready_inst_entry); 239 |
240 typedef m5::hash_map<InstSeqNum, MemDepEntryPtr, SNHash> MemDepHash; | 240 typedef std::unordered_map<InstSeqNum, MemDepEntryPtr, SNHash> MemDepHash; |
241 242 typedef typename MemDepHash::iterator MemDepHashIt; 243 244 /** A hash map of all memory dependence entries. */ 245 MemDepHash memDepHash; 246 247 /** A list of all instructions in the memory dependence unit. */ 248 std::list<DynInstPtr> instList[Impl::MaxThreads]; --- 37 unchanged lines hidden --- | 241 242 typedef typename MemDepHash::iterator MemDepHashIt; 243 244 /** A hash map of all memory dependence entries. */ 245 MemDepHash memDepHash; 246 247 /** A list of all instructions in the memory dependence unit. */ 248 std::list<DynInstPtr> instList[Impl::MaxThreads]; --- 37 unchanged lines hidden --- |