OSDN Git Service

Fix merging HLoadClass with HNewInstance.
authorVladimir Marko <vmarko@google.com>
Wed, 29 Jun 2016 13:59:07 +0000 (14:59 +0100)
committerVladimir Marko <vmarko@google.com>
Wed, 29 Jun 2016 16:51:50 +0000 (17:51 +0100)
commit2b8b6040d0d34f40e3db71f0e4b1c369fd1f02c6
treebc70900b08b5f491fcfcab41b28222020ec75c60
parent0748ed9fcf63b8fc23e0d8f019ddc933f47fda10
Fix merging HLoadClass with HNewInstance.

Do not merge HLoadClass with HNewInstance if they do not
come from the same dex instruction. This is the same check
as for moving the clinit check responsibility around.

Test: Added a regression test, run standard ART test suite
plus gcstress and ndebug modes on host and Nexus 9.

Bug: 29570861
Bug: 29321958

(cherry picked from commit c7591b4c0dd405a766f4d701deea6c3750101978)

Change-Id: I0f019c36dd991889caad2666e61bbcc6d9d9c91f
compiler/optimizing/prepare_for_register_allocation.cc
test/478-checker-clinit-check-pruning/expected.txt
test/478-checker-clinit-check-pruning/src/Main.java