OSDN Git Service

Revert "Revert "Enable store elimination for singleton objects.""
authorMingyao Yang <mingyao@google.com>
Mon, 2 Nov 2015 18:56:59 +0000 (10:56 -0800)
committerMingyao Yang <mingyao@google.com>
Wed, 18 Nov 2015 21:27:16 +0000 (13:27 -0800)
commitfb8464ae5f5194dc16278e528cfcbff71498c767
tree9361521497f31fd024f36980464d17bee7c83d52
parent9231730cd0e285373afd73331168b289309ebee4
Revert "Revert "Enable store elimination for singleton objects.""

This reverts commit 55d02cf056f993aeafebd54e7b7c68c7a48507c9, and
makes the following change:
Currently we leverage loop side effects to decide whether heap values are
killed by the loop. Stores need to be kept if heap values may be killed
by loops and the corresponding loads cannot be eliminated. Similar thing
need to be done for each predecessor when we merge predecessor heap values.
To do that, the HInstanceFieldSet instruction itself is put in the heap
value array instead of the value of the store instruction. The store
instruction may be added to possibly_removed_stores_ first, but can later
be removed from possibly_removed_stores_ when it's found out that the store
needs to be kept due to merging/loop side effects.

Change-Id: I4f7bb1960f7b47240873e00ff1adac46fc102a02
compiler/dex/quick/gen_common.cc
compiler/driver/compiler_driver.cc
compiler/driver/compiler_driver.h
compiler/optimizing/builder.cc
compiler/optimizing/builder.h
compiler/optimizing/load_store_elimination.cc
compiler/optimizing/nodes.h
test/530-checker-lse/src/Main.java