From 6c82d40eb142771086f5531998de2273ba5cc08c Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Mon, 13 Oct 2014 16:10:27 +0100 Subject: Have HInstruction::StrictlyDominates compute strict dominance. Change-Id: I3a4fa133268615fb4ce54a0bcb43e0c2458cc865 --- compiler/optimizing/nodes.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/nodes.cc') diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index aee21770b7..10c60140ec 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -472,7 +472,11 @@ bool HInstructionList::FoundBefore(const HInstruction* instruction1, return true; } -bool HInstruction::Dominates(HInstruction* other_instruction) const { +bool HInstruction::StrictlyDominates(HInstruction* other_instruction) const { + if (other_instruction == this) { + // An instruction does not strictly dominate itself. + return false; + } HBasicBlock* block = GetBlock(); HBasicBlock* other_block = other_instruction->GetBlock(); if (block != other_block) { -- cgit v1.2.3-59-g8ed1b