From 22af3bee34d0ab1a4bd186c71ccab00366882259 Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Thu, 10 Sep 2015 12:50:58 -0700 Subject: Use induction variable range analysis in BCE (statically). Rationale: Finally! After lots of very large CLs, now a small CL that uses the new induction variable analysis in BCE (statically, using this dynamically with de-opt is TBD). Despite its relative small size, be aware though, since the CL introduces a new phase to the compiler. Change-Id: If5555a173fd5d55d147c63138ef51fc296fa1414 --- compiler/optimizing/bounds_check_elimination.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/bounds_check_elimination.h') diff --git a/compiler/optimizing/bounds_check_elimination.h b/compiler/optimizing/bounds_check_elimination.h index 24b8ea7c56..cdff3ca0ba 100644 --- a/compiler/optimizing/bounds_check_elimination.h +++ b/compiler/optimizing/bounds_check_elimination.h @@ -21,16 +21,21 @@ namespace art { +class HInductionVarAnalysis; + class BoundsCheckElimination : public HOptimization { public: - explicit BoundsCheckElimination(HGraph* graph) - : HOptimization(graph, kBoundsCheckEliminiationPassName) {} + BoundsCheckElimination(HGraph* graph, HInductionVarAnalysis* induction_analysis) + : HOptimization(graph, kBoundsCheckEliminiationPassName), + induction_analysis_(induction_analysis) {} void Run() OVERRIDE; static constexpr const char* kBoundsCheckEliminiationPassName = "BCE"; private: + HInductionVarAnalysis* induction_analysis_; + DISALLOW_COPY_AND_ASSIGN(BoundsCheckElimination); }; -- cgit v1.2.3-59-g8ed1b