Deleted Added
sdiff udiff text old ( 12106:7784fac1b159 ) new ( 12255:9ef9176e4bb2 )
full compact
1/*
2 * Copyright (c) 2013 - 2015 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

--- 224 unchanged lines hidden (view full) ---

233 InstExecInfo* exec_info_ptr = new InstExecInfo;
234 tempStore[seq_num] = exec_info_ptr;
235
236 // Loop through the source registers and look up the dependency map. If
237 // the source register entry is found in the dependency map, add a
238 // dependency on the last writer.
239 int8_t max_regs = dyn_inst->numSrcRegs();
240 for (int src_idx = 0; src_idx < max_regs; src_idx++) {
241 // Get the physical register index of the i'th source register.
242 PhysRegIdPtr src_reg = dyn_inst->renamedSrcRegIdx(src_idx);
243 DPRINTFR(ElasticTrace, "[sn:%lli] Check map for src reg"
244 " %i (%s)\n", seq_num,
245 src_reg->index(), src_reg->className());
246 auto itr_last_writer = physRegDepMap.find(src_reg->flatIndex());
247 if (itr_last_writer != physRegDepMap.end()) {
248 InstSeqNum last_writer = itr_last_writer->second;
249 // Additionally the dependency distance is kept less than the window
250 // size parameter to limit the memory allocation to nodes in the
251 // graph. If the window were tending to infinite we would have to
252 // load a large number of node objects during replay.
253 if (seq_num - last_writer < depWindowSize) {
254 // Record a physical register dependency.
255 exec_info_ptr->physRegDepSet.insert(last_writer);
256 }
257 }
258 }
259
260 // Loop through the destination registers of this instruction and update
261 // the physical register dependency map for last writers to registers.
262 max_regs = dyn_inst->numDestRegs();
263 for (int dest_idx = 0; dest_idx < max_regs; dest_idx++) {
264 // For data dependency tracking the register must be an int, float or
265 // CC register and not a Misc register.
266 const RegId& dest_reg = dyn_inst->destRegIdx(dest_idx);
267 if (!dest_reg.isMiscReg() &&
268 !dest_reg.isZeroReg()) {
269 // Get the physical register index of the i'th destination
270 // register.
271 PhysRegIdPtr phys_dest_reg = dyn_inst->renamedDestRegIdx(dest_idx);
272 DPRINTFR(ElasticTrace, "[sn:%lli] Update map for dest reg"
273 " %i (%s)\n", seq_num, dest_reg.index(),
274 dest_reg.className());
275 physRegDepMap[phys_dest_reg->flatIndex()] = seq_num;
276 }
277 }
278 maxPhysRegDepMapSize = std::max(physRegDepMap.size(),
279 (std::size_t)maxPhysRegDepMapSize.value());
280}
281

--- 673 unchanged lines hidden ---