summaryrefslogtreecommitdiff
path: root/compiler/optimizing/loop_analysis.h
diff options
context:
space:
mode:
authorArtem Serov <artem.serov@linaro.org>2018-05-16 19:06:32 +0100
committerArtem Serov <artem.serov@linaro.org>2018-07-04 13:12:18 +0100
commit18ba1dacaaf426cbeb3c0aff6db9c58a752f9a96 (patch)
treee6d82d3b8856137a1b09a2843ea88165d97afbfe /compiler/optimizing/loop_analysis.h
parent0e32908d0ee4be5905cdd409dd3c45331fc98465 (diff)
ART: Implement loop full unrolling.
Performs whole loop unrolling for small loops with small trip count to eliminate the loop check overhead, to have more opportunities for inter-iteration optimizations. caffeinemark/FloatAtom: 1.2x performance on arm64 Cortex-A57. Test: 530-checker-peel-unroll. Test: test-art-host, test-art-target. Change-Id: Idf3fe3cb611376935d176c60db8c49907222e28a
Diffstat (limited to 'compiler/optimizing/loop_analysis.h')
-rw-r--r--compiler/optimizing/loop_analysis.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/optimizing/loop_analysis.h b/compiler/optimizing/loop_analysis.h
index bcb7b70494..57509ee410 100644
--- a/compiler/optimizing/loop_analysis.h
+++ b/compiler/optimizing/loop_analysis.h
@@ -160,6 +160,13 @@ class ArchNoOptsLoopHelper : public ArenaObject<kArenaAllocOptimization> {
// Returns 'false' by default, should be overridden by particular target loop helper.
virtual bool IsLoopPeelingEnabled() const { return false; }
+ // Returns whether it is beneficial to fully unroll the loop.
+ //
+ // Returns 'false' by default, should be overridden by particular target loop helper.
+ virtual bool IsFullUnrollingBeneficial(LoopAnalysisInfo* analysis_info ATTRIBUTE_UNUSED) const {
+ return false;
+ }
+
// Returns optimal SIMD unrolling factor for the loop.
//
// Returns kNoUnrollingFactor by default, should be overridden by particular target loop helper.