stride.cc (8232:b28d06a175be) | stride.cc (8509:afb40c3d4ba6) |
---|---|
1/* 2 * Copyright (c) 2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 104 unchanged lines hidden (view full) --- 113 int min_conf = (*min_pos)->confidence; 114 for (iter = min_pos, ++iter; iter != tab.end(); ++iter) { 115 if ((*iter)->confidence < min_conf){ 116 min_pos = iter; 117 min_conf = (*iter)->confidence; 118 } 119 } 120 DPRINTF(HWPrefetch, " replacing PC %x\n", (*min_pos)->instAddr); | 1/* 2 * Copyright (c) 2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 104 unchanged lines hidden (view full) --- 113 int min_conf = (*min_pos)->confidence; 114 for (iter = min_pos, ++iter; iter != tab.end(); ++iter) { 115 if ((*iter)->confidence < min_conf){ 116 min_pos = iter; 117 min_conf = (*iter)->confidence; 118 } 119 } 120 DPRINTF(HWPrefetch, " replacing PC %x\n", (*min_pos)->instAddr); |
121 122 // free entry and delete it 123 delete *min_pos; |
|
121 tab.erase(min_pos); 122 } 123 124 StrideEntry *new_entry = new StrideEntry; 125 new_entry->instAddr = pc; 126 new_entry->missAddr = blk_addr; 127 new_entry->stride = 0; 128 new_entry->confidence = 0; 129 tab.push_back(new_entry); 130 } 131} | 124 tab.erase(min_pos); 125 } 126 127 StrideEntry *new_entry = new StrideEntry; 128 new_entry->instAddr = pc; 129 new_entry->missAddr = blk_addr; 130 new_entry->stride = 0; 131 new_entry->confidence = 0; 132 tab.push_back(new_entry); 133 } 134} |