diff options
author | Andreas Gampe <agampe@google.com> | 2015-10-29 04:02:22 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-10-29 04:02:22 +0000 |
commit | deb2a896cad5bcd22bbe21c3b09fd8efa6ad1d13 (patch) | |
tree | d2c5cefb419cd0f9bdad2bba939235fbe2c5fbfd /compiler/optimizing/load_store_elimination.cc | |
parent | 59a984e8e2dc3a4d5c220518f762ba9b1c0de44c (diff) | |
parent | 594c0612519e96bcc1bd42ff4dcbfa2c53b09c5a (diff) |
Merge "Revert "Enable store elimination for singleton objects.""
am: 594c061251
* commit '594c0612519e96bcc1bd42ff4dcbfa2c53b09c5a':
Revert "Enable store elimination for singleton objects."
Diffstat (limited to 'compiler/optimizing/load_store_elimination.cc')
-rw-r--r-- | compiler/optimizing/load_store_elimination.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/compiler/optimizing/load_store_elimination.cc b/compiler/optimizing/load_store_elimination.cc index aa9c315ddd0..90f28e511e2 100644 --- a/compiler/optimizing/load_store_elimination.cc +++ b/compiler/optimizing/load_store_elimination.cc @@ -695,12 +695,8 @@ class LSEVisitor : public HGraphVisitor { } else { redundant_store = true; } - HNewInstance* new_instance = ref_info->GetReference()->AsNewInstance(); - DCHECK(new_instance != nullptr); - if (new_instance->IsFinalizable()) { - // Finalizable objects escape globally. Need to keep the store. - redundant_store = false; - } + // TODO: eliminate the store if the singleton object is not finalizable. + redundant_store = false; } if (redundant_store) { removed_instructions_.push_back(instruction); @@ -838,9 +834,7 @@ class LSEVisitor : public HGraphVisitor { return; } if (!heap_location_collector_.MayDeoptimize() && - ref_info->IsSingletonAndNotReturned() && - !new_instance->IsFinalizable() && - !new_instance->CanThrow()) { + ref_info->IsSingletonAndNotReturned()) { // The allocation might be eliminated. singleton_new_instances_.push_back(new_instance); } |