Recompute dominator tree after DCE.
bug:22031382
Change-Id: Ifebe169897b76872015e3ce0ed7d0a9662f80cef
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 26eee1c..581645f 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -183,6 +183,9 @@
return true;
}
+ void ComputeDominanceInformation();
+ void ClearDominanceInformation();
+
void BuildDominatorTree();
void TransformToSsa();
void SimplifyCFG();
@@ -590,11 +593,10 @@
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_; }