summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-08-11 19:29:31 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-08-11 19:29:31 +0000
commite9b61bac34bea439d8ce39592973a66a32f43fb7 (patch)
treeaa0043f331844ba6083b764c7bce8c2a81671058 /compiler/optimizing/code_generator.cc
parent675c779cb046bca49229e1e5268d0eb622159214 (diff)
parent6ef45677305048c2bf0600f1c4b98a11b2cfaffb (diff)
Merge changes Ic119441c,I83b96b41
* changes: optimizing: Add statistics for # of constructor fences added/removed optimizing: Refactor statistics to use OptimizingCompilerStats helper
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index d7d0ffffda..1e5f1ec00f 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -610,12 +610,6 @@ void CodeGenerator::AllocateLocations(HInstruction* instruction) {
}
}
-void CodeGenerator::MaybeRecordStat(MethodCompilationStat compilation_stat, size_t count) const {
- if (stats_ != nullptr) {
- stats_->RecordStat(compilation_stat, count);
- }
-}
-
std::unique_ptr<CodeGenerator> CodeGenerator::Create(HGraph* graph,
InstructionSet instruction_set,
const InstructionSetFeatures& isa_features,
@@ -1212,10 +1206,10 @@ LocationSummary* CodeGenerator::CreateThrowingSlowPathLocations(HInstruction* in
void CodeGenerator::GenerateNullCheck(HNullCheck* instruction) {
if (compiler_options_.GetImplicitNullChecks()) {
- MaybeRecordStat(kImplicitNullCheckGenerated);
+ MaybeRecordStat(stats_, kImplicitNullCheckGenerated);
GenerateImplicitNullCheck(instruction);
} else {
- MaybeRecordStat(kExplicitNullCheckGenerated);
+ MaybeRecordStat(stats_, kExplicitNullCheckGenerated);
GenerateExplicitNullCheck(instruction);
}
}