package
0.3.6
Repository: https://github.com/llir/llvm.git
Documentation: pkg.go.dev

# Packages

Package constant implements values representing immutable LLVM IR constants.
Package enum defines enumerate types of LLVM IR.
Package metadata provides access to LLVM IR metadata.
Package types declares the data types of LLVM IR.
Package value provides a definition of LLVM IR values.

# Functions

NewAdd returns a new add instruction based on the given operands.
NewAddrSpaceCast returns a new addrspacecast instruction based on the given source value and target type.
NewAlias returns a new alias based on the given alias name and aliasee.
NewAlloca returns a new alloca instruction based on the given element type.
NewAnd returns a new and instruction based on the given operands.
NewArg returns a new function argument based on the given value and parameter attributes.
NewAShr returns a new ashr instruction based on the given operands.
NewAtomicRMW returns a new atomicrmw instruction based on the given atomic operation, destination address, operand and atomic ordering.
NewBitCast returns a new bitcast instruction based on the given source value and target type.
NewBlock returns a new basic block based on the given label name.
NewBr returns a new unconditional br terminator based on the given target basic block.
NewCall returns a new call instruction based on the given callee and function arguments.
NewCallBr returns a new callbr terminator based on the given callee, function arguments and control flow return points for normal and exceptional execution.
NewCase returns a new switch case based on the given case comparand and target basic block.
NewCatchPad returns a new catchpad instruction based on the given parent catchswitch terminator and exception arguments.
NewCatchRet returns a new catchret terminator based on the given exit catchpad and target basic block.
NewCatchSwitch returns a new catchswitch terminator based on the given parent exception pad, exception handlers and optional default unwind target.
NewClause returns a new landingpad clause based on the given clause type and operand.
NewCleanupPad returns a new cleanuppad instruction based on the given parent exception pad and exception arguments.
NewCleanupRet returns a new cleanupret terminator based on the given exit cleanuppad and optional unwind target.
NewCmpXchg returns a new cmpxchg instruction based on the given address, value to compare against, new value to store, and atomic orderings for success and failure.
NewCondBr returns a new conditional br terminator based on the given branching condition and conditional target basic blocks.
NewExtractElement returns a new extractelement instruction based on the given vector and element index.
NewExtractValue returns a new extractvalue instruction based on the given aggregate value and indicies.
NewFAdd returns a new fadd instruction based on the given operands.
NewFCmp returns a new fcmp instruction based on the given floating-point comparison predicate and floating-point scalar or vector operands.
NewFDiv returns a new fdiv instruction based on the given operands.
NewFence returns a new fence instruction based on the given atomic ordering.
NewFMul returns a new fmul instruction based on the given operands.
NewFNeg returns a new fneg instruction based on the given operand.
NewFPExt returns a new fpext instruction based on the given source value and target type.
NewFPToSI returns a new fptosi instruction based on the given source value and target type.
NewFPToUI returns a new fptoui instruction based on the given source value and target type.
NewFPTrunc returns a new fptrunc instruction based on the given source value and target type.
NewFRem returns a new frem instruction based on the given operands.
NewFSub returns a new fsub instruction based on the given operands.
NewFunc returns a new function based on the given function name, return type and function parameters.
NewGetElementPtr returns a new getelementptr instruction based on the given element type, source address and element indices.
NewGlobal returns a new global variable declaration based on the given global variable name and content type.
NewGlobalDef returns a new global variable definition based on the given global variable name and initial value.
NewICmp returns a new icmp instruction based on the given integer comparison predicate and integer scalar or vector operands.
NewIFunc returns a new indirect function based on the given IFunc name and resolver.
NewIncoming returns a new incoming value based on the given value and predecessor basic block.
NewIndirectBr returns a new indirectbr terminator based on the given target address (derived from a blockaddress constant of type i8*) and set of valid target basic blocks.
NewInlineAsm returns a new inline assembler expression based on the given type, assembly instructions and constraints.
NewInsertElement returns a new insertelement instruction based on the given vector, element and element index.
NewInsertValue returns a new insertvalue instruction based on the given aggregate value, element and indicies.
NewInstFreeze returns a new freeze instruction based on the given operand.
NewIntToPtr returns a new inttoptr instruction based on the given source value and target type.
NewInvoke returns a new invoke terminator based on the given invokee, function arguments and control flow return points for normal and exceptional execution.
NewLandingPad returns a new landingpad instruction based on the given result type and filter/catch clauses.
NewLoad returns a new load instruction based on the given element type and source address.
NewLocalIdent returns a new local identifier based on the given string.
NewLShr returns a new lshr instruction based on the given operands.
NewModule returns a new LLVM IR module.
NewMul returns a new mul instruction based on the given operands.
NewOperandBundle returns a new operand bundle based on the given tag and input values.
NewOr returns a new or instruction based on the given operands.
NewParam returns a new function parameter based on the given name and type.
NewPhi returns a new phi instruction based on the given incoming values.
NewPtrToInt returns a new ptrtoint instruction based on the given source value and target type.
NewResume returns a new resume terminator based on the given exception argument to propagate.
NewRet returns a new ret terminator based on the given return value.
NewSDiv returns a new sdiv instruction based on the given operands.
NewSelect returns a new select instruction based on the given selection condition and true and false condition values.
NewSExt returns a new sext instruction based on the given source value and target type.
NewShl returns a new shl instruction based on the given operands.
NewShuffleVector returns a new shufflevector instruction based on the given vectors and shuffle mask.
NewSIToFP returns a new sitofp instruction based on the given source value and target type.
NewSRem returns a new srem instruction based on the given operands.
NewStore returns a new store instruction based on the given source value and destination address.
NewSub returns a new sub instruction based on the given operands.
NewSwitch returns a new switch terminator based on the given control variable, default target basic block and switch cases.
NewTrunc returns a new trunc instruction based on the given source value and target type.
NewUDiv returns a new udiv instruction based on the given operands.
NewUIToFP returns a new uitofp instruction based on the given source value and target type.
NewUnreachable returns a new unreachable terminator.
NewURem returns a new urem instruction based on the given operands.
NewVAArg returns a new va_arg instruction based on the given variable argument list and argument type.
NewXor returns a new xor instruction based on the given operands.
NewZExt returns a new zext instruction based on the given source value and target type.

