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

Method common_subclass

src/reginfo.rs:409–415  ·  view source on GitHub ↗
(&self, a: RegClass, b: RegClass)

Source from the content-addressed store, hash-verified

407 /// `None` if no common sub-class exists.
408 #[inline]
409 fn common_subclass(&self, a: RegClass, b: RegClass) -> Option<RegClass> {
410 // Since classes are ordered topologically, this is the lowest indexed
411 // class which is a sub-class of both original classes.
412 (self.sub_classes(a) & self.sub_classes(b))
413 .into_iter()
414 .next()
415 }
416
417 /// The group size of registers in this class.
418 ///

Callers 2

try_reuse_valueMethod · 0.80
merge_useMethod · 0.80

Implementers 1

mod.rssrc/debug_utils/generic_reginfo/mod.rs

Calls 3

sub_classesMethod · 0.80
nextMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected