mem,gpu-compute: Stop using the GEM5_NO_DISCARD macro.

The [[nodiscard]] attribute is now standard, so we can use that
directly.

Change-Id: I57f59935858facb2a15bf4712be4bfd584bf0c7e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48509
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-07-23 23:13:13 -07:00
committed by Gabe Black
parent b17f4c3037
commit 59496b6136
4 changed files with 4 additions and 4 deletions

View File

@@ -479,7 +479,7 @@ class ComputeUnit : public ClockedObject
int32_t
getRefCounter(const uint32_t dispatchId, const uint32_t wgId) const;
GEM5_NO_DISCARD bool sendToLds(GPUDynInstPtr gpuDynInst);
[[nodiscard]] bool sendToLds(GPUDynInstPtr gpuDynInst);
typedef std::unordered_map<Addr, std::pair<int, int>> pageDataStruct;
pageDataStruct pageAccesses;

View File

@@ -808,7 +808,7 @@ class BaseCache : public ClockedObject
* @param blk Block to invalidate
* @return A packet with the writeback, can be nullptr
*/
GEM5_NO_DISCARD virtual PacketPtr evictBlock(CacheBlk *blk) = 0;
[[nodiscard]] virtual PacketPtr evictBlock(CacheBlk *blk) = 0;
/**
* Evict a cache block.

View File

@@ -137,7 +137,7 @@ class Cache : public BaseCache
uint32_t handleSnoop(PacketPtr pkt, CacheBlk *blk,
bool is_timing, bool is_deferred, bool pending_inval);
GEM5_NO_DISCARD PacketPtr evictBlock(CacheBlk *blk) override;
[[nodiscard]] PacketPtr evictBlock(CacheBlk *blk) override;
/**
* Create a CleanEvict request for the given block.

View File

@@ -120,7 +120,7 @@ class NoncoherentCache : public BaseCache
bool needs_writable,
bool is_whole_line_write) const override;
GEM5_NO_DISCARD PacketPtr evictBlock(CacheBlk *blk) override;
[[nodiscard]] PacketPtr evictBlock(CacheBlk *blk) override;
public:
NoncoherentCache(const NoncoherentCacheParams &p);