From 0be64ffe2f4ff8824b3084362706ffbf456ea490 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sat, 31 May 2014 18:00:23 -0700 Subject: style: eliminate equality tests with true and false Using '== true' in a boolean expression is totally redundant, and using '== false' is pretty verbose (and arguably less readable in most cases) compared to '!'. It's somewhat of a pet peeve, perhaps, but I had some time waiting for some tests to run and decided to clean these up. Unfortunately, SLICC appears not to have the '!' operator, so I had to leave the '== false' tests in the SLICC code. --- src/mem/protocol/MOESI_CMP_token-L1cache.sm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mem/protocol/MOESI_CMP_token-L1cache.sm') diff --git a/src/mem/protocol/MOESI_CMP_token-L1cache.sm b/src/mem/protocol/MOESI_CMP_token-L1cache.sm index 7400ba12e..2b15dc8bf 100644 --- a/src/mem/protocol/MOESI_CMP_token-L1cache.sm +++ b/src/mem/protocol/MOESI_CMP_token-L1cache.sm @@ -261,7 +261,7 @@ machine(L1Cache, "Token protocol") } else if (is_valid(cache_entry)) { return cache_entry.CacheState; } else { - if ((persistentTable.isLocked(addr) == true) && (persistentTable.findSmallest(addr) != machineID)) { + if (persistentTable.isLocked(addr) && (persistentTable.findSmallest(addr) != machineID)) { // Not in cache, in persistent table, but this processor isn't highest priority return State:I_L; } else { @@ -1401,7 +1401,7 @@ machine(L1Cache, "Token protocol") assert(is_valid(tbe)); if (tbe.WentPersistent) { - // assert(starving == true); + // assert(starving); outstandingRequests := outstandingRequests - 1; enqueue(persistentNetwork_out, PersistentMsg, l1_request_latency) { out_msg.Addr := address; @@ -1428,7 +1428,7 @@ machine(L1Cache, "Token protocol") // Update average latency if (tbe.IssueCount <= 1) { - if (tbe.ExternalResponse == true) { + if (tbe.ExternalResponse) { updateAverageLatencyEstimate(curCycle() - tbe.IssueTime); } } -- cgit v1.2.3