summaryrefslogtreecommitdiff
path: root/compiler/optimizing/induction_var_range.h
diff options
context:
space:
mode:
author Aart Bik <ajcbik@google.com> 2016-10-12 10:01:05 -0700
committer Aart Bik <ajcbik@google.com> 2016-10-12 14:10:11 -0700
commit7dc96932491dde6b5b58998254d5837dbcbbde03 (patch)
treeb2b0c7a133738823eb61871e5482aa657f2f8a2a /compiler/optimizing/induction_var_range.h
parentf0ab2ec6008bbd495e59bb9bf81ac399d864f38b (diff)
Recognize XOR-based periodic induction.
Rationale: This is a commonly used construct (e.g. x = !x for booleans and x ^= 1 for integers). This CL prepares some upcoming optimizations that exploit such inductions. Change-Id: I46edffb9de1075a836995daf5c2dfff7891f3034 Test: 530-checker-loops2 and induction_var_analysis_test
Diffstat (limited to 'compiler/optimizing/induction_var_range.h')
-rw-r--r--compiler/optimizing/induction_var_range.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/optimizing/induction_var_range.h b/compiler/optimizing/induction_var_range.h
index df31e81169..895130064a 100644
--- a/compiler/optimizing/induction_var_range.h
+++ b/compiler/optimizing/induction_var_range.h
@@ -193,6 +193,8 @@ class InductionVarRange {
HInductionVarAnalysis::InductionInfo* trip,
bool in_body,
bool is_min) const;
+ Value GetXor(HInductionVarAnalysis::InductionInfo* info1,
+ HInductionVarAnalysis::InductionInfo* info2) const;
Value MulRangeAndConstant(int64_t value,
HInductionVarAnalysis::InductionInfo* info,