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

Method to_virtual_reg

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

Get the virtual (non-physical) register, if this register is one.

(self)

Source from the content-addressed store, hash-verified

91 /// Get the virtual (non-physical) register, if this register is
92 /// one.
93 pub fn to_virtual_reg(self) -> Option<VirtualReg> {
94 if self.to_spillslot().is_some() {
95 None
96 } else if pinned_vreg_to_preg(self.0.into()).is_none() {
97 Some(VirtualReg(self.0.into()))
98 } else {
99 None
100 }
101 }
102
103 /// Get the spillslot, if this register is one.
104 pub fn to_spillslot(self) -> Option<SpillSlot> {

Callers 4

add_block_paramsMethod · 0.80
is_virtualMethod · 0.80
fmtMethod · 0.80
allocMethod · 0.80

Calls 5

pinned_vreg_to_pregFunction · 0.85
VirtualRegClass · 0.85
to_spillslotMethod · 0.80
is_someMethod · 0.45
is_noneMethod · 0.45

Tested by

no test coverage detected