OSDN Git Service

ART: Fix dominance for irreducible loops
authorDavid Brazdil <dbrazdil@google.com>
Fri, 6 May 2016 11:46:21 +0000 (12:46 +0100)
committerDavid Brazdil <dbrazdil@google.com>
Fri, 6 May 2016 12:10:16 +0000 (13:10 +0100)
commit3f4a522cc39f5c651e7c718196e989bc81d8c6ef
tree37820ae22c0e96817f6278ebe71f4588f26eab15
parentbc177b3f3461f1db013d5511344ebe52270e136f
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.cc
compiler/optimizing/nodes.h
test/598-checker-irreducible-dominance/expected.txt [new file with mode: 0644]
test/598-checker-irreducible-dominance/info.txt [new file with mode: 0644]
test/598-checker-irreducible-dominance/smali/IrreducibleLoop.smali [new file with mode: 0644]
test/598-checker-irreducible-dominance/src/Main.java [new file with mode: 0644]