From: Korey Sewell Date: Mon, 20 Jun 2011 01:43:33 +0000 (-0400) Subject: inorder: use m5_hash_map for skedCache X-Git-Tag: stable_2012_02_02~269 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=76c60c5f9309af239f7fbe65e760e65f6c84bbe5;p=gem5.git inorder: use m5_hash_map for skedCache since we dont care about if the cache of instruction schedules is sorted or not, then the hash map should be faster --- diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc index 97748deba..bb9b5c3c6 100644 --- a/src/cpu/inorder/cpu.cc +++ b/src/cpu/inorder/cpu.cc @@ -358,10 +358,8 @@ InOrderCPU::~InOrderCPU() { delete resPool; - std::map::iterator sked_it = - skedCache.begin(); - std::map::iterator sked_end = - skedCache.end(); + SkedCacheIt sked_it = skedCache.begin(); + SkedCacheIt sked_end = skedCache.end(); while (sked_it != sked_end) { delete (*sked_it).second; @@ -370,7 +368,7 @@ InOrderCPU::~InOrderCPU() skedCache.clear(); } -std::map InOrderCPU::skedCache; +m5::hash_map InOrderCPU::skedCache; RSkedPtr InOrderCPU::createFrontEndSked() diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh index af2fa5ced..c4a38d071 100644 --- a/src/cpu/inorder/cpu.hh +++ b/src/cpu/inorder/cpu.hh @@ -300,9 +300,9 @@ class InOrderCPU : public BaseCPU typedef uint32_t SkedID; /** Cache of Instruction Schedule using the instruction's name as a key */ - static std::map skedCache; + static m5::hash_map skedCache; - typedef std::map::iterator SkedCacheIt; + typedef m5::hash_map::iterator SkedCacheIt; /** Initialized to last iterator in map, signifying a invalid entry on map searches