OSDN Git Service

ART: Fix critical edge splitting under try/catch
authorDavid Brazdil <dbrazdil@google.com>
Fri, 6 Nov 2015 01:36:20 +0000 (01:36 +0000)
committerDavid Brazdil <dbrazdil@google.com>
Mon, 9 Nov 2015 10:27:08 +0000 (10:27 +0000)
commitdb51efb3617d15f1cd9e5ff0cc2d934777014e9a
treefa70acb9f8d090def2cae550db8c2e1f630f31c4
parent2649cba0fb7cdbd8fa60cb4f2fb320fb2b18ee37
ART: Fix critical edge splitting under try/catch

A critical edge would not be split if the predecessor ends with
TryBoundary. This would eventually trip liveness analysis because
a back edge block would have smaller liveness position than a nested
loop.

Another implication of this change is that an edge between a loop's
pre-header ending with TryBoundary and the header will be split,
guaranteeing that a pre-header always has just one successor.

Bug: 25493695
Bug: 25454012
Change-Id: I5a13b8bb74509b48f5d628906f7158af007f99ae
compiler/optimizing/graph_checker.cc
compiler/optimizing/induction_var_analysis_test.cc
compiler/optimizing/induction_var_range_test.cc
compiler/optimizing/licm_test.cc
compiler/optimizing/nodes.cc
test/547-regression-trycatch-critical-edge/expected.txt [new file with mode: 0644]
test/547-regression-trycatch-critical-edge/info.txt [new file with mode: 0644]
test/547-regression-trycatch-critical-edge/smali/TestCase.smali [new file with mode: 0644]
test/547-regression-trycatch-critical-edge/src/Main.java [new file with mode: 0644]