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

Method first_inst

src/internal/live_range.rs:268–277  ·  view source on GitHub ↗

Returns the first instruction that this segment covers.

(self)

Source from the content-addressed store, hash-verified

266
267 /// Returns the first instruction that this segment covers.
268 pub fn first_inst(self) -> Inst {
269 // This is normally where the live range starts, except if it starts
270 // with a fixed definition since the live range then starts on the
271 // next instruction.
272 if self.use_list.has_fixeddef() {
273 self.live_range.from.inst().prev()
274 } else {
275 self.live_range.from.inst()
276 }
277 }
278
279 /// Number of live instructions covered by several non-overlapping segments.
280 ///

Callers 3

build_segmentsMethod · 0.80
componentsMethod · 0.80
collect_usesMethod · 0.80

Calls 3

has_fixeddefMethod · 0.80
prevMethod · 0.80
instMethod · 0.45

Tested by

no test coverage detected