Enum llvm_ir::instruction::Instruction [−][src]
Non-terminator instructions.
Variants
Add(Add)Sub(Sub)Mul(Mul)UDiv(UDiv)SDiv(SDiv)URem(URem)SRem(SRem)And(And)Or(Or)Xor(Xor)Shl(Shl)LShr(LShr)AShr(AShr)FAdd(FAdd)FSub(FSub)FMul(FMul)FDiv(FDiv)FRem(FRem)FNeg(FNeg)ExtractElement(ExtractElement)InsertElement(InsertElement)ShuffleVector(ShuffleVector)ExtractValue(ExtractValue)InsertValue(InsertValue)Alloca(Alloca)Load(Load)Store(Store)Fence(Fence)CmpXchg(CmpXchg)AtomicRMW(AtomicRMW)GetElementPtr(GetElementPtr)Trunc(Trunc)ZExt(ZExt)SExt(SExt)FPTrunc(FPTrunc)FPExt(FPExt)FPToUI(FPToUI)FPToSI(FPToSI)UIToFP(UIToFP)SIToFP(SIToFP)PtrToInt(PtrToInt)IntToPtr(IntToPtr)BitCast(BitCast)AddrSpaceCast(AddrSpaceCast)ICmp(ICmp)FCmp(FCmp)Phi(Phi)Select(Select)Freeze(Freeze)Call(Call)VAArg(VAArg)LandingPad(LandingPad)CatchPad(CatchPad)CleanupPad(CleanupPad)Implementations
impl Instruction[src]
pub fn try_get_result(&self) -> Option<&Name>[src]
Get the result (destination) of the Instruction, or None if the
Instruction doesn't have a result (has void type).
pub fn is_atomic(&self) -> bool[src]
Whether the Instruction is atomic
impl Instruction[src]
pub fn is_binary_op(&self) -> bool[src]
Determine if the Instruction is one of the ones in
groups::BinaryOp, without actually using
try_into() (which would consume it)
pub fn is_unary_op(&self) -> bool[src]
Determine if the Instruction is one of the ones in
groups::UnaryOp, without actually using
try_into() (which would consume it)
Trait Implementations
impl Clone for Instruction[src]
fn clone(&self) -> Instruction[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for Instruction[src]
impl Display for Instruction[src]
impl From<AShr> for Instruction[src]
fn from(inst: AShr) -> Instruction[src]
impl From<Add> for Instruction[src]
fn from(inst: Add) -> Instruction[src]
impl From<AddrSpaceCast> for Instruction[src]
fn from(inst: AddrSpaceCast) -> Instruction[src]
impl From<Alloca> for Instruction[src]
fn from(inst: Alloca) -> Instruction[src]
impl From<And> for Instruction[src]
fn from(inst: And) -> Instruction[src]
impl From<AtomicRMW> for Instruction[src]
fn from(inst: AtomicRMW) -> Instruction[src]
impl From<BinaryOp> for Instruction[src]
fn from(bo: BinaryOp) -> Instruction[src]
impl From<BitCast> for Instruction[src]
fn from(inst: BitCast) -> Instruction[src]
impl From<Call> for Instruction[src]
fn from(inst: Call) -> Instruction[src]
impl From<CatchPad> for Instruction[src]
fn from(inst: CatchPad) -> Instruction[src]
impl From<CleanupPad> for Instruction[src]
fn from(inst: CleanupPad) -> Instruction[src]
impl From<CmpXchg> for Instruction[src]
fn from(inst: CmpXchg) -> Instruction[src]
impl From<ExtractElement> for Instruction[src]
fn from(inst: ExtractElement) -> Instruction[src]
impl From<ExtractValue> for Instruction[src]
fn from(inst: ExtractValue) -> Instruction[src]
impl From<FAdd> for Instruction[src]
fn from(inst: FAdd) -> Instruction[src]
impl From<FCmp> for Instruction[src]
fn from(inst: FCmp) -> Instruction[src]
impl From<FDiv> for Instruction[src]
fn from(inst: FDiv) -> Instruction[src]
impl From<FMul> for Instruction[src]
fn from(inst: FMul) -> Instruction[src]
impl From<FNeg> for Instruction[src]
fn from(inst: FNeg) -> Instruction[src]
impl From<FPExt> for Instruction[src]
fn from(inst: FPExt) -> Instruction[src]
impl From<FPToSI> for Instruction[src]
fn from(inst: FPToSI) -> Instruction[src]
impl From<FPToUI> for Instruction[src]
fn from(inst: FPToUI) -> Instruction[src]
impl From<FPTrunc> for Instruction[src]
fn from(inst: FPTrunc) -> Instruction[src]
impl From<FRem> for Instruction[src]
fn from(inst: FRem) -> Instruction[src]
impl From<FSub> for Instruction[src]
fn from(inst: FSub) -> Instruction[src]
impl From<Fence> for Instruction[src]
fn from(inst: Fence) -> Instruction[src]
impl From<Freeze> for Instruction[src]
fn from(inst: Freeze) -> Instruction[src]
impl From<GetElementPtr> for Instruction[src]
fn from(inst: GetElementPtr) -> Instruction[src]
impl From<ICmp> for Instruction[src]
fn from(inst: ICmp) -> Instruction[src]
impl From<InsertElement> for Instruction[src]
fn from(inst: InsertElement) -> Instruction[src]
impl From<InsertValue> for Instruction[src]
fn from(inst: InsertValue) -> Instruction[src]
impl From<IntToPtr> for Instruction[src]
fn from(inst: IntToPtr) -> Instruction[src]
impl From<LShr> for Instruction[src]
fn from(inst: LShr) -> Instruction[src]
impl From<LandingPad> for Instruction[src]
fn from(inst: LandingPad) -> Instruction[src]
impl From<Load> for Instruction[src]
fn from(inst: Load) -> Instruction[src]
impl From<Mul> for Instruction[src]
fn from(inst: Mul) -> Instruction[src]
impl From<Or> for Instruction[src]
fn from(inst: Or) -> Instruction[src]
impl From<Phi> for Instruction[src]
fn from(inst: Phi) -> Instruction[src]
impl From<PtrToInt> for Instruction[src]
fn from(inst: PtrToInt) -> Instruction[src]
impl From<SDiv> for Instruction[src]
fn from(inst: SDiv) -> Instruction[src]
impl From<SExt> for Instruction[src]
fn from(inst: SExt) -> Instruction[src]
impl From<SIToFP> for Instruction[src]
fn from(inst: SIToFP) -> Instruction[src]
impl From<SRem> for Instruction[src]
fn from(inst: SRem) -> Instruction[src]
impl From<Select> for Instruction[src]
fn from(inst: Select) -> Instruction[src]
impl From<Shl> for Instruction[src]
fn from(inst: Shl) -> Instruction[src]
impl From<ShuffleVector> for Instruction[src]
fn from(inst: ShuffleVector) -> Instruction[src]
impl From<Store> for Instruction[src]
fn from(inst: Store) -> Instruction[src]
impl From<Sub> for Instruction[src]
fn from(inst: Sub) -> Instruction[src]
impl From<Trunc> for Instruction[src]
fn from(inst: Trunc) -> Instruction[src]
impl From<UDiv> for Instruction[src]
fn from(inst: UDiv) -> Instruction[src]
impl From<UIToFP> for Instruction[src]
fn from(inst: UIToFP) -> Instruction[src]
impl From<URem> for Instruction[src]
fn from(inst: URem) -> Instruction[src]
impl From<UnaryOp> for Instruction[src]
fn from(uo: UnaryOp) -> Instruction[src]
impl From<VAArg> for Instruction[src]
fn from(inst: VAArg) -> Instruction[src]
impl From<Xor> for Instruction[src]
fn from(inst: Xor) -> Instruction[src]
impl From<ZExt> for Instruction[src]
fn from(inst: ZExt) -> Instruction[src]
impl HasDebugLoc for Instruction[src]
fn get_debug_loc(&self) -> &Option<DebugLoc>[src]
impl PartialEq<Instruction> for Instruction[src]
fn eq(&self, other: &Instruction) -> bool[src]
fn ne(&self, other: &Instruction) -> bool[src]
impl StructuralPartialEq for Instruction[src]
impl TryFrom<Instruction> for BinaryOp[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for UnaryOp[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Or[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Xor[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Shl[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for LShr[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for AShr[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FAdd[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FSub[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FMul[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FDiv[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FRem[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Add[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FNeg[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for ExtractElement[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for InsertElement[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for ShuffleVector[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for ExtractValue[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for InsertValue[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Alloca[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Load[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Store[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Fence[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Sub[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for CmpXchg[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for AtomicRMW[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for GetElementPtr[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Trunc[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for ZExt[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for SExt[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FPTrunc[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FPExt[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FPToUI[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FPToSI[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Mul[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for UIToFP[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for SIToFP[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for PtrToInt[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for IntToPtr[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for BitCast[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for AddrSpaceCast[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for ICmp[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for FCmp[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Phi[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Select[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for UDiv[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Freeze[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for Call[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for VAArg[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for LandingPad[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for CatchPad[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for CleanupPad[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for SDiv[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for URem[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for SRem[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl TryFrom<Instruction> for And[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(inst: Instruction) -> Result<Self, Self::Error>[src]
impl Typed for Instruction[src]
The Type of an Instruction (or any subtype of Instruction) is its result type.
Auto Trait Implementations
impl RefUnwindSafe for Instruction[src]
impl Send for Instruction[src]
impl Sync for Instruction[src]
impl Unpin for Instruction[src]
impl UnwindSafe for Instruction[src]
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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
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>,