diff options
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); } |