OSDN Git Service

Fix inlining loops in OSR mode.
authorVladimir Marko <vmarko@google.com>
Mon, 18 Apr 2016 14:37:01 +0000 (15:37 +0100)
committerVladimir Marko <vmarko@google.com>
Tue, 19 Apr 2016 12:59:15 +0000 (13:59 +0100)
commitfd66c50d64c38e40bafde83b4872e27bbff7546d
treee77ea1374211042d5eca3d1a62a81293a29eb108
parentc4d445a40bf00ab497b5e4d43a6b43eaafb5fa50
Fix inlining loops in OSR mode.

When compiling a method in OSR mode and the method does not
contain a loop (arguably, a very odd case) but we inline
another method with a loop and then the final DCE re-runs
the loop identification, the inlined loop would previously
be marked as irreducible. However, the SSA liveness analysis
expects irreducible loop to have extra loop Phis which were
already eliminated from the loop before the inner graph was
inlined to the outer graph, so we would fail a DCHECK().

We fix this by not marking inlined loops as irreducible when
compiling in OSR mode.

Bug: 28210356
Change-Id: If10057ed883333c62a878ed2ae3fe01bb5280e33
compiler/optimizing/nodes.cc
compiler/optimizing/ssa_liveness_analysis.cc
test/570-checker-osr/expected.txt
test/570-checker-osr/osr.cc
test/570-checker-osr/src/Main.java