diff options
Diffstat (limited to 'compiler/optimizing/induction_var_analysis.h')
-rw-r--r-- | compiler/optimizing/induction_var_analysis.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/compiler/optimizing/induction_var_analysis.h b/compiler/optimizing/induction_var_analysis.h index 124c3b4e64..050950089a 100644 --- a/compiler/optimizing/induction_var_analysis.h +++ b/compiler/optimizing/induction_var_analysis.h @@ -39,7 +39,9 @@ namespace art HIDDEN { */ class HInductionVarAnalysis : public HOptimization { public: - explicit HInductionVarAnalysis(HGraph* graph, const char* name = kInductionPassName); + explicit HInductionVarAnalysis(HGraph* graph, + OptimizingCompilerStats* stats = nullptr, + const char* name = kInductionPassName); bool Run() override; @@ -308,6 +310,15 @@ class HInductionVarAnalysis : public HOptimization { static std::string FetchToString(HInstruction* fetch); static std::string InductionToString(InductionInfo* info); + // Returns true if we have a pathological case we don't want to analyze. + bool IsPathologicalCase(); + // Starting with initial_phi, it calculates how many loop header phis in a row we have. To do + // this, we count the loop header phi which are used as an input of other loop header phis. It + // uses `cached_values` to avoid recomputing results. + void CalculateLoopHeaderPhisInARow(HPhi* initial_phi, + ScopedArenaSafeMap<HPhi*, int>& cached_values, + ScopedArenaAllocator& allocator); + /** * Maintains the results of the analysis as a mapping from loops to a mapping from instructions * to the induction information for that instruction in that loop. |