Enum llvm_ir::instruction::Instruction
source · [−]pub enum Instruction {
Show 54 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),
}
Expand description
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
sourceimpl Instruction
impl Instruction
sourceimpl Instruction
impl Instruction
sourcepub fn is_binary_op(&self) -> bool
pub fn is_binary_op(&self) -> bool
Determine if the Instruction
is one of the ones in
groups::BinaryOp
, without actually using
try_into()
(which would consume it)
sourcepub fn is_unary_op(&self) -> bool
pub fn is_unary_op(&self) -> bool
Determine if the Instruction
is one of the ones in
groups::UnaryOp
, without actually using
try_into()
(which would consume it)
Trait Implementations
sourceimpl Clone for Instruction
impl Clone for Instruction
sourcefn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Instruction
impl Debug for Instruction
sourceimpl Display for Instruction
impl Display for Instruction
sourceimpl From<AShr> for Instruction
impl From<AShr> for Instruction
sourcefn from(inst: AShr) -> Instruction
fn from(inst: AShr) -> Instruction
Converts to this type from the input type.
sourceimpl From<Add> for Instruction
impl From<Add> for Instruction
sourcefn from(inst: Add) -> Instruction
fn from(inst: Add) -> Instruction
Converts to this type from the input type.
sourceimpl From<AddrSpaceCast> for Instruction
impl From<AddrSpaceCast> for Instruction
sourcefn from(inst: AddrSpaceCast) -> Instruction
fn from(inst: AddrSpaceCast) -> Instruction
Converts to this type from the input type.
sourceimpl From<Alloca> for Instruction
impl From<Alloca> for Instruction
sourcefn from(inst: Alloca) -> Instruction
fn from(inst: Alloca) -> Instruction
Converts to this type from the input type.
sourceimpl From<And> for Instruction
impl From<And> for Instruction
sourcefn from(inst: And) -> Instruction
fn from(inst: And) -> Instruction
Converts to this type from the input type.
sourceimpl From<AtomicRMW> for Instruction
impl From<AtomicRMW> for Instruction
sourcefn from(inst: AtomicRMW) -> Instruction
fn from(inst: AtomicRMW) -> Instruction
Converts to this type from the input type.
sourceimpl From<BinaryOp> for Instruction
impl From<BinaryOp> for Instruction
sourcefn from(bo: BinaryOp) -> Instruction
fn from(bo: BinaryOp) -> Instruction
Converts to this type from the input type.
sourceimpl From<BitCast> for Instruction
impl From<BitCast> for Instruction
sourcefn from(inst: BitCast) -> Instruction
fn from(inst: BitCast) -> Instruction
Converts to this type from the input type.
sourceimpl From<Call> for Instruction
impl From<Call> for Instruction
sourcefn from(inst: Call) -> Instruction
fn from(inst: Call) -> Instruction
Converts to this type from the input type.
sourceimpl From<CatchPad> for Instruction
impl From<CatchPad> for Instruction
sourcefn from(inst: CatchPad) -> Instruction
fn from(inst: CatchPad) -> Instruction
Converts to this type from the input type.
sourceimpl From<CleanupPad> for Instruction
impl From<CleanupPad> for Instruction
sourcefn from(inst: CleanupPad) -> Instruction
fn from(inst: CleanupPad) -> Instruction
Converts to this type from the input type.
sourceimpl From<CmpXchg> for Instruction
impl From<CmpXchg> for Instruction
sourcefn from(inst: CmpXchg) -> Instruction
fn from(inst: CmpXchg) -> Instruction
Converts to this type from the input type.
sourceimpl From<ExtractElement> for Instruction
impl From<ExtractElement> for Instruction
sourcefn from(inst: ExtractElement) -> Instruction
fn from(inst: ExtractElement) -> Instruction
Converts to this type from the input type.
sourceimpl From<ExtractValue> for Instruction
impl From<ExtractValue> for Instruction
sourcefn from(inst: ExtractValue) -> Instruction
fn from(inst: ExtractValue) -> Instruction
Converts to this type from the input type.
sourceimpl From<FAdd> for Instruction
impl From<FAdd> for Instruction
sourcefn from(inst: FAdd) -> Instruction
fn from(inst: FAdd) -> Instruction
Converts to this type from the input type.
sourceimpl From<FCmp> for Instruction
impl From<FCmp> for Instruction
sourcefn from(inst: FCmp) -> Instruction
fn from(inst: FCmp) -> Instruction
Converts to this type from the input type.
sourceimpl From<FDiv> for Instruction
impl From<FDiv> for Instruction
sourcefn from(inst: FDiv) -> Instruction
fn from(inst: FDiv) -> Instruction
Converts to this type from the input type.
sourceimpl From<FMul> for Instruction
impl From<FMul> for Instruction
sourcefn from(inst: FMul) -> Instruction
fn from(inst: FMul) -> Instruction
Converts to this type from the input type.
sourceimpl From<FNeg> for Instruction
impl From<FNeg> for Instruction
sourcefn from(inst: FNeg) -> Instruction
fn from(inst: FNeg) -> Instruction
Converts to this type from the input type.
sourceimpl From<FPExt> for Instruction
impl From<FPExt> for Instruction
sourcefn from(inst: FPExt) -> Instruction
fn from(inst: FPExt) -> Instruction
Converts to this type from the input type.
sourceimpl From<FPToSI> for Instruction
impl From<FPToSI> for Instruction
sourcefn from(inst: FPToSI) -> Instruction
fn from(inst: FPToSI) -> Instruction
Converts to this type from the input type.
sourceimpl From<FPToUI> for Instruction
impl From<FPToUI> for Instruction
sourcefn from(inst: FPToUI) -> Instruction
fn from(inst: FPToUI) -> Instruction
Converts to this type from the input type.
sourceimpl From<FPTrunc> for Instruction
impl From<FPTrunc> for Instruction
sourcefn from(inst: FPTrunc) -> Instruction
fn from(inst: FPTrunc) -> Instruction
Converts to this type from the input type.
sourceimpl From<FRem> for Instruction
impl From<FRem> for Instruction
sourcefn from(inst: FRem) -> Instruction
fn from(inst: FRem) -> Instruction
Converts to this type from the input type.
sourceimpl From<FSub> for Instruction
impl From<FSub> for Instruction
sourcefn from(inst: FSub) -> Instruction
fn from(inst: FSub) -> Instruction
Converts to this type from the input type.
sourceimpl From<Fence> for Instruction
impl From<Fence> for Instruction
sourcefn from(inst: Fence) -> Instruction
fn from(inst: Fence) -> Instruction
Converts to this type from the input type.
sourceimpl From<Freeze> for Instruction
impl From<Freeze> for Instruction
sourcefn from(inst: Freeze) -> Instruction
fn from(inst: Freeze) -> Instruction
Converts to this type from the input type.
sourceimpl From<GetElementPtr> for Instruction
impl From<GetElementPtr> for Instruction
sourcefn from(inst: GetElementPtr) -> Instruction
fn from(inst: GetElementPtr) -> Instruction
Converts to this type from the input type.
sourceimpl From<ICmp> for Instruction
impl From<ICmp> for Instruction
sourcefn from(inst: ICmp) -> Instruction
fn from(inst: ICmp) -> Instruction
Converts to this type from the input type.
sourceimpl From<InsertElement> for Instruction
impl From<InsertElement> for Instruction
sourcefn from(inst: InsertElement) -> Instruction
fn from(inst: InsertElement) -> Instruction
Converts to this type from the input type.
sourceimpl From<InsertValue> for Instruction
impl From<InsertValue> for Instruction
sourcefn from(inst: InsertValue) -> Instruction
fn from(inst: InsertValue) -> Instruction
Converts to this type from the input type.
sourceimpl From<IntToPtr> for Instruction
impl From<IntToPtr> for Instruction
sourcefn from(inst: IntToPtr) -> Instruction
fn from(inst: IntToPtr) -> Instruction
Converts to this type from the input type.
sourceimpl From<LShr> for Instruction
impl From<LShr> for Instruction
sourcefn from(inst: LShr) -> Instruction
fn from(inst: LShr) -> Instruction
Converts to this type from the input type.
sourceimpl From<LandingPad> for Instruction
impl From<LandingPad> for Instruction
sourcefn from(inst: LandingPad) -> Instruction
fn from(inst: LandingPad) -> Instruction
Converts to this type from the input type.
sourceimpl From<Load> for Instruction
impl From<Load> for Instruction
sourcefn from(inst: Load) -> Instruction
fn from(inst: Load) -> Instruction
Converts to this type from the input type.
sourceimpl From<Mul> for Instruction
impl From<Mul> for Instruction
sourcefn from(inst: Mul) -> Instruction
fn from(inst: Mul) -> Instruction
Converts to this type from the input type.
sourceimpl From<Or> for Instruction
impl From<Or> for Instruction
sourcefn from(inst: Or) -> Instruction
fn from(inst: Or) -> Instruction
Converts to this type from the input type.
sourceimpl From<Phi> for Instruction
impl From<Phi> for Instruction
sourcefn from(inst: Phi) -> Instruction
fn from(inst: Phi) -> Instruction
Converts to this type from the input type.
sourceimpl From<PtrToInt> for Instruction
impl From<PtrToInt> for Instruction
sourcefn from(inst: PtrToInt) -> Instruction
fn from(inst: PtrToInt) -> Instruction
Converts to this type from the input type.
sourceimpl From<SDiv> for Instruction
impl From<SDiv> for Instruction
sourcefn from(inst: SDiv) -> Instruction
fn from(inst: SDiv) -> Instruction
Converts to this type from the input type.
sourceimpl From<SExt> for Instruction
impl From<SExt> for Instruction
sourcefn from(inst: SExt) -> Instruction
fn from(inst: SExt) -> Instruction
Converts to this type from the input type.
sourceimpl From<SIToFP> for Instruction
impl From<SIToFP> for Instruction
sourcefn from(inst: SIToFP) -> Instruction
fn from(inst: SIToFP) -> Instruction
Converts to this type from the input type.
sourceimpl From<SRem> for Instruction
impl From<SRem> for Instruction
sourcefn from(inst: SRem) -> Instruction
fn from(inst: SRem) -> Instruction
Converts to this type from the input type.
sourceimpl From<Select> for Instruction
impl From<Select> for Instruction
sourcefn from(inst: Select) -> Instruction
fn from(inst: Select) -> Instruction
Converts to this type from the input type.
sourceimpl From<Shl> for Instruction
impl From<Shl> for Instruction
sourcefn from(inst: Shl) -> Instruction
fn from(inst: Shl) -> Instruction
Converts to this type from the input type.
sourceimpl From<ShuffleVector> for Instruction
impl From<ShuffleVector> for Instruction
sourcefn from(inst: ShuffleVector) -> Instruction
fn from(inst: ShuffleVector) -> Instruction
Converts to this type from the input type.
sourceimpl From<Store> for Instruction
impl From<Store> for Instruction
sourcefn from(inst: Store) -> Instruction
fn from(inst: Store) -> Instruction
Converts to this type from the input type.
sourceimpl From<Sub> for Instruction
impl From<Sub> for Instruction
sourcefn from(inst: Sub) -> Instruction
fn from(inst: Sub) -> Instruction
Converts to this type from the input type.
sourceimpl From<Trunc> for Instruction
impl From<Trunc> for Instruction
sourcefn from(inst: Trunc) -> Instruction
fn from(inst: Trunc) -> Instruction
Converts to this type from the input type.
sourceimpl From<UDiv> for Instruction
impl From<UDiv> for Instruction
sourcefn from(inst: UDiv) -> Instruction
fn from(inst: UDiv) -> Instruction
Converts to this type from the input type.
sourceimpl From<UIToFP> for Instruction
impl From<UIToFP> for Instruction
sourcefn from(inst: UIToFP) -> Instruction
fn from(inst: UIToFP) -> Instruction
Converts to this type from the input type.
sourceimpl From<URem> for Instruction
impl From<URem> for Instruction
sourcefn from(inst: URem) -> Instruction
fn from(inst: URem) -> Instruction
Converts to this type from the input type.
sourceimpl From<UnaryOp> for Instruction
impl From<UnaryOp> for Instruction
sourcefn from(uo: UnaryOp) -> Instruction
fn from(uo: UnaryOp) -> Instruction
Converts to this type from the input type.
sourceimpl From<VAArg> for Instruction
impl From<VAArg> for Instruction
sourcefn from(inst: VAArg) -> Instruction
fn from(inst: VAArg) -> Instruction
Converts to this type from the input type.
sourceimpl From<Xor> for Instruction
impl From<Xor> for Instruction
sourcefn from(inst: Xor) -> Instruction
fn from(inst: Xor) -> Instruction
Converts to this type from the input type.
sourceimpl From<ZExt> for Instruction
impl From<ZExt> for Instruction
sourcefn from(inst: ZExt) -> Instruction
fn from(inst: ZExt) -> Instruction
Converts to this type from the input type.
sourceimpl HasDebugLoc for Instruction
impl HasDebugLoc for Instruction
sourcefn get_debug_loc(&self) -> &Option<DebugLoc>
fn get_debug_loc(&self) -> &Option<DebugLoc>
Returns the DebugLoc
associated with the given Instruction
,
Terminator
, GlobalVariable
, or Function
; or None
if it doesn’t
have a DebugLoc
. Read more
sourceimpl PartialEq<Instruction> for Instruction
impl PartialEq<Instruction> for Instruction
sourcefn eq(&self, other: &Instruction) -> bool
fn eq(&self, other: &Instruction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl TryFrom<Instruction> for AShr
impl TryFrom<Instruction> for AShr
sourceimpl TryFrom<Instruction> for Add
impl TryFrom<Instruction> for Add
sourceimpl TryFrom<Instruction> for AddrSpaceCast
impl TryFrom<Instruction> for AddrSpaceCast
sourceimpl TryFrom<Instruction> for Alloca
impl TryFrom<Instruction> for Alloca
sourceimpl TryFrom<Instruction> for And
impl TryFrom<Instruction> for And
sourceimpl TryFrom<Instruction> for AtomicRMW
impl TryFrom<Instruction> for AtomicRMW
sourceimpl TryFrom<Instruction> for BinaryOp
impl TryFrom<Instruction> for BinaryOp
sourceimpl TryFrom<Instruction> for BitCast
impl TryFrom<Instruction> for BitCast
sourceimpl TryFrom<Instruction> for Call
impl TryFrom<Instruction> for Call
sourceimpl TryFrom<Instruction> for CatchPad
impl TryFrom<Instruction> for CatchPad
sourceimpl TryFrom<Instruction> for CleanupPad
impl TryFrom<Instruction> for CleanupPad
sourceimpl TryFrom<Instruction> for CmpXchg
impl TryFrom<Instruction> for CmpXchg
sourceimpl TryFrom<Instruction> for ExtractElement
impl TryFrom<Instruction> for ExtractElement
sourceimpl TryFrom<Instruction> for ExtractValue
impl TryFrom<Instruction> for ExtractValue
sourceimpl TryFrom<Instruction> for FAdd
impl TryFrom<Instruction> for FAdd
sourceimpl TryFrom<Instruction> for FCmp
impl TryFrom<Instruction> for FCmp
sourceimpl TryFrom<Instruction> for FDiv
impl TryFrom<Instruction> for FDiv
sourceimpl TryFrom<Instruction> for FMul
impl TryFrom<Instruction> for FMul
sourceimpl TryFrom<Instruction> for FNeg
impl TryFrom<Instruction> for FNeg
sourceimpl TryFrom<Instruction> for FPExt
impl TryFrom<Instruction> for FPExt
sourceimpl TryFrom<Instruction> for FPToSI
impl TryFrom<Instruction> for FPToSI
sourceimpl TryFrom<Instruction> for FPToUI
impl TryFrom<Instruction> for FPToUI
sourceimpl TryFrom<Instruction> for FPTrunc
impl TryFrom<Instruction> for FPTrunc
sourceimpl TryFrom<Instruction> for FRem
impl TryFrom<Instruction> for FRem
sourceimpl TryFrom<Instruction> for FSub
impl TryFrom<Instruction> for FSub
sourceimpl TryFrom<Instruction> for Fence
impl TryFrom<Instruction> for Fence
sourceimpl TryFrom<Instruction> for Freeze
impl TryFrom<Instruction> for Freeze
sourceimpl TryFrom<Instruction> for GetElementPtr
impl TryFrom<Instruction> for GetElementPtr
sourceimpl TryFrom<Instruction> for ICmp
impl TryFrom<Instruction> for ICmp
sourceimpl TryFrom<Instruction> for InsertElement
impl TryFrom<Instruction> for InsertElement
sourceimpl TryFrom<Instruction> for InsertValue
impl TryFrom<Instruction> for InsertValue
sourceimpl TryFrom<Instruction> for IntToPtr
impl TryFrom<Instruction> for IntToPtr
sourceimpl TryFrom<Instruction> for LShr
impl TryFrom<Instruction> for LShr
sourceimpl TryFrom<Instruction> for LandingPad
impl TryFrom<Instruction> for LandingPad
sourceimpl TryFrom<Instruction> for Load
impl TryFrom<Instruction> for Load
sourceimpl TryFrom<Instruction> for Mul
impl TryFrom<Instruction> for Mul
sourceimpl TryFrom<Instruction> for Or
impl TryFrom<Instruction> for Or
sourceimpl TryFrom<Instruction> for Phi
impl TryFrom<Instruction> for Phi
sourceimpl TryFrom<Instruction> for PtrToInt
impl TryFrom<Instruction> for PtrToInt
sourceimpl TryFrom<Instruction> for SDiv
impl TryFrom<Instruction> for SDiv
sourceimpl TryFrom<Instruction> for SExt
impl TryFrom<Instruction> for SExt
sourceimpl TryFrom<Instruction> for SIToFP
impl TryFrom<Instruction> for SIToFP
sourceimpl TryFrom<Instruction> for SRem
impl TryFrom<Instruction> for SRem
sourceimpl TryFrom<Instruction> for Select
impl TryFrom<Instruction> for Select
sourceimpl TryFrom<Instruction> for Shl
impl TryFrom<Instruction> for Shl
sourceimpl TryFrom<Instruction> for ShuffleVector
impl TryFrom<Instruction> for ShuffleVector
sourceimpl TryFrom<Instruction> for Store
impl TryFrom<Instruction> for Store
sourceimpl TryFrom<Instruction> for Sub
impl TryFrom<Instruction> for Sub
sourceimpl TryFrom<Instruction> for Trunc
impl TryFrom<Instruction> for Trunc
sourceimpl TryFrom<Instruction> for UDiv
impl TryFrom<Instruction> for UDiv
sourceimpl TryFrom<Instruction> for UIToFP
impl TryFrom<Instruction> for UIToFP
sourceimpl TryFrom<Instruction> for URem
impl TryFrom<Instruction> for URem
sourceimpl TryFrom<Instruction> for UnaryOp
impl TryFrom<Instruction> for UnaryOp
sourceimpl TryFrom<Instruction> for VAArg
impl TryFrom<Instruction> for VAArg
sourceimpl TryFrom<Instruction> for Xor
impl TryFrom<Instruction> for Xor
sourceimpl TryFrom<Instruction> for ZExt
impl TryFrom<Instruction> for ZExt
sourceimpl Typed for Instruction
impl Typed for Instruction
The Type
of an Instruction
(or any subtype of Instruction
) is its result type.
impl StructuralPartialEq for Instruction
Auto Trait Implementations
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more