OSDN Git Service

ART: Update DCHECKs in SsaLivenessAnalysis::AddBackEdgeUses
authorDavid Brazdil <dbrazdil@google.com>
Thu, 14 Apr 2016 12:47:24 +0000 (13:47 +0100)
committerDavid Brazdil <dbrazdil@google.com>
Fri, 15 Apr 2016 09:29:49 +0000 (10:29 +0100)
commitc93a0d1cff502c05888fcd5d959f561d582be1bc
treee6ddb36141ef053337fedc78a31e43e1703a6aad
parent1153ae16f243adb30fc8509c619025d30408c74a
ART: Update DCHECKs in SsaLivenessAnalysis::AddBackEdgeUses

Graph linearization in the presence of irreducible loops is not
guaranteed to generate a linear order where all blocks of a loop are
adjacent, first block is the header and last block is one of the back
edges.

These assumptions are made when inserting synthesized uses at the back
edges to aid the register allocator. Not meeting them will result in
the algorithm's early termination and back-edge uses not being added.

This patch updates the DCHECKs so the compiler does not fail in such
circumstances.

Bug: 27615840
Bug: 27624868

Change-Id: I63632e8819ea3644d5c6fdfea00b66128bf22c24
(cherry picked from commit adf84911030ca36835c48cbff8be6b078693fb00)
compiler/optimizing/ssa_liveness_analysis.h
test/594-checker-regression-irreducible-linorder/expected.txt [new file with mode: 0644]
test/594-checker-regression-irreducible-linorder/info.txt [new file with mode: 0644]
test/594-checker-regression-irreducible-linorder/smali/IrreducibleLoop.smali [new file with mode: 0644]
test/594-checker-regression-irreducible-linorder/src/Main.java [new file with mode: 0644]