From 4c595f4f9d357dc1b8ca2f79d2fce93b8fd5842b Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 14 Apr 2021 11:41:02 +0200 Subject: [PATCH] Remove unused store_stackslot/load_stackslot trait methods. --- cranelift/codegen/src/machinst/abi.rs | 18 ------------ cranelift/codegen/src/machinst/abi_impl.rs | 32 ---------------------- 2 files changed, 50 deletions(-) diff --git a/cranelift/codegen/src/machinst/abi.rs b/cranelift/codegen/src/machinst/abi.rs index 7af9b087c8..d9e1e3c6ae 100644 --- a/cranelift/codegen/src/machinst/abi.rs +++ b/cranelift/codegen/src/machinst/abi.rs @@ -111,24 +111,6 @@ pub trait ABICallee { /// Get the address of a stackslot. fn stackslot_addr(&self, slot: StackSlot, offset: u32, into_reg: Writable) -> Self::I; - /// Load from a stackslot. - fn load_stackslot( - &self, - slot: StackSlot, - offset: u32, - ty: Type, - into_reg: ValueRegs>, - ) -> SmallInstVec; - - /// Store to a stackslot. - fn store_stackslot( - &self, - slot: StackSlot, - offset: u32, - ty: Type, - from_reg: ValueRegs, - ) -> SmallInstVec; - /// Load from a spillslot. fn load_spillslot( &self, diff --git a/cranelift/codegen/src/machinst/abi_impl.rs b/cranelift/codegen/src/machinst/abi_impl.rs index be20f4a601..f45492554d 100644 --- a/cranelift/codegen/src/machinst/abi_impl.rs +++ b/cranelift/codegen/src/machinst/abi_impl.rs @@ -1157,38 +1157,6 @@ impl ABICallee for ABICalleeImpl { self.clobbered = clobbered; } - /// Load from a stackslot. - fn load_stackslot( - &self, - slot: StackSlot, - offset: u32, - ty: Type, - into_regs: ValueRegs>, - ) -> SmallInstVec { - // Offset from beginning of stackslot area, which is at nominal SP (see - // [MemArg::NominalSPOffset] for more details on nominal SP tracking). - let stack_off = self.stackslots[slot] as i64; - let sp_off: i64 = stack_off + (offset as i64); - trace!("load_stackslot: slot {} -> sp_off {}", slot, sp_off); - gen_load_stack_multi::(StackAMode::NominalSPOffset(sp_off, ty), into_regs, ty) - } - - /// Store to a stackslot. - fn store_stackslot( - &self, - slot: StackSlot, - offset: u32, - ty: Type, - from_regs: ValueRegs, - ) -> SmallInstVec { - // Offset from beginning of stackslot area, which is at nominal SP (see - // [MemArg::NominalSPOffset] for more details on nominal SP tracking). - let stack_off = self.stackslots[slot] as i64; - let sp_off: i64 = stack_off + (offset as i64); - trace!("store_stackslot: slot {} -> sp_off {}", slot, sp_off); - gen_store_stack_multi::(StackAMode::NominalSPOffset(sp_off, ty), from_regs, ty) - } - /// Produce an instruction that computes a stackslot address. fn stackslot_addr(&self, slot: StackSlot, offset: u32, into_reg: Writable) -> Self::I { // Offset from beginning of stackslot area, which is at nominal SP (see