FDiv

Struct FDiv 

Source
pub struct FDiv { /* private fields */ }
Expand description

If you want to make a new binary inst, please use the IRBuilder to create it.

Trait Implementations§

Source§

impl BinaryInst for FDiv

Source§

fn get_lhs(&self) -> &Operand

Source§

fn set_lhs(&mut self, lhs: Operand)

Source§

fn get_rhs(&self) -> &Operand

Source§

fn set_rhs(&mut self, rhs: Operand)

Source§

impl Display for FDiv

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Instruction for FDiv

Source§

unsafe fn as_any(&self) -> &dyn Any

Safety Read more
Source§

unsafe fn as_any_mut(&mut self) -> &mut dyn Any

Safety Read more
Source§

fn get_type(&self) -> InstType

Returns the type of current instruction.
Source§

fn get_manager(&self) -> &InstManager

Returns the manager of current instruction.
Source§

unsafe fn get_manager_mut(&mut self) -> &mut InstManager

Returns the manager of current instruction. Read more
Source§

fn copy_self(&self) -> Box<dyn Instruction>

Safety Read more
Source§

fn gen_llvm_ir(&self) -> String

将其生成相关的llvm ir
Source§

fn get_user(&self) -> &[InstPtr]

Returns the instructions that use current instruction as operand.
Source§

unsafe fn get_user_mut(&mut self) -> &mut Vec<InstPtr>

Returns the instructions that use current instruction as operand. Read more
Source§

fn get_operand(&self) -> &[Operand]

Returns the operands of current instruction.
Source§

fn add_operand(&mut self, operand: Operand)

Add an operand to the instruction.
Source§

fn set_operand(&mut self, index: usize, operand: Operand)

Set the operand of cur inst by index and operand (safe and interface). Read more
Source§

fn replace_operand(&mut self, from: &Operand, to: &Operand)

Replace all occurence of from to to.
Source§

unsafe fn get_operand_mut(&mut self) -> &mut Vec<Operand>

Returns the operands of current instruction. Read more
Source§

fn get_prev(&self) -> Option<InstPtr>

Gets the previous instruction of current instruction. If current instruction is the first instruction of the BasicBlock, it will return None. Read more
Source§

unsafe fn set_prev(&mut self, inst: InstPtr)

Sets the previous instruction of current instruction. Read more
Source§

fn get_next(&self) -> Option<InstPtr>

Gets the next instruction of current instruction. If current instruction is the last instruction of the BasicBlock, it will return None. Read more
Source§

unsafe fn set_next(&mut self, inst: InstPtr)

Sets the next instruction of current instruction. Read more
Source§

fn get_value_type(&self) -> ValueType

Returns the value type of current instruction.
Source§

unsafe fn move_self(&mut self)

Moves the current instruction out of the BasicBlock. Please ensure that after moving out and inserting the current instruction into another BasicBlock, the current instruction will not be used again. Read more
Source§

fn insert_before(&mut self, inst: InstPtr)

Inserts a new instruction before the current instruction. The operation will first remove the new instruction from the original BasicBlock and then insert it into the specified position of the current BasicBlock. Read more
Source§

fn insert_after(&mut self, inst: InstPtr)

Inserts a new instruction after the current instruction. The operation will first remove the new instruction from the original BasicBlock and then insert it into the specified position of the current BasicBlock. Read more
Source§

fn remove_self(&mut self)

Remove current instruction from the BasicBlock. This operation will remove the current instruction from the BasicBlock and clear the current operand. Read more
Source§

fn replace_self(&mut self, operand: &Operand)

Replace current instruction with an operand. This operation will call remove_self, but update all users to use the new operand.
Source§

fn get_parent_bb(&self) -> Option<BBPtr>

Returns the BasicBlock that current instruction belongs to.
Source§

unsafe fn set_parent_bb(&mut self, bb: BBPtr)

Set the parent BasicBlock of current instruction. Read more
Source§

fn is_last(&self) -> bool

Returns True if the current instruction is the last instruction in the BasicBlock. Read more
Source§

fn is_first(&self) -> bool

Returns True if the current instruction is the first instruction in the BasicBlock. Read more
Source§

fn get_id(&self) -> usize

Returns the unique id of current instruction.

Auto Trait Implementations§

§

impl Freeze for FDiv

§

impl !RefUnwindSafe for FDiv

§

impl !Send for FDiv

§

impl !Sync for FDiv

§

impl Unpin for FDiv

§

impl !UnwindSafe for FDiv

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.