From 2767f4ba2df934fea4c50a016e2955c2cf3f6b19 Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Fri, 28 Oct 2016 15:03:53 -0700 Subject: New instruction simplifications. Extra dce pass. Allow more per block repeats. Rationale: We were missing some obvious simplifications, which left performance at the table for e.g. CaffeineLogic compiled with dx (4200us->2700us). The constant for allowing a repeat on a BB seemed very low, at the very least it should depend on the BB size. Test: test-art-host Change-Id: Ic234566e117593e12c936d556222e4cd4f928105 --- compiler/optimizing/optimizing_compiler.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 19fd6f95c3..a4847601f5 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -755,6 +755,8 @@ void OptimizingCompiler::RunOptimizations(HGraph* graph, HDeadCodeElimination* dce1 = new (arena) HDeadCodeElimination( graph, stats, "dead_code_elimination$initial"); HDeadCodeElimination* dce2 = new (arena) HDeadCodeElimination( + graph, stats, "dead_code_elimination$after_inlining"); + HDeadCodeElimination* dce3 = new (arena) HDeadCodeElimination( graph, stats, "dead_code_elimination$final"); HConstantFolding* fold1 = new (arena) HConstantFolding(graph); InstructionSimplifier* simplify1 = new (arena) InstructionSimplifier(graph, stats); @@ -795,6 +797,7 @@ void OptimizingCompiler::RunOptimizations(HGraph* graph, select_generator, fold2, // TODO: if we don't inline we can also skip fold2. simplify2, + dce2, side_effects, gvn, licm, @@ -804,7 +807,7 @@ void OptimizingCompiler::RunOptimizations(HGraph* graph, fold3, // evaluates code generated by dynamic bce simplify3, lse, - dce2, + dce3, // The codegen has a few assumptions that only the instruction simplifier // can satisfy. For example, the code generator does not expect to see a // HTypeConversion from a type to the same type. -- cgit v1.2.3-59-g8ed1b