summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author Aart Bik <ajcbik@google.com> 2015-11-30 10:17:46 -0800
committer Aart Bik <ajcbik@google.com> 2015-12-01 13:26:16 -0800
commit4a34277c55279ba57ab361f7580db846a201d9b1 (patch)
tree31d775a871a351357ecd5d6c76a3a827e20e6d07 /compiler/optimizing/optimizing_compiler.cc
parentf4c539395244ccfc14aebaf53fdc1122287f65a6 (diff)
Dynamic BCE (based on induction range analysis)
Rationale: A rewritten dynamic BCE that uses induction variable analysis to generate the run-time tests before a loop in order to eliminate bounds-checks from its body. This CL removes now obsoleted induction related code inside the BCE module. Also, the dynamic test generation is placed more strategically, since we missed a few cases where static analysis does better. Most significant performance improvements (filtering noise) is about: Linpack +20% LU > +10% Change-Id: I03d7631857154b6a131b132f26a2dc568af1b3a1
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 4ee7fca760..6f303263d1 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -515,12 +515,13 @@ static void RunOptimizations(HGraph* graph,
InstructionSimplifier* simplify1 = new (arena) InstructionSimplifier(graph, stats);
HBooleanSimplifier* boolean_simplify = new (arena) HBooleanSimplifier(graph);
HConstantFolding* fold2 = new (arena) HConstantFolding(graph, "constant_folding_after_inlining");
+ HConstantFolding* fold3 = new (arena) HConstantFolding(graph, "constant_folding_after_bce");
SideEffectsAnalysis* side_effects = new (arena) SideEffectsAnalysis(graph);
GVNOptimization* gvn = new (arena) GVNOptimization(graph, *side_effects);
LICM* licm = new (arena) LICM(graph, *side_effects);
LoadStoreElimination* lse = new (arena) LoadStoreElimination(graph, *side_effects);
HInductionVarAnalysis* induction = new (arena) HInductionVarAnalysis(graph);
- BoundsCheckElimination* bce = new (arena) BoundsCheckElimination(graph, induction);
+ BoundsCheckElimination* bce = new (arena) BoundsCheckElimination(graph, *side_effects, induction);
ReferenceTypePropagation* type_propagation =
new (arena) ReferenceTypePropagation(graph, &handles);
HSharpening* sharpening = new (arena) HSharpening(graph, codegen, dex_compilation_unit, driver);
@@ -573,6 +574,7 @@ static void RunOptimizations(HGraph* graph,
licm,
induction,
bce,
+ fold3, // evaluates code generated by dynamic bce
simplify3,
lse,
dce2,