From 5eb1fd0dae3832ceee2102613bb08c291daca6f3 Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Tue, 18 Apr 2023 15:16:06 +0100 Subject: Restrict the use of ConstantFolding's VisitIf It was taking a lot of time for the improvement it got. We can get 99.99% of the improvement, with only one VisitIf call. This is roughly 20% of the compile time it used to take. Bug: 278626992 Fixes: 278626992 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: Icc00c9ad6a9eb4f4fd18677bcb65655cbbe9d027 --- compiler/optimizing/optimizing_compiler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 60d5e6f3bd..b97dc881eb 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -656,7 +656,7 @@ void OptimizingCompiler::RunOptimizations(HGraph* graph, OptDef(OptimizationPass::kGlobalValueNumbering), // Simplification (TODO: only if GVN occurred). OptDef(OptimizationPass::kSelectGenerator), - OptDef(OptimizationPass::kConstantFolding, + OptDef(OptimizationPass::kAggressiveConstantFolding, "constant_folding$after_gvn"), OptDef(OptimizationPass::kInstructionSimplifier, "instruction_simplifier$after_gvn"), -- cgit v1.2.3-59-g8ed1b