diff options
author | Artem Serov <artem.serov@linaro.org> | 2018-05-16 19:06:32 +0100 |
---|---|---|
committer | Artem Serov <artem.serov@linaro.org> | 2018-07-04 13:12:18 +0100 |
commit | 18ba1dacaaf426cbeb3c0aff6db9c58a752f9a96 (patch) | |
tree | e6d82d3b8856137a1b09a2843ea88165d97afbfe /compiler/optimizing/loop_optimization.h | |
parent | 0e32908d0ee4be5905cdd409dd3c45331fc98465 (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_optimization.h')
-rw-r--r-- | compiler/optimizing/loop_optimization.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/optimizing/loop_optimization.h b/compiler/optimizing/loop_optimization.h index bc4792458b..644b740ed4 100644 --- a/compiler/optimizing/loop_optimization.h +++ b/compiler/optimizing/loop_optimization.h @@ -155,6 +155,12 @@ class HLoopOptimization : public HOptimization { bool TryPeelingForLoopInvariantExitsElimination(LoopAnalysisInfo* analysis_info, bool generate_code = true); + // Tries to perform whole loop unrolling for a small loop with a small trip count to eliminate + // the loop check overhead and to have more opportunities for inter-iteration optimizations. + // Returns whether transformation happened. 'generate_code' determines whether the optimization + // should be actually applied. + bool TryFullUnrolling(LoopAnalysisInfo* analysis_info, bool generate_code = true); + // Tries to apply scalar loop peeling and unrolling. bool TryPeelingAndUnrolling(LoopNode* node); |