From 6e0dfe906a46ea431944357e0fdb5bda2fe57582 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Wed, 9 Sep 2020 22:26:29 -0700 Subject: [PATCH] cpu: Fixed unused var error when with fast builds As `is_htm_speculative` is only used in assert statements, it is considered unused during the `.fast` compilation. This commit adds the `M5_USED_VAR` macro. This caused our compiler tests to fail: https://www.mail-archive.com/gem5-dev@gem5.org/msg35913.html Change-Id: I00d187d1a31d065c236ac29a657bd479ad4b03bc Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34256 Maintainer: Bobby R. Bruce Reviewed-by: Gabe Black Tested-by: kokoro --- src/cpu/simple/timing.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index f22c58ddd..820bede1b 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -947,7 +947,7 @@ TimingSimpleCPU::completeDataAccess(PacketPtr pkt) // hardware transactional memory SimpleExecContext *t_info = threadInfo[curThread]; - const bool is_htm_speculative = + const bool is_htm_speculative M5_VAR_USED = t_info->inHtmTransactionalState(); // received a response from the dcache: complete the load or store -- 2.30.2