enumstd.zig.llvm.Builder.Function.Instruction.Tag[src]

Fields

add
@"add nsw"
@"add nuw"
@"add nuw nsw"
addrspacecast
alloca
@"alloca inalloca"
@"and"
arg
ashr
@"ashr exact"
atomicrmw
bitcast
block
br
br_cond
call
@"call fast"
cmpxchg
@"cmpxchg weak"
extractelement
extractvalue
fadd
@"fadd fast"
@"fcmp false"
@"fcmp fast false"
@"fcmp fast oeq"
@"fcmp fast oge"
@"fcmp fast ogt"
@"fcmp fast ole"
@"fcmp fast olt"
@"fcmp fast one"
@"fcmp fast ord"
@"fcmp fast true"
@"fcmp fast ueq"
@"fcmp fast uge"
@"fcmp fast ugt"
@"fcmp fast ule"
@"fcmp fast ult"
@"fcmp fast une"
@"fcmp fast uno"
@"fcmp oeq"
@"fcmp oge"
@"fcmp ogt"
@"fcmp ole"
@"fcmp olt"
@"fcmp one"
@"fcmp ord"
@"fcmp true"
@"fcmp ueq"
@"fcmp uge"
@"fcmp ugt"
@"fcmp ule"
@"fcmp ult"
@"fcmp une"
@"fcmp uno"
fdiv
@"fdiv fast"
fence
fmul
@"fmul fast"
fneg
@"fneg fast"
fpext
fptosi
fptoui
fptrunc
frem
@"frem fast"
fsub
@"fsub fast"
getelementptr
@"getelementptr inbounds"
@"icmp eq"
@"icmp ne"
@"icmp sge"
@"icmp sgt"
@"icmp sle"
@"icmp slt"
@"icmp uge"
@"icmp ugt"
@"icmp ule"
@"icmp ult"
indirectbr
insertelement
insertvalue
inttoptr
load
@"load atomic"
lshr
@"lshr exact"
mul
@"mul nsw"
@"mul nuw"
@"mul nuw nsw"
@"musttail call"
@"musttail call fast"
@"notail call"
@"notail call fast"
@"or"
phi
@"phi fast"
ptrtoint
ret
@"ret void"
sdiv
@"sdiv exact"
select
@"select fast"
sext
shl
@"shl nsw"
@"shl nuw"
@"shl nuw nsw"
shufflevector
sitofp
srem
store
@"store atomic"
sub
@"sub nsw"
@"sub nuw"
@"sub nuw nsw"
@"switch"
@"tail call"
@"tail call fast"
trunc
udiv
@"udiv exact"
urem
uitofp
@"unreachable"
va_arg
xor
zext

Functions

FunctiontoBinaryOpcode[src]

pub fn toBinaryOpcode(self: Tag) BinaryOpcode

Parameters

self: Tag

Source Code

Source code
pub fn toBinaryOpcode(self: Tag) BinaryOpcode {
    return switch (self) {
        .add,
        .@"add nsw",
        .@"add nuw",
        .@"add nuw nsw",
        .fadd,
        .@"fadd fast",
        => .add,
        .sub,
        .@"sub nsw",
        .@"sub nuw",
        .@"sub nuw nsw",
        .fsub,
        .@"fsub fast",
        => .sub,
        .sdiv,
        .@"sdiv exact",
        .fdiv,
        .@"fdiv fast",
        => .sdiv,
        .fmul,
        .@"fmul fast",
        .mul,
        .@"mul nsw",
        .@"mul nuw",
        .@"mul nuw nsw",
        => .mul,
        .srem,
        .frem,
        .@"frem fast",
        => .srem,
        .udiv,
        .@"udiv exact",
        => .udiv,
        .shl,
        .@"shl nsw",
        .@"shl nuw",
        .@"shl nuw nsw",
        => .shl,
        .lshr,
        .@"lshr exact",
        => .lshr,
        .ashr,
        .@"ashr exact",
        => .ashr,
        .@"and" => .@"and",
        .@"or" => .@"or",
        .xor => .xor,
        .urem => .urem,
        else => unreachable,
    };
}

FunctiontoCastOpcode[src]

pub fn toCastOpcode(self: Tag) CastOpcode

Parameters

self: Tag

Source Code

Source code
pub fn toCastOpcode(self: Tag) CastOpcode {
    return switch (self) {
        .trunc => .trunc,
        .zext => .zext,
        .sext => .sext,
        .fptoui => .fptoui,
        .fptosi => .fptosi,
        .uitofp => .uitofp,
        .sitofp => .sitofp,
        .fptrunc => .fptrunc,
        .fpext => .fpext,
        .ptrtoint => .ptrtoint,
        .inttoptr => .inttoptr,
        .bitcast => .bitcast,
        .addrspacecast => .addrspacecast,
        else => unreachable,
    };
}

