Given a live range split, returns whether the left and right sides of the split still have a fixed register hint.
(
&self,
value: Value,
seg: LiveRangeSegment,
split_at: Inst,
)
| 193 | /// Given a live range split, returns whether the left and right sides of |
| 194 | /// the split still have a fixed register hint. |
| 195 | pub fn hints_for_split( |
| 196 | &self, |
| 197 | value: Value, |
| 198 | seg: LiveRangeSegment, |
| 199 | split_at: Inst, |
| 200 | ) -> (bool, bool) { |
| 201 | let start = HintKey::incoming(value, seg.from.inst()); |
| 202 | let end = HintKey::outgoing(value, seg.to.round_to_next_inst().inst()); |
| 203 | let mid_key = HintKey::incoming(value, split_at); |
| 204 | let mid = self.hints.partition_point(|hint| hint.key < mid_key); |
| 205 | let first = mid != 0 && self.hints[mid - 1].key >= start; |
| 206 | let second = self.hints.get(mid).is_some_and(|hint| hint.key <= end); |
| 207 | (first, second) |
| 208 | } |
| 209 | } |
no test coverage detected