From 86d32c4969633a25a28a82bc1d414b0354cf95db Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 4 Mar 2020 01:50:53 -0800 Subject: [PATCH] mem: Merge the virtual Request constructors. The only difference was whether the the atomic op functor was accepted as an argument. If it wasn't, setVirt would be called without an op functor argument where it will default to nullptr. This change deletes the constructor which doesn't take an atomic op functor and in the other defaults the functor to nullptr. Functionally nothing changes, but the code is now simpler. Change-Id: Iff06543b1046594df297344e16961ee9d0f0a373 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26231 Tested-by: kokoro Reviewed-by: Nikos Nikoleris Maintainer: Gabe Black --- src/mem/request.hh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/mem/request.hh b/src/mem/request.hh index 772dafc94..7beae371d 100644 --- a/src/mem/request.hh +++ b/src/mem/request.hh @@ -388,16 +388,9 @@ class Request privateFlags.set(VALID_PADDR|VALID_SIZE); } - Request(uint64_t asid, Addr vaddr, unsigned size, Flags flags, - MasterID mid, Addr pc, ContextID cid) - { - setVirt(asid, vaddr, size, flags, mid, pc); - setContext(cid); - } - Request(uint64_t asid, Addr vaddr, unsigned size, Flags flags, MasterID mid, Addr pc, ContextID cid, - AtomicOpFunctorPtr atomic_op) + AtomicOpFunctorPtr atomic_op=nullptr) { setVirt(asid, vaddr, size, flags, mid, pc, std::move(atomic_op)); setContext(cid); @@ -455,7 +448,7 @@ class Request */ void setVirt(uint64_t asid, Addr vaddr, unsigned size, Flags flags, - MasterID mid, Addr pc, AtomicOpFunctorPtr amo_op = nullptr) + MasterID mid, Addr pc, AtomicOpFunctorPtr amo_op=nullptr) { _asid = asid; _vaddr = vaddr; -- 2.30.2