diff options
| author | 2016-06-27 22:58:49 +0000 | |
|---|---|---|
| committer | 2016-06-27 22:58:49 +0000 | |
| commit | ff5dad388b7bfbe1eaed4e3dc7a84feb10302aa0 (patch) | |
| tree | 47f64732046a9cb0d484d3564b68bdf69eb4bbfa /compiler/optimizing | |
| parent | 80e148779340e72724764b2d99c3683069cda1f9 (diff) | |
| parent | c2f1735e04537c94a8505aa2badd31281087ab51 (diff) | |
Do not remove loads/store with unresolved accesses.
am: c2f1735e04
Change-Id: I83f86184e8ab5bd1143b8f66d35bd4c752995ea4
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/load_store_elimination.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/load_store_elimination.cc b/compiler/optimizing/load_store_elimination.cc index b4d93add9c..874f3be9b8 100644 --- a/compiler/optimizing/load_store_elimination.cc +++ b/compiler/optimizing/load_store_elimination.cc @@ -65,6 +65,16 @@ class ReferenceInfo : public ArenaObject<kArenaAllocMisc> { is_singleton_and_not_returned_ = false; return; } + if ((user->IsUnresolvedInstanceFieldGet() && (reference_ == user->InputAt(0))) || + (user->IsUnresolvedInstanceFieldSet() && (reference_ == user->InputAt(0)))) { + // The field is accessed in an unresolved way. We mark the object as a singleton to + // disable load/store optimizations on it. + // Note that we could optimize this case and still perform some optimizations until + // we hit the unresolved access, but disabling is the simplest. + is_singleton_ = false; + is_singleton_and_not_returned_ = false; + return; + } if (user->IsReturn()) { is_singleton_and_not_returned_ = false; } |