diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2014-05-31 18:00:23 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2014-05-31 18:00:23 -0700 |
commit | 0be64ffe2f4ff8824b3084362706ffbf456ea490 (patch) | |
tree | 795d803dcfaa3b92faa1155ce2c835daf2d76290 /src/cpu/o3/lsq_unit_impl.hh | |
parent | 2a8088f5aec433b6a1a2330f4fbc29ae28b5ee73 (diff) | |
download | gem5-0be64ffe2f4ff8824b3084362706ffbf456ea490.tar.xz |
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.
Diffstat (limited to 'src/cpu/o3/lsq_unit_impl.hh')
-rw-r--r-- | src/cpu/o3/lsq_unit_impl.hh | 8 |
1 files changed, 4 insertions, 4 deletions
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<Impl>::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<Impl>::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<Impl>::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; |