summaryrefslogtreecommitdiff
path: root/compiler/optimizing/register_allocator.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2016-03-23 14:52:28 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-03-23 14:52:29 +0000
commitdba2b19c845f6bccb43a036fa8602197c3248ff2 (patch)
tree9ba73975794017d212148ab205b1fdc050eaef8d /compiler/optimizing/register_allocator.cc
parent3920099f578fd8015777bc3c1c7392a08b1e08e7 (diff)
parent974bbdd24404830538f6ab1efe3062e4a411e3ae (diff)
Merge "Relax too strong DCHECK."
Diffstat (limited to 'compiler/optimizing/register_allocator.cc')
-rw-r--r--compiler/optimizing/register_allocator.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/optimizing/register_allocator.cc b/compiler/optimizing/register_allocator.cc
index 34d9af1e74..44bede8ac0 100644
--- a/compiler/optimizing/register_allocator.cc
+++ b/compiler/optimizing/register_allocator.cc
@@ -1927,7 +1927,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 {