aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-07-12 14:18:55 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-12 14:27:17 -0700
commit6b28eb084349f90213f6ea7762e69d746731b26f (patch)
treee23f8b213e6eeafee953362c84ae5e1e2fe82942 /tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc
parent8e7f5737168853fc28a85dab0d3792520249e541 (diff)
Rename HloLocation to HloPosition, to avoid ambiguity with MemoryLocation.
PiperOrigin-RevId: 161716528
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc')
-rw-r--r--tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc b/tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc
index 91592c1902..2e731da741 100644
--- a/tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc
+++ b/tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc
@@ -247,11 +247,11 @@ InstructionValueSet HloDataflowAnalysis::Phi(
return new_value_set;
}
-void HloDataflowAnalysis::UpdateLocationsOfValuesAt(
+void HloDataflowAnalysis::UpdatePositionsOfValuesAt(
HloInstruction* instruction, const InstructionValueSet& new_value_set,
const InstructionValueSet* prev_value_set) {
if (prev_value_set != nullptr) {
- // Remove locations from the old value set.
+ // Remove positions from the old value set.
prev_value_set->ForEachElement(
[this, instruction](const ShapeIndex& index,
const HloValueSet& value_set) {
@@ -260,17 +260,17 @@ void HloDataflowAnalysis::UpdateLocationsOfValuesAt(
if (!ContainsKey(values_, value_id)) {
continue;
}
- // Don't remove the defining location of the value.
+ // Don't remove the defining position of the value.
HloValue& value = GetValue(value_id);
if (instruction == value.defining_instruction()) {
CHECK_EQ(index, value.defining_index());
} else {
- value.RemoveLocation(instruction, index);
+ value.RemovePosition(instruction, index);
}
}
});
}
- // Add locations in the new value set.
+ // Add positions in the new value set.
new_value_set.ForEachElement(
[this, instruction](const ShapeIndex& index,
const HloValueSet& value_set) {
@@ -279,7 +279,7 @@ void HloDataflowAnalysis::UpdateLocationsOfValuesAt(
if (instruction == value.defining_instruction()) {
CHECK_EQ(index, value.defining_index());
} else {
- value.AddLocation(instruction, index);
+ value.AddPosition(instruction, index);
}
}
});
@@ -466,7 +466,7 @@ void HloDataflowAnalysis::UpdateInstructionsAndPropagate(
// Update uses. First clear all of the old uses at the particular
// operands. Then add the new uses. There may be overlap between the old
// uses and new uses.
- UpdateLocationsOfValuesAt(instruction, GetInstructionValueSet(instruction),
+ UpdatePositionsOfValuesAt(instruction, GetInstructionValueSet(instruction),
&old_value);
}
}
@@ -600,7 +600,7 @@ Status HloDataflowAnalysis::InitializeInstructionValueSets() {
define_all_values();
break;
}
- UpdateLocationsOfValuesAt(instruction.get(),
+ UpdatePositionsOfValuesAt(instruction.get(),
GetInstructionValueSet(instruction.get()));
}
}