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

Method kind

src/function.rs:468–481  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

466 #[inline]
467 #[must_use]
468 pub fn kind(self) -> OperandKind {
469 let value = Value::new(self.kind as usize & (MAX_VALUES - 1));
470 let group = ValueGroup::new(self.kind as usize & (MAX_VALUES - 1));
471 match (self.kind >> 29) & 7 {
472 0 => OperandKind::Def(value),
473 1 => OperandKind::Use(value),
474 2 => OperandKind::EarlyDef(value),
475 3 => OperandKind::DefGroup(group),
476 4 => OperandKind::UseGroup(group),
477 5 => OperandKind::EarlyDefGroup(group),
478 6 => OperandKind::NonAllocatable,
479 _ => unreachable!(),
480 }
481 }
482
483 /// Returns the constraint on this operand which describes the requirements
484 /// for the `Allocation` it will be assigned to.

Callers 1

fmtMethod · 0.45

Calls 1

UseClass · 0.85

Tested by

no test coverage detected