diff options
author | David Brazdil <dbrazdil@google.com> | 2015-10-26 14:34:30 -0500 |
---|---|---|
committer | David Brazdil <dbrazdil@google.com> | 2015-10-29 12:07:27 -0500 |
commit | 39fabd6bb6fcf7a712b370d3b6fd0ada83e2e5d8 (patch) | |
tree | 09d20062204dedd87c7a7a1163bcdf6d549b39a7 /compiler/optimizing/optimizing_compiler.cc | |
parent | 59cc4e8306879ee7066d51dad4cba140e58c7292 (diff) |
ART: Enable more passes under try/catch
LICM, BCE, LSE are all safe under try/catch. Inliner and DCE
need updating and will be enabled in follow-up CLs.
Change-Id: I86db5f811257d5e765fea91666a2a2af0fb24ec3
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 56 |
1 files changed, 22 insertions, 34 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 6632f95ebe..98acc34378 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -494,43 +494,31 @@ static void RunOptimizations(HGraph* graph, // TODO: Update passes incompatible with try/catch so we have the same // pipeline for all methods. - if (graph->HasTryCatch()) { - HOptimization* optimizations2[] = { - side_effects, - gvn, - dce2, - // 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. - simplify4, - }; - - RunOptimizations(optimizations2, arraysize(optimizations2), pass_observer); - } else { + if (!graph->HasTryCatch()) { MaybeRunInliner(graph, codegen, driver, stats, dex_compilation_unit, pass_observer, handles); - - HOptimization* optimizations2[] = { - // BooleanSimplifier depends on the InstructionSimplifier removing - // redundant suspend checks to recognize empty blocks. - boolean_simplify, - fold2, // TODO: if we don't inline we can also skip fold2. - side_effects, - gvn, - licm, - induction, - bce, - simplify3, - lse, - dce2, - // 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. - simplify4, - }; - - RunOptimizations(optimizations2, arraysize(optimizations2), pass_observer); } + HOptimization* optimizations2[] = { + // BooleanSimplifier depends on the InstructionSimplifier removing + // redundant suspend checks to recognize empty blocks. + boolean_simplify, + fold2, // TODO: if we don't inline we can also skip fold2. + side_effects, + gvn, + licm, + induction, + bce, + simplify3, + lse, + dce2, + // 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. + simplify4, + }; + + RunOptimizations(optimizations2, arraysize(optimizations2), pass_observer); + RunArchOptimizations(driver->GetInstructionSet(), graph, stats, pass_observer); } |