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§
source§impl Instruction
impl Instruction
source§impl 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§
source§impl Clone for Instruction
impl Clone for Instruction
source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Instruction
impl Debug for Instruction
source§impl Display for Instruction
impl Display for Instruction
source§impl From<AShr> for Instruction
impl From<AShr> for Instruction
source§fn from(inst: AShr) -> Instruction
fn from(inst: AShr) -> Instruction
Converts to this type from the input type.
source§impl From<Add> for Instruction
impl From<Add> for Instruction
source§fn from(inst: Add) -> Instruction
fn from(inst: Add) -> Instruction
Converts to this type from the input type.
source§impl From<AddrSpaceCast> for Instruction
impl From<AddrSpaceCast> for Instruction
source§fn from(inst: AddrSpaceCast) -> Instruction
fn from(inst: AddrSpaceCast) -> Instruction
Converts to this type from the input type.
source§impl From<Alloca> for Instruction
impl From<Alloca> for Instruction
source§fn from(inst: Alloca) -> Instruction
fn from(inst: Alloca) -> Instruction
Converts to this type from the input type.
source§impl From<And> for Instruction
impl From<And> for Instruction
source§fn from(inst: And) -> Instruction
fn from(inst: And) -> Instruction
Converts to this type from the input type.
source§impl From<AtomicRMW> for Instruction
impl From<AtomicRMW> for Instruction
source§fn from(inst: AtomicRMW) -> Instruction
fn from(inst: AtomicRMW) -> Instruction
Converts to this type from the input type.
source§impl From<BinaryOp> for Instruction
impl From<BinaryOp> for Instruction
source§fn from(bo: BinaryOp) -> Instruction
fn from(bo: BinaryOp) -> Instruction
Converts to this type from the input type.
source§impl From<BitCast> for Instruction
impl From<BitCast> for Instruction
source§fn from(inst: BitCast) -> Instruction
fn from(inst: BitCast) -> Instruction
Converts to this type from the input type.
source§impl From<Call> for Instruction
impl From<Call> for Instruction
source§fn from(inst: Call) -> Instruction
fn from(inst: Call) -> Instruction
Converts to this type from the input type.
source§impl From<CatchPad> for Instruction
impl From<CatchPad> for Instruction
source§fn from(inst: CatchPad) -> Instruction
fn from(inst: CatchPad) -> Instruction
Converts to this type from the input type.
source§impl From<CleanupPad> for Instruction
impl From<CleanupPad> for Instruction
source§fn from(inst: CleanupPad) -> Instruction
fn from(inst: CleanupPad) -> Instruction
Converts to this type from the input type.
source§impl From<CmpXchg> for Instruction
impl From<CmpXchg> for Instruction
source§fn from(inst: CmpXchg) -> Instruction
fn from(inst: CmpXchg) -> Instruction
Converts to this type from the input type.
source§impl From<ExtractElement> for Instruction
impl From<ExtractElement> for Instruction
source§fn from(inst: ExtractElement) -> Instruction
fn from(inst: ExtractElement) -> Instruction
Converts to this type from the input type.
source§impl From<ExtractValue> for Instruction
impl From<ExtractValue> for Instruction
source§fn from(inst: ExtractValue) -> Instruction
fn from(inst: ExtractValue) -> Instruction
Converts to this type from the input type.
source§impl From<FAdd> for Instruction
impl From<FAdd> for Instruction
source§fn from(inst: FAdd) -> Instruction
fn from(inst: FAdd) -> Instruction
Converts to this type from the input type.
source§impl From<FCmp> for Instruction
impl From<FCmp> for Instruction
source§fn from(inst: FCmp) -> Instruction
fn from(inst: FCmp) -> Instruction
Converts to this type from the input type.
source§impl From<FDiv> for Instruction
impl From<FDiv> for Instruction
source§fn from(inst: FDiv) -> Instruction
fn from(inst: FDiv) -> Instruction
Converts to this type from the input type.
source§impl From<FMul> for Instruction
impl From<FMul> for Instruction
source§fn from(inst: FMul) -> Instruction
fn from(inst: FMul) -> Instruction
Converts to this type from the input type.
source§impl From<FNeg> for Instruction
impl From<FNeg> for Instruction
source§fn from(inst: FNeg) -> Instruction
fn from(inst: FNeg) -> Instruction
Converts to this type from the input type.
source§impl From<FPExt> for Instruction
impl From<FPExt> for Instruction
source§fn from(inst: FPExt) -> Instruction
fn from(inst: FPExt) -> Instruction
Converts to this type from the input type.
source§impl From<FPToSI> for Instruction
impl From<FPToSI> for Instruction
source§fn from(inst: FPToSI) -> Instruction
fn from(inst: FPToSI) -> Instruction
Converts to this type from the input type.
source§impl From<FPToUI> for Instruction
impl From<FPToUI> for Instruction
source§fn from(inst: FPToUI) -> Instruction
fn from(inst: FPToUI) -> Instruction
Converts to this type from the input type.
source§impl From<FPTrunc> for Instruction
impl From<FPTrunc> for Instruction
source§fn from(inst: FPTrunc) -> Instruction
fn from(inst: FPTrunc) -> Instruction
Converts to this type from the input type.
source§impl From<FRem> for Instruction
impl From<FRem> for Instruction
source§fn from(inst: FRem) -> Instruction
fn from(inst: FRem) -> Instruction
Converts to this type from the input type.
source§impl From<FSub> for Instruction
impl From<FSub> for Instruction
source§fn from(inst: FSub) -> Instruction
fn from(inst: FSub) -> Instruction
Converts to this type from the input type.
source§impl From<Fence> for Instruction
impl From<Fence> for Instruction
source§fn from(inst: Fence) -> Instruction
fn from(inst: Fence) -> Instruction
Converts to this type from the input type.
source§impl From<Freeze> for Instruction
impl From<Freeze> for Instruction
source§fn from(inst: Freeze) -> Instruction
fn from(inst: Freeze) -> Instruction
Converts to this type from the input type.
source§impl From<GetElementPtr> for Instruction
impl From<GetElementPtr> for Instruction
source§fn from(inst: GetElementPtr) -> Instruction
fn from(inst: GetElementPtr) -> Instruction
Converts to this type from the input type.
source§impl From<ICmp> for Instruction
impl From<ICmp> for Instruction
source§fn from(inst: ICmp) -> Instruction
fn from(inst: ICmp) -> Instruction
Converts to this type from the input type.
source§impl From<InsertElement> for Instruction
impl From<InsertElement> for Instruction
source§fn from(inst: InsertElement) -> Instruction
fn from(inst: InsertElement) -> Instruction
Converts to this type from the input type.
source§impl From<InsertValue> for Instruction
impl From<InsertValue> for Instruction
source§fn from(inst: InsertValue) -> Instruction
fn from(inst: InsertValue) -> Instruction
Converts to this type from the input type.
source§impl From<IntToPtr> for Instruction
impl From<IntToPtr> for Instruction
source§fn from(inst: IntToPtr) -> Instruction
fn from(inst: IntToPtr) -> Instruction
Converts to this type from the input type.
source§impl From<LShr> for Instruction
impl From<LShr> for Instruction
source§fn from(inst: LShr) -> Instruction
fn from(inst: LShr) -> Instruction
Converts to this type from the input type.
source§impl From<LandingPad> for Instruction
impl From<LandingPad> for Instruction
source§fn from(inst: LandingPad) -> Instruction
fn from(inst: LandingPad) -> Instruction
Converts to this type from the input type.
source§impl From<Load> for Instruction
impl From<Load> for Instruction
source§fn from(inst: Load) -> Instruction
fn from(inst: Load) -> Instruction
Converts to this type from the input type.
source§impl From<Mul> for Instruction
impl From<Mul> for Instruction
source§fn from(inst: Mul) -> Instruction
fn from(inst: Mul) -> Instruction
Converts to this type from the input type.
source§impl From<Or> for Instruction
impl From<Or> for Instruction
source§fn from(inst: Or) -> Instruction
fn from(inst: Or) -> Instruction
Converts to this type from the input type.
source§impl From<Phi> for Instruction
impl From<Phi> for Instruction
source§fn from(inst: Phi) -> Instruction
fn from(inst: Phi) -> Instruction
Converts to this type from the input type.
source§impl From<PtrToInt> for Instruction
impl From<PtrToInt> for Instruction
source§fn from(inst: PtrToInt) -> Instruction
fn from(inst: PtrToInt) -> Instruction
Converts to this type from the input type.
source§impl From<SDiv> for Instruction
impl From<SDiv> for Instruction
source§fn from(inst: SDiv) -> Instruction
fn from(inst: SDiv) -> Instruction
Converts to this type from the input type.
source§impl From<SExt> for Instruction
impl From<SExt> for Instruction
source§fn from(inst: SExt) -> Instruction
fn from(inst: SExt) -> Instruction
Converts to this type from the input type.
source§impl From<SIToFP> for Instruction
impl From<SIToFP> for Instruction
source§fn from(inst: SIToFP) -> Instruction
fn from(inst: SIToFP) -> Instruction
Converts to this type from the input type.
source§impl From<SRem> for Instruction
impl From<SRem> for Instruction
source§fn from(inst: SRem) -> Instruction
fn from(inst: SRem) -> Instruction
Converts to this type from the input type.
source§impl From<Select> for Instruction
impl From<Select> for Instruction
source§fn from(inst: Select) -> Instruction
fn from(inst: Select) -> Instruction
Converts to this type from the input type.
source§impl From<Shl> for Instruction
impl From<Shl> for Instruction
source§fn from(inst: Shl) -> Instruction
fn from(inst: Shl) -> Instruction
Converts to this type from the input type.
source§impl From<ShuffleVector> for Instruction
impl From<ShuffleVector> for Instruction
source§fn from(inst: ShuffleVector) -> Instruction
fn from(inst: ShuffleVector) -> Instruction
Converts to this type from the input type.
source§impl From<Store> for Instruction
impl From<Store> for Instruction
source§fn from(inst: Store) -> Instruction
fn from(inst: Store) -> Instruction
Converts to this type from the input type.
source§impl From<Sub> for Instruction
impl From<Sub> for Instruction
source§fn from(inst: Sub) -> Instruction
fn from(inst: Sub) -> Instruction
Converts to this type from the input type.
source§impl From<Trunc> for Instruction
impl From<Trunc> for Instruction
source§fn from(inst: Trunc) -> Instruction
fn from(inst: Trunc) -> Instruction
Converts to this type from the input type.
source§impl From<UDiv> for Instruction
impl From<UDiv> for Instruction
source§fn from(inst: UDiv) -> Instruction
fn from(inst: UDiv) -> Instruction
Converts to this type from the input type.
source§impl From<UIToFP> for Instruction
impl From<UIToFP> for Instruction
source§fn from(inst: UIToFP) -> Instruction
fn from(inst: UIToFP) -> Instruction
Converts to this type from the input type.
source§impl From<URem> for Instruction
impl From<URem> for Instruction
source§fn from(inst: URem) -> Instruction
fn from(inst: URem) -> Instruction
Converts to this type from the input type.
source§impl From<UnaryOp> for Instruction
impl From<UnaryOp> for Instruction
source§fn from(uo: UnaryOp) -> Instruction
fn from(uo: UnaryOp) -> Instruction
Converts to this type from the input type.
source§impl From<VAArg> for Instruction
impl From<VAArg> for Instruction
source§fn from(inst: VAArg) -> Instruction
fn from(inst: VAArg) -> Instruction
Converts to this type from the input type.
source§impl From<Xor> for Instruction
impl From<Xor> for Instruction
source§fn from(inst: Xor) -> Instruction
fn from(inst: Xor) -> Instruction
Converts to this type from the input type.
source§impl From<ZExt> for Instruction
impl From<ZExt> for Instruction
source§fn from(inst: ZExt) -> Instruction
fn from(inst: ZExt) -> Instruction
Converts to this type from the input type.
source§impl HasDebugLoc for Instruction
impl HasDebugLoc for Instruction
source§impl PartialEq for Instruction
impl PartialEq for Instruction
source§fn 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 ==
.source§impl TryFrom<Instruction> for AShr
impl TryFrom<Instruction> for AShr
source§impl TryFrom<Instruction> for Add
impl TryFrom<Instruction> for Add
source§impl TryFrom<Instruction> for AddrSpaceCast
impl TryFrom<Instruction> for AddrSpaceCast
source§impl TryFrom<Instruction> for Alloca
impl TryFrom<Instruction> for Alloca
source§impl TryFrom<Instruction> for And
impl TryFrom<Instruction> for And
source§impl TryFrom<Instruction> for AtomicRMW
impl TryFrom<Instruction> for AtomicRMW
source§impl TryFrom<Instruction> for BinaryOp
impl TryFrom<Instruction> for BinaryOp
source§impl TryFrom<Instruction> for BitCast
impl TryFrom<Instruction> for BitCast
source§impl TryFrom<Instruction> for Call
impl TryFrom<Instruction> for Call
source§impl TryFrom<Instruction> for CatchPad
impl TryFrom<Instruction> for CatchPad
source§impl TryFrom<Instruction> for CleanupPad
impl TryFrom<Instruction> for CleanupPad
source§impl TryFrom<Instruction> for CmpXchg
impl TryFrom<Instruction> for CmpXchg
source§impl TryFrom<Instruction> for ExtractElement
impl TryFrom<Instruction> for ExtractElement
source§impl TryFrom<Instruction> for ExtractValue
impl TryFrom<Instruction> for ExtractValue
source§impl TryFrom<Instruction> for FAdd
impl TryFrom<Instruction> for FAdd
source§impl TryFrom<Instruction> for FCmp
impl TryFrom<Instruction> for FCmp
source§impl TryFrom<Instruction> for FDiv
impl TryFrom<Instruction> for FDiv
source§impl TryFrom<Instruction> for FMul
impl TryFrom<Instruction> for FMul
source§impl TryFrom<Instruction> for FNeg
impl TryFrom<Instruction> for FNeg
source§impl TryFrom<Instruction> for FPExt
impl TryFrom<Instruction> for FPExt
source§impl TryFrom<Instruction> for FPToSI
impl TryFrom<Instruction> for FPToSI
source§impl TryFrom<Instruction> for FPToUI
impl TryFrom<Instruction> for FPToUI
source§impl TryFrom<Instruction> for FPTrunc
impl TryFrom<Instruction> for FPTrunc
source§impl TryFrom<Instruction> for FRem
impl TryFrom<Instruction> for FRem
source§impl TryFrom<Instruction> for FSub
impl TryFrom<Instruction> for FSub
source§impl TryFrom<Instruction> for Fence
impl TryFrom<Instruction> for Fence
source§impl TryFrom<Instruction> for Freeze
impl TryFrom<Instruction> for Freeze
source§impl TryFrom<Instruction> for GetElementPtr
impl TryFrom<Instruction> for GetElementPtr
source§impl TryFrom<Instruction> for ICmp
impl TryFrom<Instruction> for ICmp
source§impl TryFrom<Instruction> for InsertElement
impl TryFrom<Instruction> for InsertElement
source§impl TryFrom<Instruction> for InsertValue
impl TryFrom<Instruction> for InsertValue
source§impl TryFrom<Instruction> for IntToPtr
impl TryFrom<Instruction> for IntToPtr
source§impl TryFrom<Instruction> for LShr
impl TryFrom<Instruction> for LShr
source§impl TryFrom<Instruction> for LandingPad
impl TryFrom<Instruction> for LandingPad
source§impl TryFrom<Instruction> for Load
impl TryFrom<Instruction> for Load
source§impl TryFrom<Instruction> for Mul
impl TryFrom<Instruction> for Mul
source§impl TryFrom<Instruction> for Or
impl TryFrom<Instruction> for Or
source§impl TryFrom<Instruction> for Phi
impl TryFrom<Instruction> for Phi
source§impl TryFrom<Instruction> for PtrToInt
impl TryFrom<Instruction> for PtrToInt
source§impl TryFrom<Instruction> for SDiv
impl TryFrom<Instruction> for SDiv
source§impl TryFrom<Instruction> for SExt
impl TryFrom<Instruction> for SExt
source§impl TryFrom<Instruction> for SIToFP
impl TryFrom<Instruction> for SIToFP
source§impl TryFrom<Instruction> for SRem
impl TryFrom<Instruction> for SRem
source§impl TryFrom<Instruction> for Select
impl TryFrom<Instruction> for Select
source§impl TryFrom<Instruction> for Shl
impl TryFrom<Instruction> for Shl
source§impl TryFrom<Instruction> for ShuffleVector
impl TryFrom<Instruction> for ShuffleVector
source§impl TryFrom<Instruction> for Store
impl TryFrom<Instruction> for Store
source§impl TryFrom<Instruction> for Sub
impl TryFrom<Instruction> for Sub
source§impl TryFrom<Instruction> for Trunc
impl TryFrom<Instruction> for Trunc
source§impl TryFrom<Instruction> for UDiv
impl TryFrom<Instruction> for UDiv
source§impl TryFrom<Instruction> for UIToFP
impl TryFrom<Instruction> for UIToFP
source§impl TryFrom<Instruction> for URem
impl TryFrom<Instruction> for URem
source§impl TryFrom<Instruction> for UnaryOp
impl TryFrom<Instruction> for UnaryOp
source§impl TryFrom<Instruction> for VAArg
impl TryFrom<Instruction> for VAArg
source§impl TryFrom<Instruction> for Xor
impl TryFrom<Instruction> for Xor
source§impl TryFrom<Instruction> for ZExt
impl TryFrom<Instruction> for ZExt
source§impl 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more