FunctiontoCmpPredicate[src]

pub fn toCmpPredicate(self: Tag) CmpPredicate

Parameters

self: Tag

Source Code

Source code
pub fn toCmpPredicate(self: Tag) CmpPredicate {
    return switch (self) {
        .@"fcmp false",
        .@"fcmp fast false",
        => .fcmp_false,
        .@"fcmp oeq",
        .@"fcmp fast oeq",
        => .fcmp_oeq,
        .@"fcmp oge",
        .@"fcmp fast oge",
        => .fcmp_oge,
        .@"fcmp ogt",
        .@"fcmp fast ogt",
        => .fcmp_ogt,
        .@"fcmp ole",
        .@"fcmp fast ole",
        => .fcmp_ole,
        .@"fcmp olt",
        .@"fcmp fast olt",
        => .fcmp_olt,
        .@"fcmp one",
        .@"fcmp fast one",
        => .fcmp_one,
        .@"fcmp ord",
        .@"fcmp fast ord",
        => .fcmp_ord,
        .@"fcmp true",
        .@"fcmp fast true",
        => .fcmp_true,
        .@"fcmp ueq",
        .@"fcmp fast ueq",
        => .fcmp_ueq,
        .@"fcmp uge",
        .@"fcmp fast uge",
        => .fcmp_uge,
        .@"fcmp ugt",
        .@"fcmp fast ugt",
        => .fcmp_ugt,
        .@"fcmp ule",
        .@"fcmp fast ule",
        => .fcmp_ule,
        .@"fcmp ult",
        .@"fcmp fast ult",
        => .fcmp_ult,
        .@"fcmp une",
        .@"fcmp fast une",
        => .fcmp_une,
        .@"fcmp uno",
        .@"fcmp fast uno",
        => .fcmp_uno,
        .@"icmp eq" => .icmp_eq,
        .@"icmp ne" => .icmp_ne,
        .@"icmp sge" => .icmp_sge,
        .@"icmp sgt" => .icmp_sgt,
        .@"icmp sle" => .icmp_sle,
        .@"icmp slt" => .icmp_slt,
        .@"icmp uge" => .icmp_uge,
        .@"icmp ugt" => .icmp_ugt,
        .@"icmp ule" => .icmp_ule,
        .@"icmp ult" => .icmp_ult,
        else => unreachable,
    };
}

Source Code

