Documentation
¶
Overview ¶
Package ir declares the types used to represent LLVM IR modules.
Index ¶
- type Alignment
- type AllocSize
- type Arg
- type Argument
- type AtomicOrdering
- type AttrGroupDef
- type AttrPair
- type AttrString
- type BasicBlock
- func (block *BasicBlock) Def() string
- func (block *BasicBlock) GetName() string
- func (block *BasicBlock) Ident() string
- func (*BasicBlock) IsExceptionScope()
- func (*BasicBlock) IsUnwindTarget()
- func (block *BasicBlock) SetName(name string)
- func (block *BasicBlock) String() string
- func (block *BasicBlock) Type() types.Type
- type BinOp
- type CallingConv
- type Case
- type Clause
- type Comdat
- type ComdatDef
- type Constant
- type DLLStorageClass
- type DataLayout
- type Dereferenceable
- type ExceptionScope
- type FPred
- type FastMathFlag
- type FuncAttr
- type FuncAttribute
- type Function
- type Global
- type IPred
- type Incoming
- type IndirectSymbol
- type InlineAsm
- type InstAShr
- type InstAdd
- type InstAddrSpaceCast
- type InstAlloca
- type InstAnd
- type InstAtomicRMW
- type InstBitCast
- type InstCall
- type InstCatchPad
- type InstCleanupPad
- type InstCmpXchg
- type InstExtractElement
- type InstExtractValue
- type InstFAdd
- type InstFCmp
- type InstFDiv
- type InstFMul
- type InstFPExt
- type InstFPToSI
- type InstFPToUI
- type InstFPTrunc
- type InstFRem
- type InstFSub
- type InstFence
- type InstGetElementPtr
- type InstICmp
- type InstInsertElement
- type InstInsertValue
- type InstIntToPtr
- type InstLShr
- type InstLandingPad
- type InstLoad
- type InstMul
- type InstOr
- type InstPhi
- type InstPtrToInt
- type InstSDiv
- type InstSExt
- type InstSIToFP
- type InstSRem
- type InstSelect
- type InstShl
- type InstShuffleVector
- type InstStore
- type InstSub
- type InstTrunc
- type InstUDiv
- type InstUIToFP
- type InstURem
- type InstVAArg
- type InstXor
- type InstZExt
- type Instruction
- type Linkage
- type LocalDef
- type Module
- type ModuleAsm
- type OperandBundle
- type OverflowFlag
- type Param
- type ParamAttr
- type ParamAttribute
- type Preemption
- type ReturnAttr
- type ReturnAttribute
- type Section
- type SelectionKind
- type SourceFilename
- type StackAlignment
- type SyncScope
- type TLSModel
- type Tail
- type TargetTriple
- type TermBr
- type TermCatchRet
- type TermCatchSwitch
- type TermCleanupRet
- type TermCondBr
- type TermIndirectBr
- type TermInvoke
- type TermResume
- type TermRet
- type TermSwitch
- type TermUnreachable
- type Terminator
- type ThreadLocal
- type UnnamedAddr
- type UnwindTarget
- type UnwindToCaller
- type UseListOrder
- type UseListOrderBB
- type ValueInstruction
- type Visibility
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alignment ¶
type Alignment struct {
Align int64
}
Alignment specifies an alignment attribute,
func (*Alignment) IsFuncAttribute ¶
func (*Alignment) IsFuncAttribute()
func (*AttrGroupID) IsFuncAttribute() {}
func (*Alignment) IsGlobalAttribute ¶
func (*Alignment) IsGlobalAttribute()
type AllocSize ¶
AllocSize specifies an allocation size attribute.
func (*AllocSize) IsFuncAttribute ¶
func (*AllocSize) IsFuncAttribute()
type Arg ¶
type Arg struct { X value.Value ParamAttrs []ParamAttribute }
Arg is a function call argument.
func (*Arg) IsArgument ¶
func (*Arg) IsArgument()
IsArgument ensures that only function call arguments can be assigned to the ast.Argument interface.
type Argument ¶
type Argument interface { fmt.Stringer // IsArgument ensures that only function call arguments can be assigned to // the ast.Argument interface. IsArgument() }
Argument is a function call argument.
type AtomicOrdering ¶
type AtomicOrdering uint8
AtomicOrdering is an atomic ordering attribute.
const ( AtomicOrderingNone AtomicOrdering = iota // none AtomicOrderingAcqRel // acq_rel AtomicOrderingAcquire // acquire AtomicOrderingMonotonic // monotonic AtomicOrderingRelease // release AtomicOrderingSeqCst // seq_cst AtomicOrderingUnordered // unordered )
Atomic ordering attributes.
func (AtomicOrdering) String ¶
func (i AtomicOrdering) String() string
type AttrGroupDef ¶
type AttrGroupDef struct { ID string // AttrGroupID FuncAttrs []FuncAttribute }
AttrGroupDef is a attribute group definition.
func (*AttrGroupDef) Def ¶
func (a *AttrGroupDef) Def() string
Def returns the LLVM syntax representation of the attribute group definition.
func (*AttrGroupDef) IsFuncAttribute ¶
func (*AttrGroupDef) IsFuncAttribute()
IsFuncAttribute ensures that only function attributes can be assigned to the ast.FuncAttribute interface.
func (*AttrGroupDef) IsTopLevelEntity ¶
func (*AttrGroupDef) IsTopLevelEntity()
func (*AttrGroupDef) String ¶
func (a *AttrGroupDef) String() string
String returns the string representation of the attribute group definition.
type AttrPair ¶
AttrPair is a attribute key-value pair of a function, parameter or return argument attribute.
func (*AttrPair) IsFuncAttribute ¶
func (*AttrPair) IsFuncAttribute()
type AttrString ¶
type AttrString struct {
Value string
}
AttrString is a attribute string of a function, parameter or return argument attribute.
func (*AttrString) IsFuncAttribute ¶
func (*AttrString) IsFuncAttribute()
func (*AttrString) String ¶
func (a *AttrString) String() string
String returns the string representation of the attribute string.
type BasicBlock ¶
type BasicBlock struct { // Basic block name (LabelIdent); empty if unnamed. Name string // Instructions of the basic block. Insts []Instruction // Terminating instruction of the basic block. Term Terminator }
A BasicBlock is a sequence of non-branching instructions terminated by a branching instruction.
func (*BasicBlock) Def ¶
func (block *BasicBlock) Def() string
Def returns the LLVM syntax representation of the basic block definition.
func (*BasicBlock) GetName ¶
func (block *BasicBlock) GetName() string
Name returns the name of the basic block.
func (*BasicBlock) Ident ¶
func (block *BasicBlock) Ident() string
Ident returns the identifier associated with the basic block.
func (*BasicBlock) IsExceptionScope ¶
func (*BasicBlock) IsExceptionScope()
IsExceptionScope ensures that only exception scopes can be assigned to the ast.ExceptionScope interface.
func (*BasicBlock) IsUnwindTarget ¶
func (*BasicBlock) IsUnwindTarget()
func (*BasicBlock) SetName ¶
func (block *BasicBlock) SetName(name string)
SetName sets the name of the basic block.
func (*BasicBlock) String ¶
func (block *BasicBlock) String() string
String returns the string representation of the basic block as a type-value pair.
func (*BasicBlock) Type ¶
func (block *BasicBlock) Type() types.Type
Type returns the type of the basic block.
type BinOp ¶
type BinOp uint8
BinOp is an AtomicRMW binary operation.
type CallingConv ¶
type CallingConv uint8
CallingConv is a calling convention.
const ( CallingConvNone CallingConv = iota // none CallingConvAmdGPUCS // amdgpu_cs CallingConvAmdGPUES // amdgpu_es CallingConvAmdGPUGS // amdgpu_gs CallingConvAmdGPUHS // amdgpu_hs CallingConvAmdGPUKernel // amdgpu_kernel CallingConvAmdGPULS // amdgpu_ls CallingConvAmdGPUPS // amdgpu_ps CallingConvAmdGPUVS // amdgpu_vs CallingConvAnyReg // anyregcc CallingConvARMAAPCSVFP // arm_aapcs_vfpcc CallingConvARMAAPCS // arm_aapcscc CallingConvARMAPCS // arm_apcscc CallingConvAVRIntr // avr_intrcc CallingConvAVRSignal // avr_signalcc CallingConvC // ccc CallingConvCold // coldcc CallingConvCXXFastTLS // cxx_fast_tlscc CallingConvFast // fastcc CallingConvGHC // ghccc CallingConvHHVMC // hhvm_ccc CallingConvHHVM // hhvmcc CallingConvIntelOCLBI // intel_ocl_bicc CallingConvMSP430Intr // msp430_intrcc CallingConvPreserveAll // preserve_allcc CallingConvPreserveMost // preserve_mostcc CallingConvPTXDevice // ptx_device CallingConvPTXKernel // ptx_kernel CallingConvSPIRFunc // spir_func CallingConvSPIRKernel // spir_kernel CallingConvSwift // swiftcc CallingConvWebKitJS // webkit_jscc CallingConvWin64 // win64cc CallingConvX86_64SysV // x86_64_sysvcc CallingConvX86FastCall // x86_fastcallcc CallingConvX86Intr // x86_intrcc CallingConvX86RegCall // x86_regcallcc CallingConvX86StdCall // x86_stdcallcc CallingConvX86ThisCall // x86_thiscallcc CallingConvX86VectorCall // x86_vectorcallcc // Calling conventions defined through cc NNN. CallingConvHiPE // cc 11 CallingConvAVRBuiltin // cc 86 CallingConvAMDGPUVS // cc 87 CallingConvAMDGPUGS // cc 88 CallingConvAMDGPUPS // cc 89 CallingConvAMDGPUCS // cc 90 CallingConvAMDGPUKernel // cc 91 CallingConvAMDGPUHS // cc 93 CallingConvMSP430Builtin // cc 94 CallingConvAMDGPULS // cc 95 CallingConvAMDGPUES // cc 96 )
Calling conventions.
func (CallingConv) String ¶
func (i CallingConv) String() string
type Case ¶
type Case struct { X Constant Target *BasicBlock }
Case is a case of a switch terminator.
type Comdat ¶
type Comdat struct {
Name string // ComdatName; empty if not present
}
Comdat specifies a comdat attribute.
func (*Comdat) IsGlobalAttribute ¶
func (*Comdat) IsGlobalAttribute()
type ComdatDef ¶
type ComdatDef struct { Name string // ComdatName Kind SelectionKind }
ComdatDef is a comdat definition top-level entity.
func (*ComdatDef) Def ¶
Def returns the LLVM syntax representation of the attribute group definition.
func (*ComdatDef) IsTopLevelEntity ¶
func (*ComdatDef) IsTopLevelEntity()
func (*ast.TypeDef) IsTopLevelEntity() {}
type Constant ¶
type Constant interface { value.Value // IsConstant ensures that only constants can be assigned to the // constant.Constant interface. IsConstant() }
A Constant is an LLVM IR constant.
type DLLStorageClass ¶
type DLLStorageClass uint8
DLLStorageClass specifies the DLL storage class of a global identifier.
const ( DLLStorageClassNone DLLStorageClass = iota // none DLLStorageClassDLLExport // dllexport DLLStorageClassDLLImport // dllimport )
DLL storage classes.
func (DLLStorageClass) String ¶
func (i DLLStorageClass) String() string
type DataLayout ¶
type DataLayout struct {
DataLayout string
}
DataLayout is a data layout top-level entity.
func (*DataLayout) Def ¶
func (t *DataLayout) Def() string
Def returns the LLVM syntax representation of the data layout top-level entity definition.
func (*DataLayout) IsTopLevelEntity ¶
func (*DataLayout) IsTopLevelEntity()
type Dereferenceable ¶
Dereferenceable specifies a dereferenceable attribute.
func (*Dereferenceable) String ¶
func (d *Dereferenceable) String() string
String returns the string representation of the dereferenceable attribute.
type ExceptionScope ¶
type ExceptionScope interface { fmt.Stringer // IsExceptionScope ensures that only exception scopes can be assigned to the // ast.ExceptionScope interface. IsExceptionScope() }
ExceptionScope is an exception scope.
type FPred ¶
type FPred uint8
FPred is a floating-point comparison predicate.
const ( FPredFalse FPred = iota // false FPredOEQ // oeq FPredOGE // oge FPredOGT // ogt FPredOLE // ole FPredOLT // olt FPredONE // one FPredORD // ord FPredTrue // true FPredUEQ // ueq FPredUGE // uge FPredUGT // ugt FPredULE // ule FPredULT // ult FPredUNE // une FPredUNO // uno )
Floating-point predicates.
type FastMathFlag ¶
type FastMathFlag uint8
FastMathFlag is a fast-math flag.
const ( FastMathFlagAFn FastMathFlag = iota // afn FastMathFlagARcp // arcp FastMathFlagContract // contract FastMathFlagFast // fast FastMathFlagNInf // ninf FastMathFlagNNaN // nnan FastMathFlagNSZ // nsz FastMathFlagReassoc // reassoc )
Fast-math flags.
func (FastMathFlag) String ¶
func (i FastMathFlag) String() string
type FuncAttr ¶
type FuncAttr uint8
FuncAttr is a function attribute.
const ( FuncAttrAlwaysInline FuncAttr = iota // alwaysinline FuncAttrArgMemOnly // argmemonly FuncAttrBuiltin // builtin FuncAttrCold // cold FuncAttrConvergent // convergent FuncAttrInaccessibleMemOrArgMemOnly // inaccessiblemem_or_argmemonly FuncAttrInaccessibleMemOnly // inaccessiblememonly FuncAttrInlineHint // inlinehint FuncAttrJumpTable // jumptable FuncAttrMinSize // minsize FuncAttrNaked // naked FuncAttrNoBuiltin // nobuiltin FuncAttrNoDuplicate // noduplicate FuncAttrNoImplicitFloat // noimplicitfloat FuncAttrNoInline // noinline FuncAttrNonLazyBind // nonlazybind FuncAttrNoRecurse // norecurse FuncAttrNoRedZone // noredzone FuncAttrNoReturn // noreturn FuncAttrNoUnwind // nounwind FuncAttrOptNone // optnone FuncAttrOptSize // optsize FuncAttrReadNone // readnone FuncAttrReadOnly // readonly FuncAttrReturnsTwice // returns_twice FuncAttrSafeStack // safestack FuncAttrSanitizeAddress // sanitize_address FuncAttrSanitizeHWAddress // sanitize_hwaddress FuncAttrSanitizeMemory // sanitize_memory FuncAttrSanitizeThread // sanitize_thread FuncAttrSpeculatable // speculatable FuncAttrSSP // ssp FuncAttrSSPReq // sspreq FuncAttrSSPStrong // sspstrong FuncAttrStrictFP // strictfp FuncAttrUwtable // uwtable FuncAttrWriteOnly // writeonly )
Function attributes.
func (FuncAttr) IsFuncAttribute ¶
func (FuncAttr) IsFuncAttribute()
type FuncAttribute ¶
type FuncAttribute interface { fmt.Stringer // IsFuncAttribute ensures that only function attributes can be assigned to // the ast.FuncAttribute interface. IsFuncAttribute() }
FuncAttribute is a function attribute.
type Function ¶
type Function struct { Linkage Linkage Preemption Preemption // zero value if not present Visibility Visibility // zero value if not present DLLStorageClass DLLStorageClass // zero value if not present CallingConv CallingConv // zero value if not present ReturnAttrs []ReturnAttribute RetType types.Type Name string // *GlobalIdent Params []*Param Variadic bool UnnamedAddr UnnamedAddr FuncAttrs []FuncAttribute Section *Section // nil if not present Comdat *Comdat // nil if not present GC string // empty if not present Prefix Constant // *TypeConst; nil if not present Prologue Constant // *TypeConst; nil if not present Personality Constant // *TypeConst; nil if not present Blocks []*BasicBlock // nil if declaration UseListOrders []*UseListOrder // Function signature. Sig *types.FuncType Typ *types.PointerType // pointer to Sig. Metadata []*metadata.MetadataAttachment }
A Function is an LLVM IR function.
func (*Function) AssignLocalIDs ¶
func (f *Function) AssignLocalIDs()
AssignLocalIDs assigns IDs to unnamed local variables.
func (*Function) Def ¶
Def returns the LLVM syntax representation of the global variable definition.
func (*Function) IsConstant ¶
func (*Function) IsConstant()
func (*Function) IsTopLevelEntity ¶
func (*Function) IsTopLevelEntity()
type Global ¶
type Global struct { // Global variable name (*GlobalIdent). Name string Linkage Linkage // zero value if not present Preemption Preemption // zero value if not present Visibility Visibility // zero value if not present DLLStorageClass DLLStorageClass // zero value if not present ThreadLocal *ThreadLocal // nil if not present UnnamedAddr UnnamedAddr // zero value if not present AddrSpace types.AddrSpace // zero value if not present ExternallyInitialized bool Immutable bool Typ *types.PointerType // pointer to ContentType. ContentType types.Type Init Constant // nil if declaration Section *Section // nil if not present Comdat *Comdat // nil if not present Align *Alignment // nil if not present Metadata []*metadata.MetadataAttachment FuncAttrs []FuncAttribute }
Global is a global variable declaration or a global variable definition.
func (*Global) IsConstant ¶
func (*Global) IsConstant()
IsConstant ensures that only constants can be assigned to the ir.Constant interface.
func (*Global) IsTopLevelEntity ¶
func (*Global) IsTopLevelEntity()
type IPred ¶
type IPred uint8
IPred is an integer comparison predicate.
type Incoming ¶
type Incoming struct { // Incoming value. X value.Value // Predecessor basic block. Pred *BasicBlock }
Incoming is an incoming value of a phi instruction.
type IndirectSymbol ¶
type IndirectSymbol struct { // Alias or IFunc name (*GlobalIdent). Name string Linkage Linkage Preemption Preemption Visibility Visibility DLLStorageClass DLLStorageClass ThreadLocal *ThreadLocal UnnamedAddr UnnamedAddr Alias bool // alias if true, ifunc otherwise. Typ types.Type Const Constant // aliasee or resolver }
An IndirectSymbol is an alias or an ifunc.
func (*IndirectSymbol) Def ¶
func (s *IndirectSymbol) Def() string
Def returns the LLVM syntax representation of the indirect symbol definition.
func (*IndirectSymbol) Ident ¶
func (s *IndirectSymbol) Ident() string
Ident returns the identifier associated with the indirect symbol.
func (*IndirectSymbol) IsConstant ¶
func (*IndirectSymbol) IsConstant()
func (*IndirectSymbol) IsTopLevelEntity ¶
func (*IndirectSymbol) IsTopLevelEntity()
func (*IndirectSymbol) String ¶
func (s *IndirectSymbol) String() string
String returns the string representation of the indirect symbol as a type- value pair.
func (*IndirectSymbol) Type ¶
func (s *IndirectSymbol) Type() types.Type
Type returns the type of the indirect symbol variable.
type InlineAsm ¶
type InlineAsm struct { SideEffect bool AlignStack bool IntelDialect bool Asm string Constraint string }
InlineAsm is an inline assembly expression.
func (*InlineAsm) Ident ¶
Ident returns the identifier associated with the inline assembly expression.
type InstAShr ¶
type InstAShr struct { Exact bool X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstAShr is an LLVM IR ashr instruction.
func (*InstAShr) IsValueInstruction ¶
func (*InstAShr) IsValueInstruction()
type InstAdd ¶
type InstAdd struct { OverflowFlags []OverflowFlag X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstAdd is an LLVM IR add instruction.
func (*InstAdd) IsValueInstruction ¶
func (*InstAdd) IsValueInstruction()
IsValueInstruction ensures that only value instructions can be assigned to the ir.ValueInstruction interface.
type InstAddrSpaceCast ¶
type InstAddrSpaceCast struct { From value.Value To types.Type Metadata []*metadata.MetadataAttachment }
InstAddrSpaceCast is an LLVM IR addrspacecast instruction.
func (*InstAddrSpaceCast) Def ¶
func (inst *InstAddrSpaceCast) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstAddrSpaceCast) IsValueInstruction ¶
func (*InstAddrSpaceCast) IsValueInstruction()
func (*InstAddrSpaceCast) Type ¶
func (inst *InstAddrSpaceCast) Type() types.Type
Type returns the type of the addrspacecast instruction.
type InstAlloca ¶
type InstAlloca struct { InAlloca bool SwiftError bool Typ *types.PointerType ElemType types.Type NElems value.Value // nil if not present Alignment *Alignment // nil if not present AddrSpace types.AddrSpace // zero if not present Metadata []*metadata.MetadataAttachment }
InstAlloca is an LLVM IR alloca instruction.
func (*InstAlloca) Def ¶
func (inst *InstAlloca) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstAlloca) IsValueInstruction ¶
func (*InstAlloca) IsValueInstruction()
func (*InstAlloca) Type ¶
func (inst *InstAlloca) Type() types.Type
Type returns the type of the alloca instruction.
type InstAnd ¶
type InstAnd struct {
X, Y value.Value
Metadata []*metadata.MetadataAttachment
}
InstAnd is an LLVM IR and instruction.
func (*InstAnd) IsValueInstruction ¶
func (*InstAnd) IsValueInstruction()
type InstAtomicRMW ¶
type InstAtomicRMW struct { Volatile bool Op BinOp Ptr value.Value X value.Value SyncScope *SyncScope // nil if not present AtomicOrdering AtomicOrdering Metadata []*metadata.MetadataAttachment }
InstAtomicRMW is an LLVM IR atomicrmw instruction.
func (*InstAtomicRMW) Def ¶
func (inst *InstAtomicRMW) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstAtomicRMW) IsInstruction ¶
func (*InstAtomicRMW) IsInstruction()
type InstBitCast ¶
InstBitCast is an LLVM IR bitcast instruction.
func (*InstBitCast) Def ¶
func (inst *InstBitCast) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstBitCast) IsValueInstruction ¶
func (*InstBitCast) IsValueInstruction()
func (*InstBitCast) Type ¶
func (inst *InstBitCast) Type() types.Type
Type returns the type of the bitcast instruction.
type InstCall ¶
type InstCall struct { Tail Tail FastMathFlags []FastMathFlag CallingConv CallingConv ReturnAttrs []ReturnAttribute RetType types.Type Callee value.Value Args []Argument FuncAttrs []FuncAttribute OperandBundles []*OperandBundle Metadata []*metadata.MetadataAttachment }
InstCall is an LLVM IR call instruction.
func (*InstCall) IsValueInstruction ¶
func (*InstCall) IsValueInstruction()
type InstCatchPad ¶
type InstCatchPad struct { // Exception scope. Scope value.Value // Exception arguments. Args []Argument // Metadata attachments. Metadata []*metadata.MetadataAttachment }
InstCatchPad is an LLVM IR catchpad instruction.
func (*InstCatchPad) Def ¶
func (inst *InstCatchPad) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstCatchPad) IsValueInstruction ¶
func (*InstCatchPad) IsValueInstruction()
func (*InstCatchPad) Type ¶
func (inst *InstCatchPad) Type() types.Type
Type returns the type of the catchpad instruction.
type InstCleanupPad ¶
type InstCleanupPad struct { Scope ExceptionScope Args []Argument Metadata []*metadata.MetadataAttachment }
InstCleanupPad is an LLVM IR cleanuppad instruction.
func (*InstCleanupPad) Def ¶
func (inst *InstCleanupPad) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstCleanupPad) IsValueInstruction ¶
func (*InstCleanupPad) IsValueInstruction()
func (*InstCleanupPad) Type ¶
func (inst *InstCleanupPad) Type() types.Type
Type returns the type of the cleanuppad instruction.
type InstCmpXchg ¶
type InstCmpXchg struct { Weak bool Volatile bool Ptr value.Value Cmp value.Value New value.Value SyncScope *SyncScope // nil if not present Success AtomicOrdering Failure AtomicOrdering Metadata []*metadata.MetadataAttachment }
InstCmpXchg is an LLVM IR cmpxchg instruction.
func (*InstCmpXchg) Def ¶
func (inst *InstCmpXchg) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstCmpXchg) IsInstruction ¶
func (*InstCmpXchg) IsInstruction()
type InstExtractElement ¶
type InstExtractElement struct { X value.Value Index value.Value Metadata []*metadata.MetadataAttachment }
InstExtractElement is an LLVM IR extractelement instruction.
func (*InstExtractElement) Def ¶
func (inst *InstExtractElement) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstExtractElement) IsValueInstruction ¶
func (*InstExtractElement) IsValueInstruction()
func (*InstExtractElement) Type ¶
func (inst *InstExtractElement) Type() types.Type
Type returns the type of the extractelement instruction.
type InstExtractValue ¶
type InstExtractValue struct { Typ types.Type X value.Value Indices []int64 Metadata []*metadata.MetadataAttachment }
InstExtractValue is an LLVM IR extractvalue instruction.
func (*InstExtractValue) Def ¶
func (inst *InstExtractValue) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstExtractValue) IsValueInstruction ¶
func (*InstExtractValue) IsValueInstruction()
func (*InstExtractValue) Type ¶
func (inst *InstExtractValue) Type() types.Type
Type returns the type of the extractvalue instruction.
type InstFAdd ¶
type InstFAdd struct { FastMathFlags []FastMathFlag X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstFAdd is an LLVM IR fadd instruction.
func (*InstFAdd) IsValueInstruction ¶
func (*InstFAdd) IsValueInstruction()
type InstFCmp ¶
type InstFCmp struct { FastMathFlags []FastMathFlag Pred FPred Typ types.Type X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstFCmp is an LLVM IR fcmp instruction.
func (*InstFCmp) IsValueInstruction ¶
func (*InstFCmp) IsValueInstruction()
type InstFDiv ¶
type InstFDiv struct { FastMathFlags []FastMathFlag X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstFDiv is an LLVM IR fdiv instruction.
func (*InstFDiv) IsValueInstruction ¶
func (*InstFDiv) IsValueInstruction()
type InstFMul ¶
type InstFMul struct { FastMathFlags []FastMathFlag X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstFMul is an LLVM IR fmul instruction.
func (*InstFMul) IsValueInstruction ¶
func (*InstFMul) IsValueInstruction()
type InstFPExt ¶
InstFPExt is an LLVM IR fpext instruction.
func (*InstFPExt) IsValueInstruction ¶
func (*InstFPExt) IsValueInstruction()
type InstFPToSI ¶
InstFPToSI is an LLVM IR fptosi instruction.
func (*InstFPToSI) Def ¶
func (inst *InstFPToSI) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstFPToSI) IsValueInstruction ¶
func (*InstFPToSI) IsValueInstruction()
func (*InstFPToSI) Type ¶
func (inst *InstFPToSI) Type() types.Type
Type returns the type of the fptosi instruction.
type InstFPToUI ¶
InstFPToUI is an LLVM IR fptoui instruction.
func (*InstFPToUI) Def ¶
func (inst *InstFPToUI) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstFPToUI) IsValueInstruction ¶
func (*InstFPToUI) IsValueInstruction()
func (*InstFPToUI) Type ¶
func (inst *InstFPToUI) Type() types.Type
Type returns the type of the fptoui instruction.
type InstFPTrunc ¶
InstFPTrunc is an LLVM IR fptrunc instruction.
func (*InstFPTrunc) Def ¶
func (inst *InstFPTrunc) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstFPTrunc) IsValueInstruction ¶
func (*InstFPTrunc) IsValueInstruction()
func (*InstFPTrunc) Type ¶
func (inst *InstFPTrunc) Type() types.Type
Type returns the type of the fptrunc instruction.
type InstFRem ¶
type InstFRem struct { FastMathFlags []FastMathFlag X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstFRem is an LLVM IR frem instruction.
func (*InstFRem) IsValueInstruction ¶
func (*InstFRem) IsValueInstruction()
type InstFSub ¶
type InstFSub struct { FastMathFlags []FastMathFlag X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstFSub is an LLVM IR fsub instruction.
func (*InstFSub) IsValueInstruction ¶
func (*InstFSub) IsValueInstruction()
type InstFence ¶
type InstFence struct { SyncScope *SyncScope // nil if not present AtomicOrdering AtomicOrdering Metadata []*metadata.MetadataAttachment }
InstFence is an LLVM IR fence instruction.
func (*InstFence) IsInstruction ¶
func (*InstFence) IsInstruction()
type InstGetElementPtr ¶
type InstGetElementPtr struct { InBounds bool Typ *types.PointerType ElemType types.Type Src value.Value Indices []value.Value Metadata []*metadata.MetadataAttachment }
InstGetElementPtr is an LLVM IR getelementptr instruction.
func (*InstGetElementPtr) Def ¶
func (inst *InstGetElementPtr) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstGetElementPtr) IsValueInstruction ¶
func (*InstGetElementPtr) IsValueInstruction()
func (*InstGetElementPtr) Type ¶
func (inst *InstGetElementPtr) Type() types.Type
Type returns the type of the getelementptr instruction.
type InstICmp ¶
type InstICmp struct { Pred IPred Typ types.Type X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstICmp is an LLVM IR icmp instruction.
func (*InstICmp) IsValueInstruction ¶
func (*InstICmp) IsValueInstruction()
type InstInsertElement ¶
type InstInsertElement struct { X value.Value Elem value.Value Index value.Value Metadata []*metadata.MetadataAttachment }
InstInsertElement is an LLVM IR insertelement instruction.
func (*InstInsertElement) Def ¶
func (inst *InstInsertElement) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstInsertElement) IsValueInstruction ¶
func (*InstInsertElement) IsValueInstruction()
func (*InstInsertElement) Type ¶
func (inst *InstInsertElement) Type() types.Type
Type returns the type of the insertelement instruction.
type InstInsertValue ¶
type InstInsertValue struct { X value.Value Elem value.Value Indices []int64 Metadata []*metadata.MetadataAttachment }
InstInsertValue is an LLVM IR insertvalue instruction.
func (*InstInsertValue) Def ¶
func (inst *InstInsertValue) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstInsertValue) IsValueInstruction ¶
func (*InstInsertValue) IsValueInstruction()
func (*InstInsertValue) Type ¶
func (inst *InstInsertValue) Type() types.Type
Type returns the type of the insertvalue instruction.
type InstIntToPtr ¶
InstIntToPtr is an LLVM IR inttoptr instruction.
func (*InstIntToPtr) Def ¶
func (inst *InstIntToPtr) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstIntToPtr) IsValueInstruction ¶
func (*InstIntToPtr) IsValueInstruction()
func (*InstIntToPtr) Type ¶
func (inst *InstIntToPtr) Type() types.Type
Type returns the type of the inttoptr instruction.
type InstLShr ¶
type InstLShr struct { Exact bool X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstLShr is an LLVM IR lshr instruction.
func (*InstLShr) IsValueInstruction ¶
func (*InstLShr) IsValueInstruction()
type InstLandingPad ¶
type InstLandingPad struct { Typ types.Type Cleanup bool Clauses []*Clause Metadata []*metadata.MetadataAttachment }
InstLandingPad is an LLVM IR landingpad instruction.
func (*InstLandingPad) Def ¶
func (inst *InstLandingPad) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstLandingPad) IsValueInstruction ¶
func (*InstLandingPad) IsValueInstruction()
func (*InstLandingPad) Type ¶
func (inst *InstLandingPad) Type() types.Type
Type returns the type of the landingpad instruction.
type InstLoad ¶
type InstLoad struct { Atomic bool Volatile bool ElemType types.Type // TODO: Remove ElemType as alreaedy part of Src? Src value.Value SyncScope *SyncScope // nil if not present AtomicOrdering AtomicOrdering // zero value if not present Alignment *Alignment // nil if not present Metadata []*metadata.MetadataAttachment }
InstLoad is an LLVM IR load instruction.
func (*InstLoad) IsValueInstruction ¶
func (*InstLoad) IsValueInstruction()
type InstMul ¶
type InstMul struct { OverflowFlags []OverflowFlag X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstMul is an LLVM IR mul instruction.
func (*InstMul) IsValueInstruction ¶
func (*InstMul) IsValueInstruction()
type InstOr ¶
type InstOr struct {
X, Y value.Value
Metadata []*metadata.MetadataAttachment
}
InstOr is an LLVM IR or instruction.
func (*InstOr) IsValueInstruction ¶
func (*InstOr) IsValueInstruction()
type InstPhi ¶
type InstPhi struct { Typ types.Type Incs []*Incoming Metadata []*metadata.MetadataAttachment }
InstPhi is an LLVM IR phi instruction.
func (*InstPhi) IsValueInstruction ¶
func (*InstPhi) IsValueInstruction()
type InstPtrToInt ¶
InstPtrToInt is an LLVM IR ptrtoint instruction.
func (*InstPtrToInt) Def ¶
func (inst *InstPtrToInt) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstPtrToInt) IsValueInstruction ¶
func (*InstPtrToInt) IsValueInstruction()
func (*InstPtrToInt) Type ¶
func (inst *InstPtrToInt) Type() types.Type
Type returns the type of the ptrtoint instruction.
type InstSDiv ¶
type InstSDiv struct { Exact bool X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstSDiv is an LLVM IR sdiv instruction.
func (*InstSDiv) IsValueInstruction ¶
func (*InstSDiv) IsValueInstruction()
type InstSExt ¶
InstSExt is an LLVM IR sext instruction.
func (*InstSExt) IsValueInstruction ¶
func (*InstSExt) IsValueInstruction()
type InstSIToFP ¶
InstSIToFP is an LLVM IR sitofp instruction.
func (*InstSIToFP) Def ¶
func (inst *InstSIToFP) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstSIToFP) IsValueInstruction ¶
func (*InstSIToFP) IsValueInstruction()
func (*InstSIToFP) Type ¶
func (inst *InstSIToFP) Type() types.Type
Type returns the type of the sitofp instruction.
type InstSRem ¶
type InstSRem struct {
X, Y value.Value
Metadata []*metadata.MetadataAttachment
}
InstSRem is an LLVM IR srem instruction.
func (*InstSRem) IsValueInstruction ¶
func (*InstSRem) IsValueInstruction()
type InstSelect ¶
type InstSelect struct { Cond value.Value X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstSelect is an LLVM IR select instruction.
func (*InstSelect) Def ¶
func (inst *InstSelect) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstSelect) IsValueInstruction ¶
func (*InstSelect) IsValueInstruction()
func (*InstSelect) Type ¶
func (inst *InstSelect) Type() types.Type
Type returns the type of the select instruction.
type InstShl ¶
type InstShl struct { OverflowFlags []OverflowFlag X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstShl is an LLVM IR shl instruction.
func (*InstShl) IsValueInstruction ¶
func (*InstShl) IsValueInstruction()
type InstShuffleVector ¶
type InstShuffleVector struct {
X, Y value.Value
Mask value.Value
Metadata []*metadata.MetadataAttachment
}
InstShuffleVector is an LLVM IR shufflevector instruction.
func (*InstShuffleVector) Def ¶
func (inst *InstShuffleVector) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstShuffleVector) IsValueInstruction ¶
func (*InstShuffleVector) IsValueInstruction()
func (*InstShuffleVector) Type ¶
func (inst *InstShuffleVector) Type() types.Type
Type returns the type of the shufflevector instruction.
type InstStore ¶
type InstStore struct { Atomic bool Volatile bool Src value.Value Dst value.Value SyncScope *SyncScope // nil if not present AtomicOrdering AtomicOrdering // zero value if not present Alignment *Alignment // nil if not present Metadata []*metadata.MetadataAttachment }
InstStore is an LLVM IR store instruction.
func (*InstStore) IsInstruction ¶
func (*InstStore) IsInstruction()
IsInstruction ensures that only instructions can be assigned to the ast.Instruction interface.
type InstSub ¶
type InstSub struct { OverflowFlags []OverflowFlag X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstSub is an LLVM IR sub instruction.
func (*InstSub) IsValueInstruction ¶
func (*InstSub) IsValueInstruction()
type InstTrunc ¶
InstTrunc is an LLVM IR trunc instruction.
func (*InstTrunc) IsValueInstruction ¶
func (*InstTrunc) IsValueInstruction()
type InstUDiv ¶
type InstUDiv struct { Exact bool X, Y value.Value Metadata []*metadata.MetadataAttachment }
InstUDiv is an LLVM IR udiv instruction.
func (*InstUDiv) IsValueInstruction ¶
func (*InstUDiv) IsValueInstruction()
type InstUIToFP ¶
InstUIToFP is an LLVM IR uitofp instruction.
func (*InstUIToFP) Def ¶
func (inst *InstUIToFP) Def() string
Def returns the LLVM syntax representation of the instruction.
func (*InstUIToFP) IsValueInstruction ¶
func (*InstUIToFP) IsValueInstruction()
func (*InstUIToFP) Type ¶
func (inst *InstUIToFP) Type() types.Type
Type returns the type of the uitofp instruction.
type InstURem ¶
type InstURem struct {
X, Y value.Value
Metadata []*metadata.MetadataAttachment
}
InstURem is an LLVM IR urem instruction.
func (*InstURem) IsValueInstruction ¶
func (*InstURem) IsValueInstruction()
type InstVAArg ¶
type InstVAArg struct { ArgList value.Value ArgType types.Type Metadata []*metadata.MetadataAttachment }
InstVAArg is an LLVM IR vaarg instruction.
func (*InstVAArg) IsValueInstruction ¶
func (*InstVAArg) IsValueInstruction()
type InstXor ¶
type InstXor struct {
X, Y value.Value
Metadata []*metadata.MetadataAttachment
}
InstXor is an LLVM IR xor instruction.
func (*InstXor) IsValueInstruction ¶
func (*InstXor) IsValueInstruction()
type InstZExt ¶
InstZExt is an LLVM IR zext instruction.
func (*InstZExt) IsValueInstruction ¶
func (*InstZExt) IsValueInstruction()
type Instruction ¶
type Instruction interface { // Def returns the LLVM syntax representation of the instruction. Def() string // IsInstruction ensures that only instructions can be assigned to the // ast.Instruction interface. IsInstruction() }
An Instruction is an LLVM IR instruction.
type Linkage ¶
type Linkage uint8
Linkage specifies the linkage of a global identifier.
const ( LinkageNone Linkage = iota // none LinkageAppending // appending LinkageAvailableExternally // available_externally LinkageCommon // common LinkageInternal // internal LinkageLinkOnce // linkonce LinkageLinkOnceODR // linkonce_odr LinkagePrivate // private LinkageWeak // weak LinkageWeakODR // weak_odr // External linkage. LinkageExternal // external LinkageExternWeak // extern_weak )
Linkage kinds.
type LocalDef ¶
type LocalDef struct { // Result name (LocalIdent); or empty if unnamed. Name string Inst ValueInstruction }
A LocalDef is a local definition which assigns the result of an LLVM IR instruction to a name.
func (*LocalDef) IsInstruction ¶
func (*LocalDef) IsInstruction()
type Module ¶
type Module struct { // Source filename; or nil if not present. SourceFilename *SourceFilename // Data layout; or nil if not present. DataLayout *DataLayout // Target triple; or nil if not present. TargetTriple *TargetTriple // Module-level inline assembly. ModuleAsms []*ModuleAsm // Type definitions. TypeDefs []types.Type // Comdat definitions. ComdatDefs []*ComdatDef // Global declarations and definitions. Globals []*Global // Indirect symbol definitions (aliases and IFuncs). IndirectSymbols []*IndirectSymbol // Function declarations and definitions. Funcs []*Function // Attribute group definitions. AttrGroupDefs []*AttrGroupDef // Named metadata definitions. NamedMetadataDefs []*metadata.NamedMetadataDef // Metadata definitions. MetadataDefs []*metadata.MetadataDef // Use-list order directives. UseListOrders []*UseListOrder // Basic block specific use-list order directives. UseListOrderBBs []*UseListOrderBB }
A Module is an LLVM IR module.
type ModuleAsm ¶
type ModuleAsm struct {
Asm string
}
ModuleAsm is a module-level inline assembly top-level entity.
func (*ModuleAsm) Def ¶
Def returns the LLVM syntax representation of the module-level inline assembly definition.
func (*ModuleAsm) IsTopLevelEntity ¶
func (*ModuleAsm) IsTopLevelEntity()
type OperandBundle ¶
OperandBundle is a tagged set of SSA values.
func (*OperandBundle) String ¶
func (o *OperandBundle) String() string
String returns a string representation of the operand bundle.
type OverflowFlag ¶
type OverflowFlag uint8
OverflowFlag is an integer overflow flag.
const ( OverflowFlagNSW OverflowFlag = iota // nsw OverflowFlagNUW // nuw )
Overflow flags.
func (OverflowFlag) String ¶
func (i OverflowFlag) String() string
type Param ¶
type Param struct { // Parameter type. Typ types.Type // Parameter attributes. Attrs []ParamAttribute // Parameter name (LocalIdent); or empty if unnamed. Name string }
A Param is an LLVM IR function parameter.
type ParamAttr ¶
type ParamAttr uint8
ParamAttr is a parameter attribute.
const ( ParamAttrByval ParamAttr = iota // byval ParamAttrInAlloca // inalloca ParamAttrInReg // inreg ParamAttrNest // nest ParamAttrNoAlias // noalias ParamAttrNoCapture // nocapture ParamAttrNonNull // nonnull ParamAttrReadNone // readnone ParamAttrReadOnly // readonly ParamAttrReturned // returned ParamAttrSignExt // signext ParamAttrSRet // sret ParamAttrSwiftError // swifterror ParamAttrSwiftSelf // swiftself ParamAttrWriteOnly // writeonly ParamAttrZeroExt // zeroext )
Parameter attributes.
type ParamAttribute ¶
ParamAttribute is a parameter attribute.
type Preemption ¶
type Preemption uint8
Preemption specifies the preemtion of a global identifier.
const ( PreemptionNone Preemption = iota // none PreemptionDSOLocal // dso_local PreemptionDSOPreemptable // dso_preemptable )
Preemption kinds.
func (Preemption) String ¶
func (i Preemption) String() string
type ReturnAttr ¶
type ReturnAttr uint8
ReturnAttr is a return argument attribute.
const ( ReturnAttrInReg ReturnAttr = iota // inreg ReturnAttrNoAlias // noalias ReturnAttrNonNull // nonnull ReturnAttrSignExt // signext ReturnAttrZeroExt // zeroext )
Return argument attributes.
func (ReturnAttr) String ¶
func (i ReturnAttr) String() string
type ReturnAttribute ¶
ReturnAttribute is a return argument attribute.
type Section ¶
type Section struct {
Name string
}
Section specifies a section attribute.
func (*Section) IsGlobalAttribute ¶
func (*Section) IsGlobalAttribute()
IsGlobalAttribute ensures that only global attributes can be assigned to the astx.GlobalAttribute interface.
type SelectionKind ¶
type SelectionKind uint8
SelectionKind is a comdat selection kind.
const ( SelectionKindAny SelectionKind = iota // any SelectionKindExactMatch // exactmatch SelectionKindLargest // largest SelectionKindNoDuplicates // noduplicates SelectionKindSameSize // samesize )
Comdat selection kinds.
func (SelectionKind) String ¶
func (i SelectionKind) String() string
type SourceFilename ¶
type SourceFilename struct {
Name string
}
SourceFilename is a source filename top-level entity.
func (*SourceFilename) Def ¶
func (s *SourceFilename) Def() string
Def returns the LLVM syntax representation of the source filename top-level entity definition.
func (*SourceFilename) IsTopLevelEntity ¶
func (*SourceFilename) IsTopLevelEntity()
IsTopLevelEntity ensures that only top-level entities can be assigned to the ast.TopLevelEntity interface.
type StackAlignment ¶
type StackAlignment struct {
Align int64
}
StackAlignment specifies an stack alignment attribute.
func (*StackAlignment) IsFuncAttribute ¶
func (*StackAlignment) IsFuncAttribute()
func (*StackAlignment) String ¶
func (a *StackAlignment) String() string
String returns the string representation of the stack alignment attribute.
type SyncScope ¶
type SyncScope struct {
Scope string
}
SyncScope is a synchronization scope attribute.
type TLSModel ¶
type TLSModel uint8
TLSModel is a thread local storage model.
type Tail ¶
type Tail uint8
Tail is a tail call attribute.
type TargetTriple ¶
type TargetTriple struct {
TargetTriple string
}
TargetTriple is a target triple top-level entity.
func (*TargetTriple) Def ¶
func (t *TargetTriple) Def() string
Def returns the LLVM syntax representation of the target triple top-level entity definition.
func (*TargetTriple) IsTopLevelEntity ¶
func (*TargetTriple) IsTopLevelEntity()
type TermBr ¶
type TermBr struct { Target *BasicBlock Metadata []*metadata.MetadataAttachment }
TermBr is an unconditional LLVM IR br terminator.
func (*TermBr) IsTerminator ¶
func (*TermBr) IsTerminator()
type TermCatchRet ¶
type TermCatchRet struct { From value.Value // catchpad To *BasicBlock Metadata []*metadata.MetadataAttachment }
TermCatchRet is an LLVM IR catchret terminator.
func (*TermCatchRet) Def ¶
func (term *TermCatchRet) Def() string
Def returns the LLVM syntax representation of the terminator.
func (*TermCatchRet) IsTerminator ¶
func (*TermCatchRet) IsTerminator()
type TermCatchSwitch ¶
type TermCatchSwitch struct { Scope ExceptionScope Handlers []*BasicBlock UnwindTarget UnwindTarget Metadata []*metadata.MetadataAttachment }
TermCatchSwitch is an LLVM IR catchswitch terminator.
func (*TermCatchSwitch) Def ¶
func (term *TermCatchSwitch) Def() string
Def returns the LLVM syntax representation of the terminator.
func (*TermCatchSwitch) IsTerminator ¶
func (*TermCatchSwitch) IsTerminator()
type TermCleanupRet ¶
type TermCleanupRet struct { From value.Value // cleanuppad UnwindTarget UnwindTarget Metadata []*metadata.MetadataAttachment }
TermCleanupRet is an LLVM IR cleanupret terminator.
func (*TermCleanupRet) Def ¶
func (term *TermCleanupRet) Def() string
Def returns the LLVM syntax representation of the terminator.
func (*TermCleanupRet) IsTerminator ¶
func (*TermCleanupRet) IsTerminator()
type TermCondBr ¶
type TermCondBr struct { Cond value.Value TargetTrue *BasicBlock TargetFalse *BasicBlock Metadata []*metadata.MetadataAttachment }
TermCondBr is a conditional LLVM IR br terminator.
func (*TermCondBr) Def ¶
func (term *TermCondBr) Def() string
Def returns the LLVM syntax representation of the terminator.
func (*TermCondBr) IsTerminator ¶
func (*TermCondBr) IsTerminator()
type TermIndirectBr ¶
type TermIndirectBr struct { Addr value.Value Targets []*BasicBlock Metadata []*metadata.MetadataAttachment }
TermIndirectBr is an LLVM IR indirectbr terminator.
func (*TermIndirectBr) Def ¶
func (term *TermIndirectBr) Def() string
Def returns the LLVM syntax representation of the terminator.
func (*TermIndirectBr) IsTerminator ¶
func (*TermIndirectBr) IsTerminator()
type TermInvoke ¶
type TermInvoke struct { CallingConv CallingConv ReturnAttrs []ReturnAttribute RetType types.Type Callee value.Value Args []Argument FuncAttrs []FuncAttribute OperandBundles []*OperandBundle Normal *BasicBlock Exception *BasicBlock Metadata []*metadata.MetadataAttachment }
TermInvoke is an LLVM IR invoke terminator.
func (*TermInvoke) Def ¶
func (term *TermInvoke) Def() string
Def returns the LLVM syntax representation of the terminator.
func (*TermInvoke) IsTerminator ¶
func (*TermInvoke) IsTerminator()
type TermResume ¶
type TermResume struct { X value.Value Metadata []*metadata.MetadataAttachment }
TermResume is an LLVM IR resume terminator.
func (*TermResume) Def ¶
func (term *TermResume) Def() string
Def returns the LLVM syntax representation of the terminator.
func (*TermResume) IsTerminator ¶
func (*TermResume) IsTerminator()
type TermRet ¶
type TermRet struct { X value.Value // nil if void return Metadata []*metadata.MetadataAttachment }
TermRet is an LLVM IR ret terminator.
func (*TermRet) IsTerminator ¶
func (*TermRet) IsTerminator()
IsTerminator ensures that only terminators can be assigned to the ast.Terminator interface.
type TermSwitch ¶
type TermSwitch struct { X value.Value Default *BasicBlock Cases []*Case Metadata []*metadata.MetadataAttachment }
TermSwitch is an LLVM IR switch terminator.
func (*TermSwitch) Def ¶
func (term *TermSwitch) Def() string
Def returns the LLVM syntax representation of the terminator.
func (*TermSwitch) IsTerminator ¶
func (*TermSwitch) IsTerminator()
type TermUnreachable ¶
type TermUnreachable struct {
Metadata []*metadata.MetadataAttachment
}
TermUnreachable is an LLVM IR unreachable terminator.
func (*TermUnreachable) Def ¶
func (term *TermUnreachable) Def() string
Def returns the LLVM syntax representation of the terminator.
func (*TermUnreachable) IsTerminator ¶
func (*TermUnreachable) IsTerminator()
type Terminator ¶
type Terminator interface { // Def returns the LLVM syntax representation of the terminator. Def() string // IsTerminator ensures that only terminators can be assigned to the // ast.Terminator interface. IsTerminator() }
A Terminator is an LLVM IR terminator.
type ThreadLocal ¶
type ThreadLocal struct {
Model TLSModel // zero value if not present
}
ThreadLocal is a thread local storage specifier.
func (ThreadLocal) String ¶
func (t ThreadLocal) String() string
String returns a string representation of the thread local storage.
type UnnamedAddr ¶
type UnnamedAddr uint8
UnnamedAddr specifies whether the address is significant.
const ( UnnamedAddrNone UnnamedAddr = iota // none UnnamedAddrLocalUnnamedAddr // local_unnamed_addr UnnamedAddrUnnamedAddr // unnamed_addr )
Unnamed address specifiers.
func (UnnamedAddr) String ¶
func (i UnnamedAddr) String() string
type UnwindTarget ¶
type UnwindTarget interface { fmt.Stringer // IsUnwindTarget ensures that only unwind targets can be assigned to the // ast.UnwindTarget interface. IsUnwindTarget() }
UnwindTarget is an unwind target of a catchswitch or cleanupret terminator.
type UnwindToCaller ¶
type UnwindToCaller struct{}
UnwindToCaller specifies the caller as an unwind target.
func (*UnwindToCaller) IsUnwindTarget ¶
func (*UnwindToCaller) IsUnwindTarget()
IsUnwindTarget ensures that only unwind targets can be assigned to the ir.UnwindTarget interface.
func (*UnwindToCaller) String ¶
func (*UnwindToCaller) String() string
String returns a string representation of the unwind target.
type UseListOrder ¶
UseListOrder is a use-list order directive.
func (*UseListOrder) Def ¶
func (u *UseListOrder) Def() string
Def returns the LLVM syntax representation of the use-list order directive definition.
func (*UseListOrder) IsTopLevelEntity ¶
func (*UseListOrder) IsTopLevelEntity()
func (*metadata.NamedMetadataDef) IsTopLevelEntity() {} func (*metadata.MetadataDef) IsTopLevelEntity() {}
type UseListOrderBB ¶
type UseListOrderBB struct { Func *Function Block *BasicBlock Indices []int64 }
UseListOrderBB is a basic block specific use-list order directive.
func (*UseListOrderBB) Def ¶
func (u *UseListOrderBB) Def() string
Def returns the LLVM syntax representation of the basic block specific use- list order directive definition.
func (*UseListOrderBB) IsTopLevelEntity ¶
func (*UseListOrderBB) IsTopLevelEntity()
type ValueInstruction ¶
type ValueInstruction interface { // Def returns the LLVM syntax representation of the instruction. Def() string // Type returns the type of the results computed by the instruction. Type() types.Type // IsValueInstruction ensures that only value instructions can be assigned to // the ir.ValueInstruction interface. IsValueInstruction() }
A ValueInstruction is an instruction which produces a value.
type Visibility ¶
type Visibility uint8
Visibility specifies the visibility of a global identifier.
const ( VisibilityNone Visibility = iota // none VisibilityDefault // default VisibilityHidden // hidden VisibilityProtected // protected )
Visibility kinds.
func (Visibility) String ¶
func (i Visibility) String() string
Source Files
¶
- atomicordering_string.go
- basic_block.go
- binop_string.go
- callingconv_string.go
- dllstorageclass_string.go
- fastmathflag_string.go
- fpred_string.go
- funcattr_string.go
- function.go
- global.go
- helper.go
- indirect_symbol.go
- instruction.go
- ipred_string.go
- linkage_string.go
- module.go
- overflowflag_string.go
- paramattr_string.go
- preemption_string.go
- returnattr_string.go
- selectionkind_string.go
- sumtypes.go
- tail_string.go
- terminator.go
- tlsmodel_string.go
- unnamedaddr_string.go
- value.go
- visibility_string.go
Directories
¶
Path | Synopsis |
---|---|
Package irutil provides LLVM IR utility functions.
|
Package irutil provides LLVM IR utility functions. |
Package types declares the data types of LLVM IR.
|
Package types declares the data types of LLVM IR. |
Package value provides a definition of LLVM IR values.
|
Package value provides a definition of LLVM IR values. |