Returns an iterator over all the fixed-register hints covered by the given live range segment.
(
&self,
value: Value,
seg: LiveRangeSegment,
)
| 178 | /// Returns an iterator over all the fixed-register hints covered by the |
| 179 | /// given live range segment. |
| 180 | pub fn hints_for_segment( |
| 181 | &self, |
| 182 | value: Value, |
| 183 | seg: LiveRangeSegment, |
| 184 | ) -> impl Iterator<Item = &Hint> + '_ { |
| 185 | let start = HintKey::incoming(value, seg.from.inst()); |
| 186 | let end = HintKey::outgoing(value, seg.to.round_to_next_inst().inst()); |
| 187 | let from = self.hints.partition_point(|hint| hint.key < start); |
| 188 | self.hints[from..] |
| 189 | .iter() |
| 190 | .take_while(move |hint| hint.key <= end) |
| 191 | } |
| 192 | |
| 193 | /// Given a live range split, returns whether the left and right sides of |
| 194 | /// the split still have a fixed register hint. |
no test coverage detected