From cfb4bdbe116ede352effce5462ccf7e998b78255 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 3 Feb 2025 13:17:20 +0000 Subject: Optimizing: New statistic for diamond removal. Do not count diamond removal towards generated `HSelect` instruction. Introduce a separate statistic for this case. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Ic397d21bf0e7ffec266be9536446646442a6320e --- compiler/optimizing/control_flow_simplifier.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/control_flow_simplifier.cc') diff --git a/compiler/optimizing/control_flow_simplifier.cc b/compiler/optimizing/control_flow_simplifier.cc index 3e1c0ac0fc..35efed59da 100644 --- a/compiler/optimizing/control_flow_simplifier.cc +++ b/compiler/optimizing/control_flow_simplifier.cc @@ -198,7 +198,8 @@ bool HControlFlowSimplifier::TryGenerateSelectSimpleDiamondPattern( block->MergeWith(merge_block); } - MaybeRecordStat(stats_, MethodCompilationStat::kSelectGenerated); + MaybeRecordStat(stats_, select != nullptr ? MethodCompilationStat::kControlFlowSelectGenerated + : MethodCompilationStat::kControlFlowDiamondRemoved); // Very simple way of finding common subexpressions in the generated HSelect statements // (since this runs after GVN). Lookup by condition, and reuse latest one if possible -- cgit v1.2.3-59-g8ed1b