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 ABIBody<I = I>>,
block_order: BlockLoweringOrder
) -> CodegenResult<Lower<'func, I>>
[src]
f: &'func Function,
abi: Box<dyn ABIBody<I = I>>,
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) -> &dyn ABIBody<I = I>
[src]
fn retval(&self, idx: usize) -> Writable<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 inst_color(&self, ir_inst: Inst) -> InstColor
[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(&self, ir_inst: Inst, idx: usize) -> LowerInput
[src]
fn get_output(&self, ir_inst: Inst, idx: usize) -> Writable<Reg>
[src]
fn alloc_tmp(&mut self, rc: RegClass, ty: Type) -> Writable<Reg>
[src]
fn emit(&mut self, mach_inst: I)
[src]
fn emit_safepoint(&mut self, mach_inst: I)
[src]
fn use_input_reg(&mut self, input: LowerInput)
[src]
fn is_reg_needed(&self, ir_inst: Inst, reg: Reg) -> bool
[src]
fn get_constant_data(&self, constant_handle: Constant) -> &ConstantData
[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: 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>,