diff options
author | 2015-09-28 16:25:56 -0700 | |
---|---|---|
committer | 2015-09-30 09:58:53 -0700 | |
commit | 9401f5397128ddc8dc36de923dd5e6bd4e4b5be4 (patch) | |
tree | 4ff8052307da80baa89dfa80a446f48752c0e95c /compiler/optimizing/induction_var_range.h | |
parent | 931e26843bbb688eacfa67b40414c6b8f221a56a (diff) |
Implemented trip-count safety information.
As shown in the induction analysis presentation, trip-counts need to
deal with potential taken/not-taken situations (so that trip-count
is either valid in the full loop or just in the loop-body proper)
and potential finite/infinite situations (the latter can still be
analyzed but may need to run-time test later to guard against the
infinite conditions). This CL provides that information.
Change-Id: I0445d8e836b80a3614af217ce3e39d766e77b986
Diffstat (limited to 'compiler/optimizing/induction_var_range.h')
-rw-r--r-- | compiler/optimizing/induction_var_range.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/optimizing/induction_var_range.h b/compiler/optimizing/induction_var_range.h index 8280c8bedc..dbdd2eedac 100644 --- a/compiler/optimizing/induction_var_range.h +++ b/compiler/optimizing/induction_var_range.h @@ -73,24 +73,29 @@ class InductionVarRange { // Private helper methods. // - HInductionVarAnalysis::InductionInfo* GetTripCount(HLoopInformation* loop, HInstruction* context); + Value GetInduction(HInstruction* context, HInstruction* instruction, bool is_min); static Value GetFetch(HInstruction* instruction, HInductionVarAnalysis::InductionInfo* trip, + bool in_body, bool is_min); - static Value GetVal(HInductionVarAnalysis::InductionInfo* info, HInductionVarAnalysis::InductionInfo* trip, + bool in_body, bool is_min); static Value GetMul(HInductionVarAnalysis::InductionInfo* info1, HInductionVarAnalysis::InductionInfo* info2, HInductionVarAnalysis::InductionInfo* trip, + bool in_body, bool is_min); static Value GetDiv(HInductionVarAnalysis::InductionInfo* info1, HInductionVarAnalysis::InductionInfo* info2, HInductionVarAnalysis::InductionInfo* trip, + bool in_body, bool is_min); + static bool GetConstant(HInductionVarAnalysis::InductionInfo* info, int32_t *value); + static Value AddValue(Value v1, Value v2); static Value SubValue(Value v1, Value v2); static Value MulValue(Value v1, Value v2); |