MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / from_virtual_reg

Method from_virtual_reg

cranelift/codegen/src/machinst/reg.rs:56–60  ·  view source on GitHub ↗

Const constructor: create a new Reg from a regalloc2 VReg.

(vreg: regalloc2::VReg)

Source from the content-addressed store, hash-verified

54impl Reg {
55 /// Const constructor: create a new Reg from a regalloc2 VReg.
56 pub const fn from_virtual_reg(vreg: regalloc2::VReg) -> Reg {
57 let bits = vreg.bits() as u32;
58 debug_assert!(bits <= REG_SPILLSLOT_MASK);
59 Reg(bits)
60 }
61
62 /// Const constructor: create a new Reg from a regalloc2 PReg.
63 pub const fn from_real_reg(preg: regalloc2::PReg) -> Reg {

Callers

nothing calls this directly

Calls 2

RegClass · 0.70
bitsMethod · 0.45

Tested by

no test coverage detected