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/cpu/o3/lsq_unit_impl.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cpu/o3/lsq_unit_impl.hh') diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh index 416f3e7e7..547800b4c 100644 --- a/src/cpu/o3/lsq_unit_impl.hh +++ b/src/cpu/o3/lsq_unit_impl.hh @@ -612,12 +612,12 @@ LSQUnit::executeLoad(DynInstPtr &inst) // If the instruction faulted or predicated false, then we need to send it // along to commit without the instruction completing. - if (load_fault != NoFault || inst->readPredicate() == false) { + if (load_fault != NoFault || !inst->readPredicate()) { // Send this instruction to commit, also make sure iew stage // realizes there is activity. // Mark it as executed unless it is an uncached load that // needs to hit the head of commit. - if (inst->readPredicate() == false) + if (!inst->readPredicate()) inst->forwardOldRegs(); DPRINTF(LSQUnit, "Load [sn:%lli] not executed from %s\n", inst->seqNum, @@ -665,7 +665,7 @@ LSQUnit::executeStore(DynInstPtr &store_inst) store_fault == NoFault) return store_fault; - if (store_inst->readPredicate() == false) + if (!store_inst->readPredicate()) store_inst->forwardOldRegs(); if (storeQueue[store_idx].size == 0) { @@ -673,7 +673,7 @@ LSQUnit::executeStore(DynInstPtr &store_inst) store_inst->pcState(), store_inst->seqNum); return store_fault; - } else if (store_inst->readPredicate() == false) { + } else if (!store_inst->readPredicate()) { DPRINTF(LSQUnit, "Store [sn:%lli] not executed from predication\n", store_inst->seqNum); return store_fault; -- cgit v1.2.3