From 1f82ecc6a0c9f88d03d6d1a6d95eeb8707bd06c1 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 24 Jun 2015 12:20:24 +0100 Subject: Recompute dominator tree after DCE. bug:22031382 Change-Id: Ifebe169897b76872015e3ce0ed7d0a9662f80cef --- compiler/optimizing/nodes.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 26eee1c52e..581645f21a 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -183,6 +183,9 @@ class HGraph : public ArenaObject { return true; } + void ComputeDominanceInformation(); + void ClearDominanceInformation(); + void BuildDominatorTree(); void TransformToSsa(); void SimplifyCFG(); @@ -590,11 +593,10 @@ class HBasicBlock : public ArenaObject { LOG(FATAL) << "Unreachable"; UNREACHABLE(); } + void ClearDominanceInformation(); int NumberOfBackEdges() const { - return loop_information_ == nullptr - ? 0 - : loop_information_->NumberOfBackEdges(); + return IsLoopHeader() ? loop_information_->NumberOfBackEdges() : 0; } HInstruction* GetFirstInstruction() const { return instructions_.first_instruction_; } -- cgit v1.2.3-59-g8ed1b