diff options
author | Calin Juravle <calin@google.com> | 2016-03-16 14:40:08 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-03-16 14:40:08 +0000 |
commit | 914d71ead70bb6f2084b2ed39a9fd58fd014f67d (patch) | |
tree | 50f30d6e47d18aa6c3ccec9f05727b4898268b20 /compiler/optimizing/code_generator_mips.cc | |
parent | 1583e624d4c970d8e571b265b9a8f08402d91f82 (diff) | |
parent | 2ae48182573da7087bffc2873730bc758ec29696 (diff) |
Merge "Clean up NullCheck generation and record stats about it."
Diffstat (limited to 'compiler/optimizing/code_generator_mips.cc')
-rw-r--r-- | compiler/optimizing/code_generator_mips.cc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/compiler/optimizing/code_generator_mips.cc b/compiler/optimizing/code_generator_mips.cc index ba6c16e33e..2e2ceaaecf 100644 --- a/compiler/optimizing/code_generator_mips.cc +++ b/compiler/optimizing/code_generator_mips.cc @@ -4396,19 +4396,19 @@ void LocationsBuilderMIPS::VisitNullCheck(HNullCheck* instruction) { } } -void InstructionCodeGeneratorMIPS::GenerateImplicitNullCheck(HNullCheck* instruction) { - if (codegen_->CanMoveNullCheckToUser(instruction)) { +void CodeGeneratorMIPS::GenerateImplicitNullCheck(HNullCheck* instruction) { + if (CanMoveNullCheckToUser(instruction)) { return; } Location obj = instruction->GetLocations()->InAt(0); __ Lw(ZERO, obj.AsRegister<Register>(), 0); - codegen_->RecordPcInfo(instruction, instruction->GetDexPc()); + RecordPcInfo(instruction, instruction->GetDexPc()); } -void InstructionCodeGeneratorMIPS::GenerateExplicitNullCheck(HNullCheck* instruction) { +void CodeGeneratorMIPS::GenerateExplicitNullCheck(HNullCheck* instruction) { SlowPathCodeMIPS* slow_path = new (GetGraph()->GetArena()) NullCheckSlowPathMIPS(instruction); - codegen_->AddSlowPath(slow_path); + AddSlowPath(slow_path); Location obj = instruction->GetLocations()->InAt(0); @@ -4416,11 +4416,7 @@ void InstructionCodeGeneratorMIPS::GenerateExplicitNullCheck(HNullCheck* instruc } void InstructionCodeGeneratorMIPS::VisitNullCheck(HNullCheck* instruction) { - if (codegen_->IsImplicitNullCheckAllowed(instruction)) { - GenerateImplicitNullCheck(instruction); - } else { - GenerateExplicitNullCheck(instruction); - } + codegen_->GenerateNullCheck(instruction); } void LocationsBuilderMIPS::VisitOr(HOr* instruction) { |