From 6b69e0acb0e4c506ce2587e362c38e36e41e34ab Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Wed, 11 Jan 2017 10:20:43 -0800 Subject: Complete unrolling of loops with small body and trip count one. Rationale: Avoids the unnecessary loop control overhead, suspend check, and exposes more opportunities for constant folding in the resulting loop body. Fully unrolls loop in execute() of the Dhrystone benchmark (3% to 8% improvements). Test: test-art-host Change-Id: If30f38caea9e9f87a929df041dfb7ed1c227aba3 --- compiler/optimizing/induction_var_range.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 ba14847d82..6c424b78b9 100644 --- a/compiler/optimizing/induction_var_range.h +++ b/compiler/optimizing/induction_var_range.h @@ -150,9 +150,9 @@ class InductionVarRange { } /** - * Checks if header logic of a loop terminates. + * Checks if header logic of a loop terminates. Sets trip-count tc if known. */ - bool IsFinite(HLoopInformation* loop) const; + bool IsFinite(HLoopInformation* loop, /*out*/ int64_t* tc) const; private: /* -- cgit v1.2.3-59-g8ed1b