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

Method hints_for_segment

src/internal/hints.rs:180–191  ·  view source on GitHub ↗

Returns an iterator over all the fixed-register hints covered by the given live range segment.

(
        &self,
        value: Value,
        seg: LiveRangeSegment,
    )

Source from the content-addressed store, hash-verified

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.

Callers 2

build_segmentsMethod · 0.80

Calls 3

round_to_next_instMethod · 0.80
instMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected