Struct cranelift_codegen::machinst::vcode::VCode [−][src]
A function in “VCode” (virtualized-register code) form, after lowering. This is essentially a standard CFG of basic blocks, where each basic block consists of lowered instructions produced by the machine-specific backend.
Implementations
impl<I: VCodeInst> VCode<I>
[src]
pub fn flags(&self) -> &Flags
[src]
Returns the flags controlling this function’s compilation.
pub fn vreg_type(&self, vreg: VirtualReg) -> Type
[src]
Get the IR-level type of a VReg.
pub fn have_ref_values(&self) -> bool
[src]
Are there any reference-typed values at all among the vregs?
pub fn entry(&self) -> BlockIndex
[src]
Get the entry block.
pub fn num_blocks(&self) -> usize
[src]
Get the number of blocks. Block indices will be in the range 0 .. (self.num_blocks() - 1)
.
pub fn frame_size(&self) -> u32
[src]
Stack frame size for the full function’s body.
pub fn stack_args_size(&self) -> u32
[src]
Inbound stack-args size.
pub fn succs(&self, block: BlockIndex) -> &[BlockIx]
[src]
Get the successors for a block.
pub fn replace_insns_from_regalloc(&mut self, result: RegAllocResult<Self>)
[src]
Take the results of register allocation, with a sequence of instructions including spliced fill/reload/move instructions, and replace the VCode with them.
pub fn emit(&self) -> MachBuffer<I> where
I: MachInstEmit,
[src]
I: MachInstEmit,
Emit the instructions to a MachBuffer
, containing fixed-up code and external
reloc/trap/etc. records ready for use.
pub fn unwind_info(&self) -> CodegenResult<Option<UnwindInfo<Reg>>>
[src]
Generates unwind info.
pub fn bindex_to_bb(&self, block: BlockIndex) -> Option<Block>
[src]
Get the IR block for a BlockIndex, if one exists.
Trait Implementations
impl<I: VCodeInst> Debug for VCode<I>
[src]
impl<I: VCodeInst> Function for VCode<I>
[src]
type Inst = I
Regalloc is parameterized on F: Function and so can use the projected type F::Inst. Read more
fn insns(&self) -> &[I]
[src]
fn insns_mut(&mut self) -> &mut [I]
[src]
fn get_insn(&self, insn: InstIx) -> &I
[src]
fn get_insn_mut(&mut self, insn: InstIx) -> &mut I
[src]
fn blocks(&self) -> Range<BlockIx>
[src]
fn entry_block(&self) -> BlockIx
[src]
fn block_insns(&self, block: BlockIx) -> Range<InstIx>
[src]
fn block_succs(&self, block: BlockIx) -> Cow<'_, [BlockIx]>
[src]
fn is_ret(&self, insn: InstIx) -> bool
[src]
fn is_included_in_clobbers(&self, insn: &I) -> bool
[src]
fn get_regs(insn: &I, collector: &mut RegUsageCollector<'_>)
[src]
fn map_regs<RUM: RegUsageMapper>(insn: &mut I, mapper: &RUM)
[src]
fn is_move(&self, insn: &I) -> Option<(Writable<Reg>, Reg)>
[src]
fn get_num_vregs(&self) -> usize
[src]
fn get_spillslot_size(&self, regclass: RegClass, vreg: VirtualReg) -> u32
[src]
fn gen_spill(
&self,
to_slot: SpillSlot,
from_reg: RealReg,
vreg: Option<VirtualReg>
) -> I
[src]
&self,
to_slot: SpillSlot,
from_reg: RealReg,
vreg: Option<VirtualReg>
) -> I
fn gen_reload(
&self,
to_reg: Writable<RealReg>,
from_slot: SpillSlot,
vreg: Option<VirtualReg>
) -> I
[src]
&self,
to_reg: Writable<RealReg>,
from_slot: SpillSlot,
vreg: Option<VirtualReg>
) -> I
fn gen_move(
&self,
to_reg: Writable<RealReg>,
from_reg: RealReg,
vreg: VirtualReg
) -> I
[src]
&self,
to_reg: Writable<RealReg>,
from_reg: RealReg,
vreg: VirtualReg
) -> I
fn gen_zero_len_nop(&self) -> I
[src]
fn maybe_direct_reload(
&self,
insn: &I,
reg: VirtualReg,
slot: SpillSlot
) -> Option<I>
[src]
&self,
insn: &I,
reg: VirtualReg,
slot: SpillSlot
) -> Option<I>
fn func_liveins(&self) -> RegallocSet<RealReg>
[src]
fn func_liveouts(&self) -> RegallocSet<RealReg>
[src]
pub fn insn_indices(&self) -> Range<InstIx>
[src]
impl<I: VCodeInst> PrettyPrint for VCode<I>
[src]
Pretty-printing with RealRegUniverse
context.
fn show_rru(&self, mb_rru: Option<&RealRegUniverse>) -> String
[src]
Auto Trait Implementations
impl<I> !RefUnwindSafe for VCode<I>
impl<I> !Send for VCode<I>
impl<I> !Sync for VCode<I>
impl<I> Unpin for VCode<I> where
I: Unpin,
<I as MachInstEmit>::Info: Unpin,
I: Unpin,
<I as MachInstEmit>::Info: Unpin,
impl<I> !UnwindSafe for VCode<I>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,