Added vectorization stats.
Rationale:
Provides a (somewhat crude) quantative way to detect changes in
loop vectorization and idiom recognition (e.g. by means of market
scans, or just inspecting the same application before/after a change).
Test: market scan
Change-Id: Ic85938ba2b33c967de3159742c60301454a152a0
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc
index f8f4eb2..6b2697b 100644
--- a/compiler/optimizing/loop_optimization.cc
+++ b/compiler/optimizing/loop_optimization.cc
@@ -625,6 +625,7 @@
TryAssignLastValue(node->loop_info, main_phi, preheader, /*collect_loop_uses*/ true)) {
Vectorize(node, body, exit, trip_count);
graph_->SetHasSIMD(true); // flag SIMD usage
+ MaybeRecordStat(stats_, MethodCompilationStat::kLoopVectorized);
return true;
}
return false;
@@ -1724,6 +1725,7 @@
vector_length_,
is_unsigned,
is_rounded));
+ MaybeRecordStat(stats_, MethodCompilationStat::kLoopVectorizedIdiom);
} else {
GenerateVecOp(instruction, vector_map_->Get(r), vector_map_->Get(s), type);
}