summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-01-16 12:35:40 +0000
committerNicolas Geoffray <ngeoffray@google.com>2015-01-19 09:29:40 +0000
commit9ee66183d8e046ea661f642ba884626f16b46e06 (patch)
treed400690c920b0857dafd06efd3db6336c9eeba5b /compiler/optimizing/optimizing_compiler.cc
parent36740379b9b1c81b7eb06ea9c9df411d0a9a765e (diff)
downloadart-9ee66183d8e046ea661f642ba884626f16b46e06.tar.gz
art-9ee66183d8e046ea661f642ba884626f16b46e06.tar.bz2
art-9ee66183d8e046ea661f642ba884626f16b46e06.zip
Constant fold after inlining.
- Inlining opens up new opportunities for constant folding. - Fix a bug in constant folder where the result type was not correctly set for the folding of a HCompare. - Improve graph checker's coverage. Change-Id: I0943bf8ff65505c4addc4a555a526b55e00b5268
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 605637300f..ad4819840f 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -208,11 +208,12 @@ static void RunOptimizations(HGraph* graph,
SsaRedundantPhiElimination redundant_phi(graph);
SsaDeadPhiElimination dead_phi(graph);
HDeadCodeElimination dce(graph);
- HConstantFolding fold(graph);
+ HConstantFolding fold1(graph);
InstructionSimplifier simplify1(graph);
HInliner inliner(graph, dex_compilation_unit, driver, stats);
+ HConstantFolding fold2(graph);
GVNOptimization gvn(graph);
BoundsCheckElimination bce(graph);
InstructionSimplifier simplify2(graph);
@@ -224,9 +225,10 @@ static void RunOptimizations(HGraph* graph,
&dead_phi,
&intrinsics,
&dce,
- &fold,
+ &fold1,
&simplify1,
&inliner,
+ &fold2,
&gvn,
&bce,
&simplify2