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.cc | |
parent | 1583e624d4c970d8e571b265b9a8f08402d91f82 (diff) | |
parent | 2ae48182573da7087bffc2873730bc758ec29696 (diff) |
Merge "Clean up NullCheck generation and record stats about it."
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r-- | compiler/optimizing/code_generator.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 039c3c562b..f19872722c 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -1110,6 +1110,16 @@ void CodeGenerator::MaybeRecordImplicitNullCheck(HInstruction* instr) { } } +void CodeGenerator::GenerateNullCheck(HNullCheck* instruction) { + if (IsImplicitNullCheckAllowed(instruction)) { + MaybeRecordStat(kImplicitNullCheckGenerated); + GenerateImplicitNullCheck(instruction); + } else { + MaybeRecordStat(kExplicitNullCheckGenerated); + GenerateExplicitNullCheck(instruction); + } +} + void CodeGenerator::ClearSpillSlotsFromLoopPhisInStackMap(HSuspendCheck* suspend_check) const { LocationSummary* locations = suspend_check->GetLocations(); HBasicBlock* block = suspend_check->GetBlock(); |