summaryrefslogtreecommitdiff
path: root/compiler/optimizing/induction_var_range.h
diff options
context:
space:
mode:
author Aart Bik <ajcbik@google.com> 2016-10-10 15:39:10 -0700
committer Aart Bik <ajcbik@google.com> 2016-10-11 10:39:42 -0700
commit482095d3a03892b76f5b835c9e7ea4bc80638501 (patch)
tree642cb6b52f68e4e6d03475e80dc2845c5e4f50f6 /compiler/optimizing/induction_var_range.h
parent0d7398fd5407938aba75c50bd323af27e83ccb9f (diff)
Improved and simplified loop optimizations.
Rationale: Empty preheader simplification has been simplified to a much more general empty block removal optimization step. Incremental updating of induction variable analysis enables repeated elimination or simplification of induction cycles. This enabled an extra layer of optimization for e.g. Benchpress Loop (17.5us. -> 0.24us. -> 0.08us). So the original 73x speedup is now multiplied by another 3x, for a total of about 218x. Test: 618-checker-induction et al. Change-Id: I394699981481cdd5357e0531bce88cd48bd32879
Diffstat (limited to 'compiler/optimizing/induction_var_range.h')
-rw-r--r--compiler/optimizing/induction_var_range.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/optimizing/induction_var_range.h b/compiler/optimizing/induction_var_range.h
index 63850b34b8..df31e81169 100644
--- a/compiler/optimizing/induction_var_range.h
+++ b/compiler/optimizing/induction_var_range.h
@@ -131,6 +131,14 @@ class InductionVarRange {
*/
void Replace(HInstruction* instruction, HInstruction* fetch, HInstruction* replacement);
+ /**
+ * Incrementally updates induction information for just the given loop.
+ */
+ void ReVisit(HLoopInformation* loop) {
+ induction_analysis_->induction_.erase(loop);
+ induction_analysis_->VisitLoop(loop);
+ }
+
private:
/*
* Enum used in IsConstant() request.