summaryrefslogtreecommitdiff
path: root/compiler/optimizing/bounds_check_elimination.h
diff options
context:
space:
mode:
author Aart Bik <ajcbik@google.com> 2015-10-19 14:59:26 -0700
committer Aart Bik <ajcbik@google.com> 2015-11-20 17:00:04 -0800
commit0b5849be045c5683d4a6b6b6c306abadba5f0fcc (patch)
tree87245845c05ddef6fb53ac4c3774607a89fa5db4 /compiler/optimizing/bounds_check_elimination.h
parent3944f7175dcf60316ba58a42698ccf23c65ac57c (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 (after filtering noise) is about: Linpack +20% LU > +10% Change-Id: I4e7b8bab0288beff6f98a14856e3536103d32742
Diffstat (limited to 'compiler/optimizing/bounds_check_elimination.h')
-rw-r--r--compiler/optimizing/bounds_check_elimination.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/optimizing/bounds_check_elimination.h b/compiler/optimizing/bounds_check_elimination.h
index cdff3ca0ba..b9df686ffd 100644
--- a/compiler/optimizing/bounds_check_elimination.h
+++ b/compiler/optimizing/bounds_check_elimination.h
@@ -21,12 +21,16 @@
namespace art {
+class SideEffectsAnalysis;
class HInductionVarAnalysis;
class BoundsCheckElimination : public HOptimization {
public:
- BoundsCheckElimination(HGraph* graph, HInductionVarAnalysis* induction_analysis)
+ BoundsCheckElimination(HGraph* graph,
+ const SideEffectsAnalysis& side_effects,
+ HInductionVarAnalysis* induction_analysis)
: HOptimization(graph, kBoundsCheckEliminiationPassName),
+ side_effects_(side_effects),
induction_analysis_(induction_analysis) {}
void Run() OVERRIDE;
@@ -34,6 +38,7 @@ class BoundsCheckElimination : public HOptimization {
static constexpr const char* kBoundsCheckEliminiationPassName = "BCE";
private:
+ const SideEffectsAnalysis& side_effects_;
HInductionVarAnalysis* induction_analysis_;
DISALLOW_COPY_AND_ASSIGN(BoundsCheckElimination);