Source code
pub const Tag = enum(u8) {
    add,
    @"add nsw",
    @"add nuw",
    @"add nuw nsw",
    addrspacecast,
    alloca,
    @"alloca inalloca",
    @"and",
    arg,
    ashr,
    @"ashr exact",
    atomicrmw,
    bitcast,
    block,
    br,
    br_cond,
    call,
    @"call fast",
    cmpxchg,
    @"cmpxchg weak",
    extractelement,
    extractvalue,
    fadd,
    @"fadd fast",
    @"fcmp false",
    @"fcmp fast false",
    @"fcmp fast oeq",
    @"fcmp fast oge",
    @"fcmp fast ogt",
    @"fcmp fast ole",
    @"fcmp fast olt",
    @"fcmp fast one",
    @"fcmp fast ord",
    @"fcmp fast true",
    @"fcmp fast ueq",
    @"fcmp fast uge",
    @"fcmp fast ugt",
    @"fcmp fast ule",
    @"fcmp fast ult",
    @"fcmp fast une",
    @"fcmp fast uno",
    @"fcmp oeq",
    @"fcmp oge",
    @"fcmp ogt",
    @"fcmp ole",
    @"fcmp olt",
    @"fcmp one",
    @"fcmp ord",
    @"fcmp true",
    @"fcmp ueq",
    @"fcmp uge",
    @"fcmp ugt",
    @"fcmp ule",
    @"fcmp ult",
    @"fcmp une",
    @"fcmp uno",
    fdiv,
    @"fdiv fast",
    fence,
    fmul,
    @"fmul fast",
    fneg,
    @"fneg fast",
    fpext,
    fptosi,
    fptoui,
    fptrunc,
    frem,
    @"frem fast",
    fsub,
    @"fsub fast",
    getelementptr,
    @"getelementptr inbounds",
    @"icmp eq",
    @"icmp ne",
    @"icmp sge",
    @"icmp sgt",
    @"icmp sle",
    @"icmp slt",
    @"icmp uge",
    @"icmp ugt",
    @"icmp ule",
    @"icmp ult",
    indirectbr,
    insertelement,
    insertvalue,
    inttoptr,
    load,
    @"load atomic",
    lshr,
    @"lshr exact",
    mul,
    @"mul nsw",
    @"mul nuw",
    @"mul nuw nsw",
    @"musttail call",
    @"musttail call fast",
    @"notail call",
    @"notail call fast",
    @"or",
    phi,
    @"phi fast",
    ptrtoint,
    ret,
    @"ret void",
    sdiv,
    @"sdiv exact",
    select,
    @"select fast",
    sext,
    shl,
    @"shl nsw",
    @"shl nuw",
    @"shl nuw nsw",
    shufflevector,
    sitofp,
    srem,
    store,
    @"store atomic",
    sub,
    @"sub nsw",
    @"sub nuw",
    @"sub nuw nsw",
    @"switch",
    @"tail call",
    @"tail call fast",
    trunc,
    udiv,
    @"udiv exact",
    urem,
    uitofp,
    @"unreachable",
    va_arg,
    xor,
    zext,

    pub fn toBinaryOpcode(self: Tag) BinaryOpcode {
        return switch (self) {
            .add,
            .@"add nsw",
            .@"add nuw",
            .@"add nuw nsw",
            .fadd,
            .@"fadd fast",
            => .add,
            .sub,
            .@"sub nsw",
            .@"sub nuw",
            .@"sub nuw nsw",
            .fsub,
            .@"fsub fast",
            => .sub,
            .sdiv,
            .@"sdiv exact",
            .fdiv,
            .@"fdiv fast",
            => .sdiv,
            .fmul,
            .@"fmul fast",
            .mul,
            .@"mul nsw",
            .@"mul nuw",
            .@"mul nuw nsw",
            => .mul,
            .srem,
            .frem,
            .@"frem fast",
            => .srem,
            .udiv,
            .@"udiv exact",
            => .udiv,
            .shl,
            .@"shl nsw",
            .@"shl nuw",
            .@"shl nuw nsw",
            => .shl,
            .lshr,
            .@"lshr exact",
            => .lshr,
            .ashr,
            .@"ashr exact",
            => .ashr,
            .@"and" => .@"and",
            .@"or" => .@"or",
            .xor => .xor,
            .urem => .urem,
            else => unreachable,
        };
    }

    pub fn toCastOpcode(self: Tag) CastOpcode {
        return switch (self) {
            .trunc => .trunc,
            .zext => .zext,
            .sext => .sext,
            .fptoui => .fptoui,
            .fptosi => .fptosi,
            .uitofp => .uitofp,
            .sitofp => .sitofp,
            .fptrunc => .fptrunc,
            .fpext => .fpext,
            .ptrtoint => .ptrtoint,
            .inttoptr => .inttoptr,
            .bitcast => .bitcast,
            .addrspacecast => .addrspacecast,
            else => unreachable,
        };
    }

    pub fn toCmpPredicate(self: Tag) CmpPredicate {
        return switch (self) {
            .@"fcmp false",
            .@"fcmp fast false",
            => .fcmp_false,
            .@"fcmp oeq",
            .@"fcmp fast oeq",
            => .fcmp_oeq,
            .@"fcmp oge",
            .@"fcmp fast oge",
            => .fcmp_oge,
            .@"fcmp ogt",
            .@"fcmp fast ogt",
            => .fcmp_ogt,
            .@"fcmp ole",
            .@"fcmp fast ole",
            => .fcmp_ole,
            .@"fcmp olt",
            .@"fcmp fast olt",
            => .fcmp_olt,
            .@"fcmp one",
            .@"fcmp fast one",
            => .fcmp_one,
            .@"fcmp ord",
            .@"fcmp fast ord",
            => .fcmp_ord,
            .@"fcmp true",
            .@"fcmp fast true",
            => .fcmp_true,
            .@"fcmp ueq",
            .@"fcmp fast ueq",
            => .fcmp_ueq,
            .@"fcmp uge",
            .@"fcmp fast uge",
            => .fcmp_uge,
            .@"fcmp ugt",
            .@"fcmp fast ugt",
            => .fcmp_ugt,
            .@"fcmp ule",
            .@"fcmp fast ule",
            => .fcmp_ule,
            .@"fcmp ult",
            .@"fcmp fast ult",
            => .fcmp_ult,
            .@"fcmp une",
            .@"fcmp fast une",
            => .fcmp_une,
            .@"fcmp uno",
            .@"fcmp fast uno",
            => .fcmp_uno,
            .@"icmp eq" => .icmp_eq,
            .@"icmp ne" => .icmp_ne,
            .@"icmp sge" => .icmp_sge,
            .@"icmp sgt" => .icmp_sgt,
            .@"icmp sle" => .icmp_sle,
            .@"icmp slt" => .icmp_slt,
            .@"icmp uge" => .icmp_uge,
            .@"icmp ugt" => .icmp_ugt,
            .@"icmp ule" => .icmp_ule,
            .@"icmp ult" => .icmp_ult,
            else => unreachable,
        };
    }
}