summaryrefslogtreecommitdiff
path: root/compiler/optimizing/register_allocation_resolver.cc
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2022-02-18 14:10:25 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2022-02-25 08:18:14 +0000
commit872ec72de447b2803894e17253399a54a4c10e1f (patch)
tree244ca496149b8e1d9d4c786609c91da7f93f8736 /compiler/optimizing/register_allocation_resolver.cc
parent0805e9083aa761094575cd3c4d1eff41bbcf5b74 (diff)
Update compiler/ implications to use (D)CHECK_IMPLIES
Follow-up to aosp/1988868 in which we added the (D)CHECK_IMPLIES macro. This CL uses it on compiler/ occurrences found by a regex. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: If63aed969bfb8b31d6fbbcb3bca2b04314c894b7
Diffstat (limited to 'compiler/optimizing/register_allocation_resolver.cc')
-rw-r--r--compiler/optimizing/register_allocation_resolver.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/optimizing/register_allocation_resolver.cc b/compiler/optimizing/register_allocation_resolver.cc
index 670db42f6f..875c633889 100644
--- a/compiler/optimizing/register_allocation_resolver.cc
+++ b/compiler/optimizing/register_allocation_resolver.cc
@@ -75,7 +75,7 @@ void RegisterAllocationResolver::Resolve(ArrayRef<HInstruction* const> safepoint
}
} else if (instruction->IsCurrentMethod()) {
// The current method is always at offset 0.
- DCHECK(!current->HasSpillSlot() || (current->GetSpillSlot() == 0));
+ DCHECK_IMPLIES(current->HasSpillSlot(), (current->GetSpillSlot() == 0));
} else if (instruction->IsPhi() && instruction->AsPhi()->IsCatchPhi()) {
DCHECK(current->HasSpillSlot());
size_t slot = current->GetSpillSlot()
@@ -306,9 +306,9 @@ void RegisterAllocationResolver::ConnectSiblings(LiveInterval* interval) {
size_t num_of_slots = interval->NumberOfSpillSlotsNeeded();
loc = Location::StackSlotByNumOfSlots(num_of_slots, interval->GetParent()->GetSpillSlot());
- CHECK(!loc.IsSIMDStackSlot() ||
- (codegen_->GetSIMDRegisterWidth() / kVRegSize == num_of_slots)) <<
- "Unexpected number of spill slots";
+ CHECK_IMPLIES(loc.IsSIMDStackSlot(),
+ (codegen_->GetSIMDRegisterWidth() / kVRegSize == num_of_slots))
+ << "Unexpected number of spill slots";
InsertMoveAfter(interval->GetDefinedBy(), interval->ToLocation(), loc);
}
UsePositionList::const_iterator use_it = current->GetUses().begin();
@@ -468,9 +468,9 @@ void RegisterAllocationResolver::ConnectSplitSiblings(LiveInterval* interval,
DCHECK(defined_by->IsCurrentMethod());
size_t num_of_slots = parent->NumberOfSpillSlotsNeeded();
location_source = Location::StackSlotByNumOfSlots(num_of_slots, parent->GetSpillSlot());
- CHECK(!location_source.IsSIMDStackSlot() ||
- (codegen_->GetSIMDRegisterWidth() == num_of_slots * kVRegSize)) <<
- "Unexpected number of spill slots";
+ CHECK_IMPLIES(location_source.IsSIMDStackSlot(),
+ (codegen_->GetSIMDRegisterWidth() == num_of_slots * kVRegSize))
+ << "Unexpected number of spill slots";
}
} else {
DCHECK(source != nullptr);