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/builder.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/builder.cc')
-rw-r--r-- | compiler/optimizing/builder.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index ee5b9298752..ed193c7b614 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -1455,8 +1455,7 @@ void HGraphBuilder::BuildFilledNewArray(uint32_t dex_pc, uint32_t* args, uint32_t register_index) { HInstruction* length = graph_->GetIntConstant(number_of_vreg_arguments, dex_pc); - bool finalizable; - QuickEntrypointEnum entrypoint = NeedsAccessCheck(type_index, &finalizable) + QuickEntrypointEnum entrypoint = NeedsAccessCheck(type_index) ? kQuickAllocArrayWithAccessCheck : kQuickAllocArray; HInstruction* object = new (arena_) HNewArray(length, @@ -1636,9 +1635,9 @@ void HGraphBuilder::BuildTypeCheck(const Instruction& instruction, } } -bool HGraphBuilder::NeedsAccessCheck(uint32_t type_index, bool* finalizable) const { +bool HGraphBuilder::NeedsAccessCheck(uint32_t type_index) const { return !compiler_driver_->CanAccessInstantiableTypeWithoutChecks( - dex_compilation_unit_->GetDexMethodIndex(), *dex_file_, type_index, finalizable); + dex_compilation_unit_->GetDexMethodIndex(), *dex_file_, type_index); } void HGraphBuilder::BuildSwitchJumpTable(const SwitchTable& table, @@ -2515,9 +2514,7 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32 current_block_->AddInstruction(fake_string); UpdateLocal(register_index, fake_string, dex_pc); } else { - bool finalizable; - bool can_throw = NeedsAccessCheck(type_index, &finalizable); - QuickEntrypointEnum entrypoint = can_throw + QuickEntrypointEnum entrypoint = NeedsAccessCheck(type_index) ? kQuickAllocObjectWithAccessCheck : kQuickAllocObject; @@ -2526,8 +2523,6 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32 dex_pc, type_index, *dex_compilation_unit_->GetDexFile(), - can_throw, - finalizable, entrypoint)); UpdateLocal(instruction.VRegA(), current_block_->GetLastInstruction(), dex_pc); } @@ -2537,8 +2532,7 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32 case Instruction::NEW_ARRAY: { uint16_t type_index = instruction.VRegC_22c(); HInstruction* length = LoadLocal(instruction.VRegB_22c(), Primitive::kPrimInt, dex_pc); - bool finalizable; - QuickEntrypointEnum entrypoint = NeedsAccessCheck(type_index, &finalizable) + QuickEntrypointEnum entrypoint = NeedsAccessCheck(type_index) ? kQuickAllocArrayWithAccessCheck : kQuickAllocArray; current_block_->AddInstruction(new (arena_) HNewArray(length, |