Struct cranelift_codegen::machinst::lower::Lower [−][src]
Machine-independent lowering driver / machine-instruction container. Maintains a correspondence from original Inst to MachInsts.
Implementations
impl<'func, I: VCodeInst> Lower<'func, I>
[src]
pub fn new(
f: &'func Function,
abi: Box<dyn ABICallee<I = I>>,
emit_info: I::Info,
block_order: BlockLoweringOrder
) -> CodegenResult<Lower<'func, I>>
[src]
f: &'func Function,
abi: Box<dyn ABICallee<I = I>>,
emit_info: I::Info,
block_order: BlockLoweringOrder
) -> CodegenResult<Lower<'func, I>>
Prepare a new lowering context for the given IR function.
pub fn lower<B: LowerBackend<MInst = I>>(
self,
backend: &B
) -> CodegenResult<(VCode<I>, StackmapRequestInfo)>
[src]
self,
backend: &B
) -> CodegenResult<(VCode<I>, StackmapRequestInfo)>
Lower the function.
Trait Implementations
impl<'func, I: VCodeInst> LowerCtx for Lower<'func, I>
[src]
type I = I
The instruction type for which this lowering framework is instantiated.
fn abi(&mut self) -> &mut dyn ABICallee<I = I>
[src]
fn retval(&self, idx: usize) -> ValueRegs<Writable<Reg>>
[src]
fn get_vm_context(&self) -> Option<Reg>
[src]
fn data(&self, ir_inst: Inst) -> &InstructionData
[src]
fn ty(&self, ir_inst: Inst) -> Type
[src]
fn call_target<'b>(
&'b self,
ir_inst: Inst
) -> Option<(&'b ExternalName, RelocDistance)>
[src]
&'b self,
ir_inst: Inst
) -> Option<(&'b ExternalName, RelocDistance)>
fn call_sig<'b>(&'b self, ir_inst: Inst) -> Option<&'b Signature>
[src]
fn symbol_value<'b>(
&'b self,
ir_inst: Inst
) -> Option<(&'b ExternalName, RelocDistance, i64)>
[src]
&'b self,
ir_inst: Inst
) -> Option<(&'b ExternalName, RelocDistance, i64)>
fn memflags(&self, ir_inst: Inst) -> Option<MemFlags>
[src]
fn srcloc(&self, ir_inst: Inst) -> SourceLoc
[src]
fn num_inputs(&self, ir_inst: Inst) -> usize
[src]
fn num_outputs(&self, ir_inst: Inst) -> usize
[src]
fn input_ty(&self, ir_inst: Inst, idx: usize) -> Type
[src]
fn output_ty(&self, ir_inst: Inst, idx: usize) -> Type
[src]
fn get_constant(&self, ir_inst: Inst) -> Option<u64>
[src]
fn get_input_as_source_or_const(&self, ir_inst: Inst, idx: usize) -> NonRegInput
[src]
fn put_input_in_regs(&mut self, ir_inst: Inst, idx: usize) -> ValueRegs<Reg>
[src]
fn get_output(&self, ir_inst: Inst, idx: usize) -> ValueRegs<Writable<Reg>>
[src]
fn alloc_tmp(&mut self, ty: Type) -> ValueRegs<Writable<Reg>>
[src]
fn emit(&mut self, mach_inst: I)
[src]
fn emit_safepoint(&mut self, mach_inst: I)
[src]
fn sink_inst(&mut self, ir_inst: Inst)
[src]
fn get_constant_data(&self, constant_handle: Constant) -> &ConstantData
[src]
fn use_constant(&mut self, constant: VCodeConstantData) -> VCodeConstant
[src]
fn get_immediate(&self, ir_inst: Inst) -> Option<DataValue>
[src]
fn ensure_in_vreg(&mut self, reg: Reg, ty: Type) -> Reg
[src]
Auto Trait Implementations
impl<'func, I> !RefUnwindSafe for Lower<'func, I>
impl<'func, I> !Send for Lower<'func, I>
impl<'func, I> !Sync for Lower<'func, I>
impl<'func, I> Unpin for Lower<'func, I> where
I: Unpin,
<I as MachInstEmit>::Info: Unpin,
I: Unpin,
<I as MachInstEmit>::Info: Unpin,
impl<'func, I> !UnwindSafe for Lower<'func, 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>,