misc: Substitute pointer to Request with aliased RequestPtr
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Sun, 3 Jun 2018 12:10:26 +0000 (13:10 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 11 Jun 2018 16:55:30 +0000 (16:55 +0000)
Every usage of Request* in the code has been replaced with the
RequestPtr alias.  This is a preparing patch for when RequestPtr will be
the typdefed to a smart pointer to Request rather then a raw pointer to
Request.

Change-Id: I73cbaf2d96ea9313a590cdc731a25662950cd51a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/10995
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

32 files changed:
src/arch/alpha/locked_mem.hh
src/arch/arm/locked_mem.hh
src/arch/generic/locked_mem.hh
src/arch/hsail/insts/mem.hh
src/arch/mips/locked_mem.hh
src/arch/riscv/locked_mem.hh
src/cpu/base_dyn_inst.hh
src/cpu/checker/cpu.cc
src/cpu/checker/cpu.hh
src/cpu/minor/lsq.cc
src/cpu/minor/lsq.hh
src/cpu/o3/lsq_unit.hh
src/cpu/o3/lsq_unit_impl.hh
src/cpu/simple/atomic.cc
src/cpu/simple/base.cc
src/cpu/simple/base.hh
src/cpu/simple/timing.cc
src/cpu/testers/directedtest/InvalidateGenerator.cc
src/cpu/testers/directedtest/SeriesRequestGenerator.cc
src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc
src/cpu/testers/memtest/memtest.cc
src/cpu/testers/rubytest/Check.cc
src/cpu/testers/traffic_gen/base_gen.cc
src/gpu-compute/compute_unit.cc
src/gpu-compute/fetch_unit.cc
src/gpu-compute/gpu_dyn_inst.hh
src/gpu-compute/shader.cc
src/mem/abstract_mem.cc
src/mem/abstract_mem.hh
src/mem/cache/base.cc
src/mem/cache/cache.cc
src/mem/cache/prefetch/queued.cc

index 36a6a0333e17fd53011bdda1e6257d15b73ba98e..a71a24cfb08cdf455acdd5355fb9b3d3cd01bdb4 100644 (file)
@@ -85,7 +85,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
 
 template <class XC>
 inline void
-handleLockedRead(XC *xc, Request *req)
+handleLockedRead(XC *xc, RequestPtr req)
 {
     xc->setMiscReg(MISCREG_LOCKADDR, req->getPaddr() & ~0xf);
     xc->setMiscReg(MISCREG_LOCKFLAG, true);
@@ -99,7 +99,7 @@ handleLockedSnoopHit(XC *xc)
 
 template <class XC>
 inline bool
-handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
+handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
 {
     if (req->isUncacheable()) {
         // Funky Turbolaser mailbox access...don't update
index 2fcbc4a925fc85ab616fa31a4d0c21d62ed437c0..d33978522888f9ecdfb3f4bda09b902df0cc3be3 100644 (file)
@@ -91,7 +91,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
 
 template <class XC>
 inline void
-handleLockedRead(XC *xc, Request *req)
+handleLockedRead(XC *xc, RequestPtr req)
 {
     xc->setMiscReg(MISCREG_LOCKADDR, req->getPaddr());
     xc->setMiscReg(MISCREG_LOCKFLAG, true);
@@ -111,7 +111,7 @@ handleLockedSnoopHit(XC *xc)
 
 template <class XC>
 inline bool
-handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
+handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
 {
     if (req->isSwap())
         return true;
index 68a4ff5405f20a9bbf5c19982a9c713cfb2fb925..f6537995b398ff1016d6b02c5e19b541cafcc75e 100644 (file)
@@ -63,7 +63,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
 
 template <class XC>
 inline void
-handleLockedRead(XC *xc, Request *req)
+handleLockedRead(XC *xc, RequestPtr req)
 {
 }
 
@@ -76,7 +76,7 @@ handleLockedSnoopHit(XC *xc)
 
 template <class XC>
 inline bool
-handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
+handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
 {
     return true;
 }
index 36a6cbc79c4b430a94b59fd34b35cf1c7fe0cc0f..68a61feea622719d3beddbb8efbfe2aaf4d777f1 100644 (file)
@@ -461,9 +461,10 @@ namespace HsailISA
                             *d = gpuDynInst->wavefront()->ldsChunk->
                                 read<c0>(vaddr);
                         } else {
-                            Request *req = new Request(0, vaddr, sizeof(c0), 0,
-                                          gpuDynInst->computeUnit()->masterId(),
-                                          0, gpuDynInst->wfDynId);
+                            RequestPtr req = new Request(0,
+                                vaddr, sizeof(c0), 0,
+                                gpuDynInst->computeUnit()->masterId(),
+                                0, gpuDynInst->wfDynId);
 
                             gpuDynInst->setRequestFlags(req);
                             PacketPtr pkt = new Packet(req, MemCmd::ReadReq);
@@ -588,7 +589,7 @@ namespace HsailISA
                     gpuDynInst->statusBitVector = VectorMask(1);
                     gpuDynInst->useContinuation = false;
                     // create request
-                    Request *req = new Request(0, 0, 0, 0,
+                    RequestPtr req = new Request(0, 0, 0, 0,
                                   gpuDynInst->computeUnit()->masterId(),
                                   0, gpuDynInst->wfDynId);
                     req->setFlags(Request::ACQUIRE);
@@ -1014,7 +1015,7 @@ namespace HsailISA
                     gpuDynInst->execContinuation = &GPUStaticInst::execSt;
                     gpuDynInst->useContinuation = true;
                     // create request
-                    Request *req = new Request(0, 0, 0, 0,
+                    RequestPtr req = new Request(0, 0, 0, 0,
                                   gpuDynInst->computeUnit()->masterId(),
                                   0, gpuDynInst->wfDynId);
                     req->setFlags(Request::RELEASE);
@@ -1065,7 +1066,7 @@ namespace HsailISA
                             gpuDynInst->wavefront()->ldsChunk->write<c0>(vaddr,
                                                                          *d);
                         } else {
-                            Request *req =
+                            RequestPtr req =
                               new Request(0, vaddr, sizeof(c0), 0,
                                           gpuDynInst->computeUnit()->masterId(),
                                           0, gpuDynInst->wfDynId);
@@ -1488,7 +1489,7 @@ namespace HsailISA
                     gpuDynInst->useContinuation = true;
 
                     // create request
-                    Request *req = new Request(0, 0, 0, 0,
+                    RequestPtr req = new Request(0, 0, 0, 0,
                                   gpuDynInst->computeUnit()->masterId(),
                                   0, gpuDynInst->wfDynId);
                     req->setFlags(Request::RELEASE);
@@ -1620,7 +1621,7 @@ namespace HsailISA
                                   "type.\n");
                         }
                     } else {
-                        Request *req =
+                        RequestPtr req =
                             new Request(0, vaddr, sizeof(c0), 0,
                                         gpuDynInst->computeUnit()->masterId(),
                                         0, gpuDynInst->wfDynId,
@@ -1675,7 +1676,7 @@ namespace HsailISA
                     // the acquire completes
                     gpuDynInst->useContinuation = false;
                     // create request
-                    Request *req = new Request(0, 0, 0, 0,
+                    RequestPtr req = new Request(0, 0, 0, 0,
                                   gpuDynInst->computeUnit()->masterId(),
                                   0, gpuDynInst->wfDynId);
                     req->setFlags(Request::ACQUIRE);
index 5c1e60aa13530d44ba1da0edf71cdf08b060d9cb..7fa1642a88d739879aceecaf45f604ac3658ddba 100644 (file)
@@ -75,7 +75,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
 
 template <class XC>
 inline void
-handleLockedRead(XC *xc, Request *req)
+handleLockedRead(XC *xc, RequestPtr req)
 {
     xc->setMiscReg(MISCREG_LLADDR, req->getPaddr() & ~0xf);
     xc->setMiscReg(MISCREG_LLFLAG, true);
@@ -92,7 +92,7 @@ handleLockedSnoopHit(XC *xc)
 
 template <class XC>
 inline bool
-handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
+handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
 {
     if (req->isUncacheable()) {
         // Funky Turbolaser mailbox access...don't update
index 61fbe0de13c8fe4e66d1f42644f83a7645dbd232..1583258a88dabb22c8876ff603065f8649d3f2db 100644 (file)
@@ -82,7 +82,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
 
 
 template <class XC> inline void
-handleLockedRead(XC *xc, Request *req)
+handleLockedRead(XC *xc, RequestPtr req)
 {
     locked_addrs.push(req->getPaddr() & ~0xF);
     DPRINTF(LLSC, "[cid:%d]: Reserved address %x.\n",
@@ -94,7 +94,7 @@ handleLockedSnoopHit(XC *xc)
 {}
 
 template <class XC> inline bool
-handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
+handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
 {
     // Normally RISC-V uses zero to indicate success and nonzero to indicate
     // failure (right now only 1 is reserved), but in gem5 zero indicates
index ae408e3fbd0d620e271c3eacfbfdad244009ff63..e94f500ea9b82d44f8c8f43f4a46d14e348340c9 100644 (file)
@@ -893,9 +893,9 @@ BaseDynInst<Impl>::initiateMemRead(Addr addr, unsigned size,
                                    Request::Flags flags)
 {
     instFlags[ReqMade] = true;
-    Request *req = NULL;
-    Request *sreqLow = NULL;
-    Request *sreqHigh = NULL;
+    RequestPtr req = NULL;
+    RequestPtr sreqLow = NULL;
+    RequestPtr sreqHigh = NULL;
 
     if (instFlags[ReqMade] && translationStarted()) {
         req = savedReq;
@@ -949,9 +949,9 @@ BaseDynInst<Impl>::writeMem(uint8_t *data, unsigned size, Addr addr,
         traceData->setMem(addr, size, flags);
 
     instFlags[ReqMade] = true;
-    Request *req = NULL;
-    Request *sreqLow = NULL;
-    Request *sreqHigh = NULL;
+    RequestPtr req = NULL;
+    RequestPtr sreqLow = NULL;
+    RequestPtr sreqHigh = NULL;
 
     if (instFlags[ReqMade] && translationStarted()) {
         req = savedReq;
index 07b6553994a2820e92cf371ca07106731aeb70c0..1533d740567ce1a99a6a82f917c013a3b0450833 100644 (file)
@@ -337,7 +337,7 @@ CheckerCPU::dbg_vtophys(Addr addr)
  * Checks if the flags set by the Checker and Checkee match.
  */
 bool
-CheckerCPU::checkFlags(Request *unverified_req, Addr vAddr,
+CheckerCPU::checkFlags(RequestPtr unverified_req, Addr vAddr,
                        Addr pAddr, int flags)
 {
     Addr unverifiedVAddr = unverified_req->getVaddr();
index f79aa086451b2bb03d4f6b1d6be65e424e04f88c..101a16be6d4ab4dd657f314fe61ecf50c4a7c718 100644 (file)
@@ -531,7 +531,7 @@ class CheckerCPU : public BaseCPU, public ExecContext
             dumpAndExit();
     }
 
-    bool checkFlags(Request *unverified_req, Addr vAddr,
+    bool checkFlags(RequestPtr unverified_req, Addr vAddr,
                     Addr pAddr, int flags);
 
     void dumpAndExit();
@@ -540,7 +540,7 @@ class CheckerCPU : public BaseCPU, public ExecContext
     SimpleThread *threadBase() { return thread; }
 
     InstResult unverifiedResult;
-    Request *unverifiedReq;
+    RequestPtr unverifiedReq;
     uint8_t *unverifiedMemData;
 
     bool changedPC;
index cb0611be31f96cae6e3755559acc90bcda2e47d0..822df0294c6f8d59f26561bb7b6856c979ae58fa 100644 (file)
@@ -423,7 +423,7 @@ LSQ::SplitDataRequest::makeFragmentRequests()
             }
         }
 
-        Request *fragment = new Request();
+        RequestPtr fragment = new Request();
 
         fragment->setContext(request.contextId());
         fragment->setVirt(0 /* asid */,
@@ -452,7 +452,7 @@ LSQ::SplitDataRequest::makeFragmentPackets()
     for (unsigned int fragment_index = 0; fragment_index < numFragments;
          fragment_index++)
     {
-        Request *fragment = fragmentRequests[fragment_index];
+        RequestPtr fragment = fragmentRequests[fragment_index];
 
         DPRINTFS(MinorMem, (&port), "Making packet %d for request: %s"
             " (%d, 0x%x)\n",
index d4973f5a3005c91321a1fb8ab8f96f34ba2293de..9ee40f5d33a739a1b7c6bf0d4b4214a96af575ef 100644 (file)
@@ -399,7 +399,7 @@ class LSQ : public Named
 
         /** Fragment Requests corresponding to the address ranges of
          *  each fragment */
-        std::vector<Request *> fragmentRequests;
+        std::vector<RequestPtr> fragmentRequests;
 
         /** Packets matching fragmentRequests to issue fragments to memory */
         std::vector<Packet *> fragmentPackets;
index a2813b3dc537bf20effcef2db8552f45b124e9e3..a7a095c820bc34ac14c4dd343ee887656bcdccf4 100644 (file)
@@ -510,11 +510,11 @@ class LSQUnit {
 
   public:
     /** Executes the load at the given index. */
-    Fault read(Request *req, Request *sreqLow, Request *sreqHigh,
+    Fault read(RequestPtr req, RequestPtr sreqLow, RequestPtr sreqHigh,
                int load_idx);
 
     /** Executes the store at the given index. */
-    Fault write(Request *req, Request *sreqLow, Request *sreqHigh,
+    Fault write(RequestPtr req, RequestPtr sreqLow, RequestPtr sreqHigh,
                 uint8_t *data, int store_idx);
 
     /** Returns the index of the head load instruction. */
@@ -549,7 +549,7 @@ class LSQUnit {
 
 template <class Impl>
 Fault
-LSQUnit<Impl>::read(Request *req, Request *sreqLow, Request *sreqHigh,
+LSQUnit<Impl>::read(RequestPtr req, RequestPtr sreqLow, RequestPtr sreqHigh,
                     int load_idx)
 {
     DynInstPtr load_inst = loadQueue[load_idx];
@@ -883,7 +883,7 @@ LSQUnit<Impl>::read(Request *req, Request *sreqLow, Request *sreqHigh,
 
 template <class Impl>
 Fault
-LSQUnit<Impl>::write(Request *req, Request *sreqLow, Request *sreqHigh,
+LSQUnit<Impl>::write(RequestPtr req, RequestPtr sreqLow, RequestPtr sreqHigh,
                      uint8_t *data, int store_idx)
 {
     assert(storeQueue[store_idx].inst);
index ca6a7f399c4c0e3b74a35de04cb83ecfec9bc9bc..e8e2c18531d7b7619192224dde3e6993bdb09ccd 100644 (file)
@@ -831,7 +831,7 @@ LSQUnit<Impl>::writebackStores()
 
         DynInstPtr inst = storeQueue[storeWBIdx].inst;
 
-        Request *req = storeQueue[storeWBIdx].req;
+        RequestPtr req = storeQueue[storeWBIdx].req;
         RequestPtr sreqLow = storeQueue[storeWBIdx].sreqLow;
         RequestPtr sreqHigh = storeQueue[storeWBIdx].sreqHigh;
 
index 7a368ab321e45357e3cac5a10032098e08ee4acb..0e7c59f6a511457954fa211647bc82735c6a3ba0 100644 (file)
@@ -331,7 +331,7 @@ AtomicSimpleCPU::readMem(Addr addr, uint8_t * data, unsigned size,
     SimpleThread* thread = t_info.thread;
 
     // use the CPU's statically allocated read request and packet objects
-    Request *req = &data_read_req;
+    RequestPtr req = &data_read_req;
 
     if (traceData)
         traceData->setMem(addr, size, flags);
@@ -435,7 +435,7 @@ AtomicSimpleCPU::writeMem(uint8_t *data, unsigned size, Addr addr,
     }
 
     // use the CPU's statically allocated write request and packet objects
-    Request *req = &data_write_req;
+    RequestPtr req = &data_write_req;
 
     if (traceData)
         traceData->setMem(addr, size, flags);
index 36a2cb06c81eeed5c345872cb82a61b4162e8942..025c7a3eab0e192ad83764c8f3cac2b63c9f79d2 100644 (file)
@@ -468,7 +468,7 @@ BaseSimpleCPU::checkForInterrupts()
 
 
 void
-BaseSimpleCPU::setupFetchRequest(Request *req)
+BaseSimpleCPU::setupFetchRequest(RequestPtr req)
 {
     SimpleExecContext &t_info = *threadInfo[curThread];
     SimpleThread* thread = t_info.thread;
index 15ab2aba4accb69d4cdc466c474c2939db8b90a5..64fa58d92e0aeb6c639620e0cc0356c64645a7f0 100644 (file)
@@ -129,7 +129,7 @@ class BaseSimpleCPU : public BaseCPU
 
 
     void checkForInterrupts();
-    void setupFetchRequest(Request *req);
+    void setupFetchRequest(RequestPtr req);
     void preExecute();
     void postExecute();
     void advancePC(const Fault &fault);
index 083de2b40748149d3d5ee9c749dbe9d434e4f184..657c2976f4e1215332c1e41b6244ba82f7514637 100644 (file)
@@ -620,7 +620,7 @@ TimingSimpleCPU::fetch()
 
     if (needToFetch) {
         _status = BaseSimpleCPU::Running;
-        Request *ifetch_req = new Request();
+        RequestPtr ifetch_req = new Request();
         ifetch_req->taskId(taskId());
         ifetch_req->setContext(thread->contextId());
         setupFetchRequest(ifetch_req);
index c5c48f1adf4a0139a4fbb1430bd86acc0d56ddb3..3319e8400e408dae033031b53a5ea7b0ee0ac20e 100644 (file)
@@ -60,7 +60,7 @@ InvalidateGenerator::initiate()
     Packet::Command cmd;
 
     // For simplicity, requests are assumed to be 1 byte-sized
-    Request *req = new Request(m_address, 1, flags, masterId);
+    RequestPtr req = new Request(m_address, 1, flags, masterId);
 
     //
     // Based on the current state, issue a load or a store
index 386a498937a40aa02945d4c781569d1fca8954c0..17ae04cdf0c0533dd41f5e6572be29711585795f 100644 (file)
@@ -60,7 +60,7 @@ SeriesRequestGenerator::initiate()
     Request::Flags flags;
 
     // For simplicity, requests are assumed to be 1 byte-sized
-    Request *req = new Request(m_address, 1, flags, masterId);
+    RequestPtr req = new Request(m_address, 1, flags, masterId);
 
     Packet::Command cmd;
     bool do_write = (random_mt.random(0, 100) < m_percent_writes);
index 56edd842b14559fa8258e5e6777468fa09ddfd54..be1921aad81112c1f8d7486371c095cdd97b2733 100644 (file)
@@ -129,7 +129,7 @@ GarnetSyntheticTraffic::init()
 void
 GarnetSyntheticTraffic::completeRequest(PacketPtr pkt)
 {
-    Request *req = pkt->req;
+    RequestPtr req = pkt->req;
 
     DPRINTF(GarnetSyntheticTraffic,
             "Completed injection of %s packet for address %x\n",
@@ -279,7 +279,7 @@ GarnetSyntheticTraffic::generatePkt()
     //
     MemCmd::Command requestType;
 
-    Request *req = nullptr;
+    RequestPtr req = nullptr;
     Request::Flags flags;
 
     // Inject in specific Vnet
index ccd978c94922c0bd86d3424c789761d07722266d..89b4d1159cef2c4e9670468d8a548cf44a860a58 100644 (file)
@@ -136,7 +136,7 @@ MemTest::getMasterPort(const std::string &if_name, PortID idx)
 void
 MemTest::completeRequest(PacketPtr pkt, bool functional)
 {
-    Request *req = pkt->req;
+    RequestPtr req = pkt->req;
     assert(req->getSize() == 1);
 
     // this address is no longer outstanding
@@ -246,7 +246,7 @@ MemTest::tick()
 
     bool do_functional = (random_mt.random(0, 100) < percentFunctional) &&
         !uncacheable;
-    Request *req = new Request(paddr, 1, flags, masterId);
+    RequestPtr req = new Request(paddr, 1, flags, masterId);
     req->setContext(id);
 
     outstandingAddrs.insert(paddr);
index 2ce79e72d29b49f03cfdf326b856fd50f8ead003..776d711a2149469e61dad6f47dad1f7f7a233a9b 100644 (file)
@@ -107,7 +107,7 @@ Check::initiatePrefetch()
     }
 
     // Prefetches are assumed to be 0 sized
-    Request *req = new Request(m_address, 0, flags,
+    RequestPtr req = new Request(m_address, 0, flags,
             m_tester_ptr->masterId(), curTick(), m_pc);
     req->setContext(index);
 
@@ -146,7 +146,7 @@ Check::initiateFlush()
 
     Request::Flags flags;
 
-    Request *req = new Request(m_address, CHECK_SIZE, flags,
+    RequestPtr req = new Request(m_address, CHECK_SIZE, flags,
             m_tester_ptr->masterId(), curTick(), m_pc);
 
     Packet::Command cmd;
@@ -179,7 +179,7 @@ Check::initiateAction()
     Addr writeAddr(m_address + m_store_count);
 
     // Stores are assumed to be 1 byte-sized
-    Request *req = new Request(writeAddr, 1, flags, m_tester_ptr->masterId(),
+    RequestPtr req = new Request(writeAddr, 1, flags, m_tester_ptr->masterId(),
                                curTick(), m_pc);
 
     req->setContext(index);
@@ -244,7 +244,7 @@ Check::initiateCheck()
     }
 
     // Checks are sized depending on the number of bytes written
-    Request *req = new Request(m_address, CHECK_SIZE, flags,
+    RequestPtr req = new Request(m_address, CHECK_SIZE, flags,
                                m_tester_ptr->masterId(), curTick(), m_pc);
 
     req->setContext(index);
index cd568f1517bd25cae0ba0065f12b516c17d7dbcd..b5b4f5817d977a39d7342c1c4e1af6bc7053958d 100644 (file)
@@ -59,7 +59,7 @@ BaseGen::getPacket(Addr addr, unsigned size, const MemCmd& cmd,
                    Request::FlagsType flags)
 {
     // Create new request
-    Request *req = new Request(addr, size, flags, masterID);
+    RequestPtr req = new Request(addr, size, flags, masterID);
     // Dummy PC to have PC-based prefetchers latch on; get entropy into higher
     // bits
     req->setPC(((Addr)masterID) << 2);
index aa4f0a322abc4600fae8ad7b7b0b11af11ee7575..042347cf2b0b243f021d10f905d915407a6ff948 100644 (file)
@@ -1178,7 +1178,7 @@ ComputeUnit::DTLBPort::recvTimingResp(PacketPtr pkt)
             if (!stride)
                 break;
 
-            Request *prefetch_req = new Request(0, vaddr + stride * pf *
+            RequestPtr prefetch_req = new Request(0, vaddr + stride * pf *
                                                 TheISA::PageBytes,
                                                 sizeof(uint8_t), 0,
                                                 computeUnit->masterId(),
@@ -1801,7 +1801,7 @@ ComputeUnit::sendToLds(GPUDynInstPtr gpuDynInst)
 {
     // this is just a request to carry the GPUDynInstPtr
     // back and forth
-    Request *newRequest = new Request();
+    RequestPtr newRequest = new Request();
     newRequest->setPaddr(0x0);
 
     // ReadReq is not evaluted by the LDS but the Packet ctor requires this
index c989d67488e8744fa9f6a9f5660c560c54b36165..36ef1e1e894d8d9efe2d96daffd053dd2f879f66 100644 (file)
@@ -145,7 +145,7 @@ FetchUnit::initiateFetch(Wavefront *wavefront)
     }
 
     // set up virtual request
-    Request *req = new Request(0, vaddr, size, Request::INST_FETCH,
+    RequestPtr req = new Request(0, vaddr, size, Request::INST_FETCH,
                                computeUnit->masterId(), 0, 0, 0);
 
     PacketPtr pkt = new Packet(req, MemCmd::ReadReq);
index 8d259cba0370c2776442b0bde8ff8ab9aab4c8fd..4b1c9fde94bf7240324a287c27b05950a36f3994 100644 (file)
@@ -382,7 +382,7 @@ class GPUDynInst : public GPUExecContext
     }
 
     void
-    setRequestFlags(Request *req, bool setMemOrder=true)
+    setRequestFlags(RequestPtr req, bool setMemOrder=true)
     {
         // currently these are the easy scopes to deduce
         if (isPrivateSeg()) {
index d3453c2f9c198502f596e298584110a6a1717a19..8e7ba9ad589bc71d2359de4f430fc4c09ab7ba0f 100644 (file)
@@ -338,7 +338,7 @@ Shader::AccessMem(uint64_t address, void *ptr, uint32_t size, int cu_id,
 
     for (ChunkGenerator gen(address, size, cuList.at(cu_id)->cacheLineSize());
          !gen.done(); gen.next()) {
-        Request *req = new Request(0, gen.addr(), gen.size(), 0,
+        RequestPtr req = new Request(0, gen.addr(), gen.size(), 0,
                                    cuList[0]->masterId(), 0, 0, 0);
 
         doFunctionalAccess(req, cmd, data_buf, suppress_func_errors, cu_id);
index b41c82b0de037daf1754943fc8d0068ad5530eac..1d112dc06a4d9a7d19fdec71bc5d5c0f7c132b6d 100644 (file)
@@ -199,7 +199,7 @@ AbstractMemory::getAddrRange() const
 void
 AbstractMemory::trackLoadLocked(PacketPtr pkt)
 {
-    Request *req = pkt->req;
+    RequestPtr req = pkt->req;
     Addr paddr = LockedAddr::mask(req->getPaddr());
 
     // first we check if we already have a locked addr for this
@@ -230,7 +230,7 @@ AbstractMemory::trackLoadLocked(PacketPtr pkt)
 bool
 AbstractMemory::checkLockedAddrList(PacketPtr pkt)
 {
-    Request *req = pkt->req;
+    RequestPtr req = pkt->req;
     Addr paddr = LockedAddr::mask(req->getPaddr());
     bool isLLSC = pkt->isLLSC();
 
index b57f73b4a53e7cb01aa128cbe5e2edf20df35d5a..29c8c3f3e1efa6c56cb7d278c0e2de74613e0bf1 100644 (file)
@@ -79,12 +79,12 @@ class LockedAddr {
     static Addr mask(Addr paddr) { return (paddr & ~Addr_Mask); }
 
     // check for matching execution context
-    bool matchesContext(Request *req) const
+    bool matchesContext(RequestPtr req) const
     {
         return (contextId == req->contextId());
     }
 
-    LockedAddr(Request *req) : addr(mask(req->getPaddr())),
+    LockedAddr(RequestPtr req) : addr(mask(req->getPaddr())),
                                contextId(req->contextId())
     {}
 
@@ -140,7 +140,7 @@ class AbstractMemory : public MemObject
     // this method must be called on *all* stores since even
     // non-conditional stores must clear any matching lock addresses.
     bool writeOK(PacketPtr pkt) {
-        Request *req = pkt->req;
+        RequestPtr req = pkt->req;
         if (lockedAddrList.empty()) {
             // no locked addrs: nothing to check, store_conditional fails
             bool isLLSC = pkt->isLLSC();
index a8f29e3709a167565ab91086b8a556f415b21af7..f753cc315153010cd6ef1225ea41f46fe8b8c269 100644 (file)
@@ -1278,7 +1278,7 @@ BaseCache::writebackBlk(CacheBlk *blk)
 
     writebacks[Request::wbMasterId]++;
 
-    Request *req = new Request(regenerateBlkAddr(blk), blkSize, 0,
+    RequestPtr req = new Request(regenerateBlkAddr(blk), blkSize, 0,
                                Request::wbMasterId);
     if (blk->isSecure())
         req->setFlags(Request::SECURE);
@@ -1313,7 +1313,7 @@ BaseCache::writebackBlk(CacheBlk *blk)
 PacketPtr
 BaseCache::writecleanBlk(CacheBlk *blk, Request::Flags dest, PacketId id)
 {
-    Request *req = new Request(regenerateBlkAddr(blk), blkSize, 0,
+    RequestPtr req = new Request(regenerateBlkAddr(blk), blkSize, 0,
                                Request::wbMasterId);
     if (blk->isSecure()) {
         req->setFlags(Request::SECURE);
index 34f3dc5b913fcf4a0e6f3586295e12dc328a251a..86c1640e5cd1bf2fe1dd599e8c5566599e77ce10 100644 (file)
@@ -872,7 +872,8 @@ Cache::cleanEvictBlk(CacheBlk *blk)
     assert(!writebackClean);
     assert(blk && blk->isValid() && !blk->isDirty());
     // Creating a zero sized write, a message to the snoop filter
-    Request *req =
+
+    RequestPtr req =
         new Request(regenerateBlkAddr(blk), blkSize, 0,
                     Request::wbMasterId);
     if (blk->isSecure())
index bf3a384ea9028cebbaeef48adb2ae71652fc7288..00d62f17f72e4e9abb184ab774fdfff7206846a9 100644 (file)
@@ -223,7 +223,7 @@ QueuedPrefetcher::insert(AddrPriority &pf_info, bool is_secure)
     }
 
     /* Create a prefetch memory request */
-    Request *pf_req =
+    RequestPtr pf_req =
         new Request(pf_info.first, blkSize, 0, masterId);
 
     if (is_secure) {