From c071a01a26013ab6e3dbfc4131efa95a65aeb4ed Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Thu, 1 Dec 2016 10:22:31 -0800 Subject: Added geometric induction variables analysis. Rationale: Information on geometric and polynomial (coming soon) sequences are nice to have to further enhance BCE and last-value assignment. Test: test-art-host Change-Id: Ib5e2998c3eb1009def6fd00b82935da7c3ba7c6e --- compiler/optimizing/induction_var_range.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compiler/optimizing/induction_var_range.h') diff --git a/compiler/optimizing/induction_var_range.h b/compiler/optimizing/induction_var_range.h index 034cf32b2d..f7360e83db 100644 --- a/compiler/optimizing/induction_var_range.h +++ b/compiler/optimizing/induction_var_range.h @@ -190,6 +190,10 @@ class InductionVarRange { HInductionVarAnalysis::InductionInfo* trip, bool in_body, bool is_min) const; + Value GetGeometric(HInductionVarAnalysis::InductionInfo* info, + HInductionVarAnalysis::InductionInfo* trip, + bool in_body, + bool is_min) const; Value GetFetch(HInstruction* instruction, HInductionVarAnalysis::InductionInfo* trip, bool in_body, @@ -245,6 +249,12 @@ class InductionVarRange { /*out*/ bool* needs_finite_test, /*out*/ bool* needs_taken_test) const; + bool GenerateLastValueGeometric(HInductionVarAnalysis::InductionInfo* info, + HInductionVarAnalysis::InductionInfo* trip, + HGraph* graph, + HBasicBlock* block, + /*out*/HInstruction** result) const; + bool GenerateLastValuePeriodic(HInductionVarAnalysis::InductionInfo* info, HInductionVarAnalysis::InductionInfo* trip, HGraph* graph, -- cgit v1.2.3-59-g8ed1b