mem_dep_unit_impl.hh (10333:6be8945d226b) mem_dep_unit_impl.hh (10473:4cbe53150053)
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

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

157}
158
159template <class MemDepPred, class Impl>
160void
161MemDepUnit<MemDepPred, Impl>::insert(DynInstPtr &inst)
162{
163 ThreadID tid = inst->threadNumber;
164
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

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

157}
158
159template <class MemDepPred, class Impl>
160void
161MemDepUnit<MemDepPred, Impl>::insert(DynInstPtr &inst)
162{
163 ThreadID tid = inst->threadNumber;
164
165 MemDepEntryPtr inst_entry = new MemDepEntry(inst);
165 MemDepEntryPtr inst_entry = std::make_shared<MemDepEntry>(inst);
166
167 // Add the MemDepEntry to the hash.
168 memDepHash.insert(
169 std::pair<InstSeqNum, MemDepEntryPtr>(inst->seqNum, inst_entry));
170#ifdef DEBUG
171 MemDepEntry::memdep_insert++;
172#endif
173

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

254}
255
256template <class MemDepPred, class Impl>
257void
258MemDepUnit<MemDepPred, Impl>::insertNonSpec(DynInstPtr &inst)
259{
260 ThreadID tid = inst->threadNumber;
261
166
167 // Add the MemDepEntry to the hash.
168 memDepHash.insert(
169 std::pair<InstSeqNum, MemDepEntryPtr>(inst->seqNum, inst_entry));
170#ifdef DEBUG
171 MemDepEntry::memdep_insert++;
172#endif
173

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

254}
255
256template <class MemDepPred, class Impl>
257void
258MemDepUnit<MemDepPred, Impl>::insertNonSpec(DynInstPtr &inst)
259{
260 ThreadID tid = inst->threadNumber;
261
262 MemDepEntryPtr inst_entry = new MemDepEntry(inst);
262 MemDepEntryPtr inst_entry = std::make_shared<MemDepEntry>(inst);
263
264 // Insert the MemDepEntry into the hash.
265 memDepHash.insert(
266 std::pair<InstSeqNum, MemDepEntryPtr>(inst->seqNum, inst_entry));
267#ifdef DEBUG
268 MemDepEntry::memdep_insert++;
269#endif
270

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

305 } else if (barr_inst->isWriteBarrier()) {
306 storeBarrier = true;
307 storeBarrierSN = barr_sn;
308 DPRINTF(MemDepUnit, "Inserted a write barrier\n");
309 }
310
311 ThreadID tid = barr_inst->threadNumber;
312
263
264 // Insert the MemDepEntry into the hash.
265 memDepHash.insert(
266 std::pair<InstSeqNum, MemDepEntryPtr>(inst->seqNum, inst_entry));
267#ifdef DEBUG
268 MemDepEntry::memdep_insert++;
269#endif
270

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

305 } else if (barr_inst->isWriteBarrier()) {
306 storeBarrier = true;
307 storeBarrierSN = barr_sn;
308 DPRINTF(MemDepUnit, "Inserted a write barrier\n");
309 }
310
311 ThreadID tid = barr_inst->threadNumber;
312
313 MemDepEntryPtr inst_entry = new MemDepEntry(barr_inst);
313 MemDepEntryPtr inst_entry = std::make_shared<MemDepEntry>(barr_inst);
314
315 // Add the MemDepEntry to the hash.
316 memDepHash.insert(
317 std::pair<InstSeqNum, MemDepEntryPtr>(barr_sn, inst_entry));
318#ifdef DEBUG
319 MemDepEntry::memdep_insert++;
320#endif
321

--- 280 unchanged lines hidden ---
314
315 // Add the MemDepEntry to the hash.
316 memDepHash.insert(
317 std::pair<InstSeqNum, MemDepEntryPtr>(barr_sn, inst_entry));
318#ifdef DEBUG
319 MemDepEntry::memdep_insert++;
320#endif
321

--- 280 unchanged lines hidden ---