# Structs

Alias is an alias of a global identifier or constant expression.
AllocSize is an attribute for functions like malloc.
Arg is a function argument with optional parameter attributes.
AttrGroupDef is an attribute group definition.
AttrPair is an attribute key-value pair (used in function, parameter and return attributes).
Block is an LLVM IR basic block; a sequence of non-branching instructions terminated by a control flow instruction (e.g.
ByRef is a byref parameter attribute.
Byval is a byval parameter attribute.
Case is a switch case.
Clause is a landingpad catch or filter clause.
ComdatDef is a comdat definition top-level entity.
Dereferenceable is a dereferenceable memory attribute.
ElementType is a elementtype parameter attribute.
Func is an LLVM IR function.
Global is a global variable declaration or definition.
GlobalIdent is a global identifier.
IFunc is an indirect function (a special kind of function alias).
InAlloca is a param attribute.
Incoming is an incoming value of a phi instruction.
InlineAsm is an inline assembler expression.
InstAdd is an LLVM IR add instruction.
InstAddrSpaceCast is an LLVM IR addrspacecast instruction.
InstAlloca is an LLVM IR alloca instruction.
InstAnd is an LLVM IR and instruction.
InstAShr is an LLVM IR ashr instruction.
InstAtomicRMW is an LLVM IR atomicrmw instruction.
InstBitCast is an LLVM IR bitcast instruction.
InstCall is an LLVM IR call instruction.
InstCatchPad is an LLVM IR catchpad instruction.
InstCleanupPad is an LLVM IR cleanuppad instruction.
InstCmpXchg is an LLVM IR cmpxchg instruction.
InstExtractElement is an LLVM IR extractelement instruction.
InstExtractValue is an LLVM IR extractvalue instruction.
InstFAdd is an LLVM IR fadd instruction.
InstFCmp is an LLVM IR fcmp instruction.
InstFDiv is an LLVM IR fdiv instruction.
InstFence is an LLVM IR fence instruction.
InstFMul is an LLVM IR fmul instruction.
InstFNeg is an LLVM IR fneg instruction.
InstFPExt is an LLVM IR fpext instruction.
InstFPToSI is an LLVM IR fptosi instruction.
InstFPToUI is an LLVM IR fptoui instruction.
InstFPTrunc is an LLVM IR fptrunc instruction.
InstFreeze is an LLVM IR freeze instruction.
InstFRem is an LLVM IR frem instruction.
InstFSub is an LLVM IR fsub instruction.
InstGetElementPtr is an LLVM IR getelementptr instruction.
InstICmp is an LLVM IR icmp instruction.
InstInsertElement is an LLVM IR insertelement instruction.
InstInsertValue is an LLVM IR insertvalue instruction.
InstIntToPtr is an LLVM IR inttoptr instruction.
InstLandingPad is an LLVM IR landingpad instruction.
InstLoad is an LLVM IR load instruction.
InstLShr is an LLVM IR lshr instruction.
InstMul is an LLVM IR mul instruction.
InstOr is an LLVM IR or instruction.
InstPhi is an LLVM IR phi instruction.
InstPtrToInt is an LLVM IR ptrtoint instruction.
InstSDiv is an LLVM IR sdiv instruction.
InstSelect is an LLVM IR select instruction.
InstSExt is an LLVM IR sext instruction.
InstShl is an LLVM IR shl instruction.
InstShuffleVector is an LLVM IR shufflevector instruction.
InstSIToFP is an LLVM IR sitofp instruction.
InstSRem is an LLVM IR srem instruction.
InstStore is an LLVM IR store instruction.
InstSub is an LLVM IR sub instruction.
InstTrunc is an LLVM IR trunc instruction.
InstUDiv is an LLVM IR udiv instruction.
InstUIToFP is an LLVM IR uitofp instruction.
InstURem is an LLVM IR urem instruction.
InstVAArg is an LLVM IR va_arg instruction.
InstXor is an LLVM IR xor instruction.
InstZExt is an LLVM IR zext instruction.
LocalIdent is a local identifier.
Module is an LLVM IR module, which consists of top-level declarations and definitions.
OperandBundle is a tagged set of SSA values associated with a call-site.
Param is an LLVM IR function parameter.
Preallocated is a func/param attribute.
SRet is an sret parameter attribute.
TermBr is an unconditional LLVM IR br terminator.
TermCallBr is an LLVM IR callbr terminator.
TermCatchRet is an LLVM IR catchret terminator, which catches an in-flight exception from CatchPad and returns control flow to normal at Target.
TermCatchSwitch is an LLVM IR catchswitch terminator.
TermCleanupRet is an LLVM IR cleanupret terminator, which indicates that the personality function of a cleanuppad has finished and transfers control flow to an optional target basic block or unwinds to the caller function.
TermCondBr is a conditional LLVM IR br terminator.
TermIndirectBr is an LLVM IR indirectbr terminator.
TermInvoke is an LLVM IR invoke terminator.
TermResume is an LLVM IR resume terminator.
TermRet is an LLVM IR ret terminator.
TermSwitch is an LLVM IR switch terminator.
TermUnreachable is an LLVM IR unreachable terminator.
UseListOrder is a use-list order directive.
UseListOrderBB is a basic block specific use-list order directive.
VectorScaleRange denotes the min/max vector scale value of a given function.

# Interfaces

ExceptionPad is an exception pad or the none token.
FuncAttribute is a function attribute.
Instruction is an LLVM IR instruction.
LLStringer is implemented by any value that has a LLString method, which defines the LLVM syntax for that value.
ParamAttribute is a parameter attribute.
ReturnAttribute is a return attribute.
Terminator is an LLVM IR terminator instruction (a control flow instruction).

# Type aliases

Align is a memory alignment attribute.
AlignStack is a stack alignment attribute.
AttrString is an attribute string (used in function, parameter and return attributes).
Metadata is a list of metadata attachments.