summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2015-10-29 22:53:53 +0000
committer android-build-merger <android-build-merger@google.com> 2015-10-29 22:53:53 +0000
commit08dd6bd5a7e40404e68754d30e9395f25344b432 (patch)
tree535c21c9a181b87d15839151b26f65266c418a9f /compiler/optimizing/optimizing_compiler.cc
parentc7534d1f650a9179e204c16a2ac5b16f7257cd5c (diff)
parentd13f2b35546d421f570c64654ad8479caf1165d6 (diff)
Merge "Revert "ART: Enable more passes under try/catch""
am: d13f2b3554 * commit 'd13f2b35546d421f570c64654ad8479caf1165d6': Revert "ART: Enable more passes under try/catch"
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc56
1 files changed, 34 insertions, 22 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 98acc34378..6632f95ebe 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -494,30 +494,42 @@ static void RunOptimizations(HGraph* graph,
// TODO: Update passes incompatible with try/catch so we have the same
// pipeline for all methods.
- if (!graph->HasTryCatch()) {
+ 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 {
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);
}