Enum llvm_ir::instruction::Instruction[][src]

pub enum Instruction {
    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),
}

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]

impl Debug for Instruction[src]

impl Display for Instruction[src]

impl From<AShr> for Instruction[src]

impl From<Add> for Instruction[src]

impl From<AddrSpaceCast> for Instruction[src]

impl From<Alloca> for Instruction[src]

impl From<And> for Instruction[src]

impl From<AtomicRMW> for Instruction[src]

impl From<BinaryOp> for Instruction[src]

impl From<BitCast> for Instruction[src]

impl From<Call> for Instruction[src]

impl From<CatchPad> for Instruction[src]

impl From<CleanupPad> for Instruction[src]

impl From<CmpXchg> for Instruction[src]

impl From<ExtractElement> for Instruction[src]

impl From<ExtractValue> for Instruction[src]

impl From<FAdd> for Instruction[src]

impl From<FCmp> for Instruction[src]

impl From<FDiv> for Instruction[src]

impl From<FMul> for Instruction[src]

impl From<FNeg> for Instruction[src]

impl From<FPExt> for Instruction[src]

impl From<FPToSI> for Instruction[src]

impl From<FPToUI> for Instruction[src]

impl From<FPTrunc> for Instruction[src]

impl From<FRem> for Instruction[src]

impl From<FSub> for Instruction[src]

impl From<Fence> for Instruction[src]

impl From<Freeze> for Instruction[src]

impl From<GetElementPtr> for Instruction[src]

impl From<ICmp> for Instruction[src]

impl From<InsertElement> for Instruction[src]

impl From<InsertValue> for Instruction[src]

impl From<IntToPtr> for Instruction[src]

impl From<LShr> for Instruction[src]

impl From<LandingPad> for Instruction[src]

impl From<Load> for Instruction[src]

impl From<Mul> for Instruction[src]

impl From<Or> for Instruction[src]

impl From<Phi> for Instruction[src]

impl From<PtrToInt> for Instruction[src]

impl From<SDiv> for Instruction[src]

impl From<SExt> for Instruction[src]

impl From<SIToFP> for Instruction[src]

impl From<SRem> for Instruction[src]

impl From<Select> for Instruction[src]

impl From<Shl> for Instruction[src]

impl From<ShuffleVector> for Instruction[src]

impl From<Store> for Instruction[src]

impl From<Sub> for Instruction[src]

impl From<Trunc> for Instruction[src]

impl From<UDiv> for Instruction[src]

impl From<UIToFP> for Instruction[src]

impl From<URem> for Instruction[src]

impl From<UnaryOp> for Instruction[src]

impl From<VAArg> for Instruction[src]

impl From<Xor> for Instruction[src]

impl From<ZExt> for Instruction[src]

impl HasDebugLoc for Instruction[src]

impl PartialEq<Instruction> for Instruction[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.

impl TryFrom<Instruction> for UnaryOp[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Or[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Xor[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Shl[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for LShr[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for AShr[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FAdd[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FSub[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FMul[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FDiv[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FRem[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Add[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FNeg[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for ExtractElement[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for InsertElement[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for ShuffleVector[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for ExtractValue[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for InsertValue[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Alloca[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Load[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Store[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Fence[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Sub[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for CmpXchg[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for AtomicRMW[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for GetElementPtr[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Trunc[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for ZExt[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for SExt[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FPTrunc[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FPExt[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FPToUI[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FPToSI[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Mul[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for UIToFP[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for SIToFP[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for PtrToInt[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for IntToPtr[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for BitCast[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for AddrSpaceCast[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for ICmp[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for FCmp[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Phi[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Select[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for UDiv[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Freeze[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for Call[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for VAArg[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for LandingPad[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for CatchPad[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for CleanupPad[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for SDiv[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for URem[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for SRem[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<Instruction> for And[src]

type Error = &'static str

The type returned in the event of a conversion error.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.