MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / remove_value

Method remove_value

src/debug_utils/checker.rs:89–95  ·  view source on GitHub ↗

Removes the given value from all `AllocationUnit`s. This is used at value definition points to remove any stale versions of a value (e.g. from a previous loop iteration).

(&mut self, value: Value)

Source from the content-addressed store, hash-verified

87 /// This is used at value definition points to remove any stale versions of
88 /// a value (e.g. from a previous loop iteration).
89 fn remove_value(&mut self, value: Value) {
90 for values in self.unit_values.values_mut() {
91 if let Some(idx) = values.iter().position(|&v| v == value) {
92 values.remove(idx);
93 }
94 }
95 }
96
97 /// Adds the given value to the set of values for an `AllocationUnit`.
98 fn add_value(&mut self, unit: AllocationUnit, value: Value) {

Callers 2

check_blockMethod · 0.80
check_operandMethod · 0.80

Calls 3

values_mutMethod · 0.45
iterMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected