From 974bbdd24404830538f6ab1efe3062e4a411e3ae Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 22 Mar 2016 15:12:07 +0000 Subject: Relax too strong DCHECK. There may be a lifetime hole in the interval, which means the interval does not cover the given position. bug:27617589 Change-Id: Iabd2b3d82936bed498f87be1a01760210954f97e --- compiler/optimizing/register_allocator.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/optimizing/register_allocator.cc b/compiler/optimizing/register_allocator.cc index b8d76b912e..48b7a97b72 100644 --- a/compiler/optimizing/register_allocator.cc +++ b/compiler/optimizing/register_allocator.cc @@ -1919,7 +1919,13 @@ void RegisterAllocator::Resolve() { BitVector* live = liveness_.GetLiveInSet(*block); for (uint32_t idx : live->Indexes()) { LiveInterval* interval = liveness_.GetInstructionFromSsaIndex(idx)->GetLiveInterval(); - DCHECK(!interval->GetSiblingAt(block->GetLifetimeStart())->HasRegister()); + LiveInterval* sibling = interval->GetSiblingAt(block->GetLifetimeStart()); + // `GetSiblingAt` returns the sibling that contains a position, but there could be + // a lifetime hole in it. `CoversSlow` returns whether the interval is live at that + // position. + if (sibling->CoversSlow(block->GetLifetimeStart())) { + DCHECK(!sibling->HasRegister()); + } } } } else { -- cgit v1.2.3-59-g8ed1b