summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/induction_var_range.cc4
-rw-r--r--compiler/optimizing/induction_var_range.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/optimizing/induction_var_range.cc b/compiler/optimizing/induction_var_range.cc
index 767a149636..2f5a22ec0e 100644
--- a/compiler/optimizing/induction_var_range.cc
+++ b/compiler/optimizing/induction_var_range.cc
@@ -368,8 +368,8 @@ void InductionVarRange::Replace(HInstruction* instruction,
for (HLoopInformation* lp = instruction->GetBlock()->GetLoopInformation(); // closest enveloping loop
lp != nullptr;
lp = lp->GetPreHeader()->GetLoopInformation()) {
- // Update instruction's information.
- ReplaceInduction(induction_analysis_->LookupInfo(lp, instruction), fetch, replacement);
+ // Update loop's InductionInfo about fetch.
+ ReplaceInduction(induction_analysis_->LookupInfo(lp, fetch), fetch, replacement);
// Update loop's trip-count information.
ReplaceInduction(induction_analysis_->LookupInfo(lp, GetLoopControl(lp)), fetch, replacement);
}
diff --git a/compiler/optimizing/induction_var_range.h b/compiler/optimizing/induction_var_range.h
index a81227b41b..ab497414c9 100644
--- a/compiler/optimizing/induction_var_range.h
+++ b/compiler/optimizing/induction_var_range.h
@@ -128,8 +128,8 @@ class InductionVarRange {
HInstruction* GenerateLastValue(HInstruction* instruction, HGraph* graph, HBasicBlock* block);
/**
- * Updates all matching fetches with the given replacement in all induction information
- * that is associated with the given instruction.
+ * Updates all matching `fetch`es with the given `replacement` in all induction information
+ * that is present in the loops of the given `instruction`.
*/
void Replace(HInstruction* instruction, HInstruction* fetch, HInstruction* replacement);