From 3f4a522cc39f5c651e7c718196e989bc81d8c6ef Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Fri, 6 May 2016 12:46:21 +0100 Subject: ART: Fix dominance for irreducible loops Computation of dominance was broken in the presence of irreducible loops because the algorithm assumed that back edges are always dominated by their respective headers and a fix-point iteration is therefore unnecessary. This is not true for irreducible loops, forcing us to revisit their loop headers and all dependent blocks. This patch adds a fix-point iteration if a back edge not dominated by its header is found. Bug: 28611485 Change-Id: If84044e49d5b9c682949648033d2861628d7fe05 --- compiler/optimizing/nodes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index afb995d438..1c0ad6a6cc 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -725,6 +725,8 @@ class HLoopInformation : public ArenaObject { blocks_.ClearAllBits(); } + bool HasBackEdgeNotDominatedByHeader() const; + private: // Internal recursive implementation of `Populate`. void PopulateRecursive(HBasicBlock* block); -- cgit v1.2.3-59-g8ed1b