From 0f5b2bf1aee7e08ce3b0dbf91ee528eb846d372f Mon Sep 17 00:00:00 2001 From: Artem Serov Date: Wed, 23 Oct 2019 14:07:41 +0100 Subject: ART: Introduce Loop Versioning in SuberblockCloner. Support Loop Versioning in SuberblockCloner as a tool to enable further optimization (e.g. Dynamic Loop Unrolling). The patch brings the feature in without enabling it. Replace std::cout with LOG(INFO) for debug dumps. Test: superblock_cloner_test. Test: test-art-target. Change-Id: I303cabfb752b8c3c8597abfc0ac261e8616e8cee --- compiler/optimizing/loop_optimization.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/loop_optimization.cc') diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc index 8dead2f564..4c9b01c97e 100644 --- a/compiler/optimizing/loop_optimization.cc +++ b/compiler/optimizing/loop_optimization.cc @@ -431,7 +431,7 @@ static void PeelByCount(HLoopInformation* loop_info, InductionVarRange* induction_range) { for (int i = 0; i < count; i++) { // Perform peeling. - PeelUnrollSimpleHelper helper(loop_info, induction_range); + LoopClonerSimpleHelper helper(loop_info, induction_range); helper.DoPeeling(); } } @@ -807,7 +807,7 @@ bool HLoopOptimization::TryUnrollingForBranchPenaltyReduction(LoopAnalysisInfo* // Perform unrolling. HLoopInformation* loop_info = analysis_info->GetLoopInfo(); - PeelUnrollSimpleHelper helper(loop_info, &induction_range_); + LoopClonerSimpleHelper helper(loop_info, &induction_range_); helper.DoUnrolling(); // Remove the redundant loop check after unrolling. @@ -832,7 +832,7 @@ bool HLoopOptimization::TryPeelingForLoopInvariantExitsElimination(LoopAnalysisI if (generate_code) { // Perform peeling. - PeelUnrollSimpleHelper helper(loop_info, &induction_range_); + LoopClonerSimpleHelper helper(loop_info, &induction_range_); helper.DoPeeling(); // Statically evaluate loop check after peeling for loop invariant condition. @@ -905,7 +905,7 @@ bool HLoopOptimization::TryPeelingAndUnrolling(LoopNode* node) { } // Run 'IsLoopClonable' the last as it might be time-consuming. - if (!PeelUnrollHelper::IsLoopClonable(loop_info)) { + if (!LoopClonerHelper::IsLoopClonable(loop_info)) { return false; } -- cgit v1.2.3-59-g8ed1b