From c6b816ceb2b35300c937ef2e7d008598b6afba21 Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Fri, 22 Jul 2022 15:21:29 +0100 Subject: Propagating values from if clauses to its successors We have knowledge of the value of some variables at compile time due to the fact they are used in if clauses. For example: if (variable == constant) { // SSA `variable` guaranteed to be equal to constant here. } else { // No guarantees can be made here (except for booleans since // they only have two values). } Similarly with `variable != constant`. We can also apply this to boolean parameters e.g. void foo (boolean val) { if (val) { // `val` guaranteed to be true here. ... } ... } Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I55df0252d672870993d06e5ac92f5bba44d902bd --- compiler/optimizing/optimizing_compiler_stats.h | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/optimizing/optimizing_compiler_stats.h') diff --git a/compiler/optimizing/optimizing_compiler_stats.h b/compiler/optimizing/optimizing_compiler_stats.h index d458e42608..5e316ba403 100644 --- a/compiler/optimizing/optimizing_compiler_stats.h +++ b/compiler/optimizing/optimizing_compiler_stats.h @@ -73,6 +73,7 @@ enum class MethodCompilationStat { kLoopVectorizedIdiom, kSelectGenerated, kRemovedInstanceOf, + kPropagatedIfValue, kInlinedInvokeVirtualOrInterface, kInlinedLastInvokeVirtualOrInterface, kImplicitNullCheckGenerated, -- cgit v1.2.3-59-g8ed1b