diff options
| author | 2018-07-04 14:22:11 +0000 | |
|---|---|---|
| committer | 2018-07-04 14:22:11 +0000 | |
| commit | 85861e8095f8b9ab774a78b2a1820008da009438 (patch) | |
| tree | 290d80535544fb3b8795f0f88a11b03598052d6e /compiler/optimizing/loop_optimization.h | |
| parent | 0e4563c4ccd3a36dff11c33fc98aa9cedae722e4 (diff) | |
| parent | 0e32908d0ee4be5905cdd409dd3c45331fc98465 (diff) | |
Merge "ART: Refactor scalar loop optimizations."
Diffstat (limited to 'compiler/optimizing/loop_optimization.h')
| -rw-r--r-- | compiler/optimizing/loop_optimization.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/compiler/optimizing/loop_optimization.h b/compiler/optimizing/loop_optimization.h index 9743b25259..bc4792458b 100644 --- a/compiler/optimizing/loop_optimization.h +++ b/compiler/optimizing/loop_optimization.h @@ -144,12 +144,19 @@ class HLoopOptimization : public HOptimization { bool OptimizeInnerLoop(LoopNode* node); // Tries to apply loop unrolling for branch penalty reduction and better instruction scheduling - // opportunities. Returns whether transformation happened. - bool TryUnrollingForBranchPenaltyReduction(LoopNode* loop_node); + // opportunities. Returns whether transformation happened. 'generate_code' determines whether the + // optimization should be actually applied. + bool TryUnrollingForBranchPenaltyReduction(LoopAnalysisInfo* analysis_info, + bool generate_code = true); // Tries to apply loop peeling for loop invariant exits elimination. Returns whether - // transformation happened. - bool TryPeelingForLoopInvariantExitsElimination(LoopNode* loop_node); + // transformation happened. 'generate_code' determines whether the optimization should be + // actually applied. + bool TryPeelingForLoopInvariantExitsElimination(LoopAnalysisInfo* analysis_info, + bool generate_code = true); + + // Tries to apply scalar loop peeling and unrolling. + bool TryPeelingAndUnrolling(LoopNode* node); // // Vectorization analysis and synthesis. |