since we dont care about if the cache of instruction schedules is sorted or not,
then the hash map should be faster
{
delete resPool;
- std::map<SkedID, ThePipeline::RSkedPtr>::iterator sked_it =
- skedCache.begin();
- std::map<SkedID, ThePipeline::RSkedPtr>::iterator sked_end =
- skedCache.end();
+ SkedCacheIt sked_it = skedCache.begin();
+ SkedCacheIt sked_end = skedCache.end();
while (sked_it != sked_end) {
delete (*sked_it).second;
skedCache.clear();
}
-std::map<InOrderCPU::SkedID, ThePipeline::RSkedPtr> InOrderCPU::skedCache;
+m5::hash_map<InOrderCPU::SkedID, ThePipeline::RSkedPtr> InOrderCPU::skedCache;
RSkedPtr
InOrderCPU::createFrontEndSked()
typedef uint32_t SkedID;
/** Cache of Instruction Schedule using the instruction's name as a key */
- static std::map<SkedID, ThePipeline::RSkedPtr> skedCache;
+ static m5::hash_map<SkedID, ThePipeline::RSkedPtr> skedCache;
- typedef std::map<SkedID, ThePipeline::RSkedPtr>::iterator SkedCacheIt;
+ typedef m5::hash_map<SkedID, ThePipeline::RSkedPtr>::iterator SkedCacheIt;
/** Initialized to last iterator in map, signifying a invalid entry
on map searches