diff options
| author | 2015-09-21 18:39:16 +0100 | |
|---|---|---|
| committer | 2015-09-21 18:39:16 +0100 | |
| commit | bb3d505c9fd5ef4e161510e23d601c643feb4c3d (patch) | |
| tree | eb54c557467f1401c4bd5729fa2b9e8ae91e8ffd /compiler/optimizing | |
| parent | 0d50412e4626b6183b72e7535da16a78500170ad (diff) | |
MIPS64: No call if ArraySet does not need a type check
The MIPS64 back-end did not use the ArraySet::NeedsTypeCheck query to
decide whether to invoke runtime or not like the other back-ends do.
Change-Id: Ie4ef9ee3ca97947256cd59983a2c1c3e3af58c83
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/code_generator_mips64.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/optimizing/code_generator_mips64.cc b/compiler/optimizing/code_generator_mips64.cc index 799827ae90..f4f53d5f32 100644 --- a/compiler/optimizing/code_generator_mips64.cc +++ b/compiler/optimizing/code_generator_mips64.cc @@ -1444,12 +1444,11 @@ void InstructionCodeGeneratorMIPS64::VisitArrayLength(HArrayLength* instruction) } void LocationsBuilderMIPS64::VisitArraySet(HArraySet* instruction) { - Primitive::Type value_type = instruction->GetComponentType(); - bool is_object = value_type == Primitive::kPrimNot; + bool needs_runtime_call = instruction->NeedsTypeCheck(); LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary( instruction, - is_object ? LocationSummary::kCall : LocationSummary::kNoCall); - if (is_object) { + needs_runtime_call ? LocationSummary::kCall : LocationSummary::kNoCall); + if (needs_runtime_call) { InvokeRuntimeCallingConvention calling_convention; locations->SetInAt(0, Location::RegisterLocation(calling_convention.GetRegisterAt(0))); locations->SetInAt(1, Location::RegisterLocation(calling_convention.GetRegisterAt(1))); |