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
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc
index 8dead2f..4c9b01c 100644
--- a/compiler/optimizing/loop_optimization.cc
+++ b/compiler/optimizing/loop_optimization.cc
@@ -431,7 +431,7 @@
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 @@
// 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 @@
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 @@
}
// Run 'IsLoopClonable' the last as it might be time-consuming.
- if (!PeelUnrollHelper::IsLoopClonable(loop_info)) {
+ if (!LoopClonerHelper::IsLoopClonable(loop_info)) {
return false;
}