llvm-hs-pure 6.0.0 → 6.1.0
raw patch · 14 files changed
+910/−411 lines, 14 filesdep −hspecdep −semigroupsdep −textdep ~basedep ~bytestringdep ~containersPVP ok
version bump matches the API change (PVP)
Dependencies removed: hspec, semigroups, text
Dependency ranges changed: base, bytestring, containers, mtl, transformers, unordered-containers
API changes (from Hackage documentation)
- LLVM.AST.Operand: MetadataNode :: [Maybe Metadata] -> MetadataNode
- LLVM.AST.Operand: MetadataNodeReference :: MetadataNodeID -> MetadataNode
- LLVM.AST.Operand: data MetadataNode
- LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.MetadataNode
- LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.MetadataNode
- LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.MetadataNode
- LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.MetadataNode
- LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.MetadataNode
- LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.MetadataNode
- LLVM.IRBuilder.Internal.SnocList: instance Data.Semigroup.Semigroup (LLVM.IRBuilder.Internal.SnocList.SnocList a)
- LLVM.Prelude: infixr 6 <>
+ LLVM.AST: ArrayType :: Word64 -> Type -> Type
+ LLVM.AST: ConstantOperand :: Constant -> Operand
+ LLVM.AST: DIExpression :: DIExpression -> MDNode
+ LLVM.AST: DIGlobalVariableExpression :: DIGlobalVariableExpression -> MDNode
+ LLVM.AST: DILocation :: DILocation -> MDNode
+ LLVM.AST: DIMacroNode :: DIMacroNode -> MDNode
+ LLVM.AST: DINode :: DINode -> MDNode
+ LLVM.AST: DoubleFP :: FloatingPointType
+ LLVM.AST: FP128FP :: FloatingPointType
+ LLVM.AST: FloatFP :: FloatingPointType
+ LLVM.AST: FloatingPointType :: FloatingPointType -> Type
+ LLVM.AST: FunctionType :: Type -> [Type] -> Bool -> Type
+ LLVM.AST: HalfFP :: FloatingPointType
+ LLVM.AST: IntegerType :: Word32 -> Type
+ LLVM.AST: LabelType :: Type
+ LLVM.AST: LocalReference :: Type -> Name -> Operand
+ LLVM.AST: MDInline :: a -> MDRef a
+ LLVM.AST: MDNode :: (MDRef MDNode) -> Metadata
+ LLVM.AST: MDRef :: MetadataNodeID -> MDRef a
+ LLVM.AST: MDString :: ShortByteString -> Metadata
+ LLVM.AST: MDTuple :: [Maybe Metadata] -> MDNode
+ LLVM.AST: MDValue :: Operand -> Metadata
+ LLVM.AST: MetadataNodeID :: Word -> MetadataNodeID
+ LLVM.AST: MetadataOperand :: Metadata -> Operand
+ LLVM.AST: MetadataType :: Type
+ LLVM.AST: NamedTypeReference :: Name -> Type
+ LLVM.AST: PPC_FP128FP :: FloatingPointType
+ LLVM.AST: PointerType :: Type -> AddrSpace -> Type
+ LLVM.AST: StructureType :: Bool -> [Type] -> Type
+ LLVM.AST: TokenType :: Type
+ LLVM.AST: VectorType :: Word32 -> Type -> Type
+ LLVM.AST: VoidType :: Type
+ LLVM.AST: X86_FP80FP :: FloatingPointType
+ LLVM.AST: [argumentTypes] :: Type -> [Type]
+ LLVM.AST: [elementType] :: Type -> Type
+ LLVM.AST: [elementTypes] :: Type -> [Type]
+ LLVM.AST: [floatingPointType] :: Type -> FloatingPointType
+ LLVM.AST: [isPacked] :: Type -> Bool
+ LLVM.AST: [isVarArg] :: Type -> Bool
+ LLVM.AST: [nArrayElements] :: Type -> Word64
+ LLVM.AST: [nVectorElements] :: Type -> Word32
+ LLVM.AST: [pointerAddrSpace] :: Type -> AddrSpace
+ LLVM.AST: [pointerReferent] :: Type -> Type
+ LLVM.AST: [resultType] :: Type -> Type
+ LLVM.AST: [typeBits] :: Type -> Word32
+ LLVM.AST: data FloatingPointType
+ LLVM.AST: data MDNode
+ LLVM.AST: data MDRef a
+ LLVM.AST: data Metadata
+ LLVM.AST: data Operand
+ LLVM.AST: data Type
+ LLVM.AST: newtype MetadataNodeID
+ LLVM.AST: type CallableOperand = Either InlineAssembly Operand
+ LLVM.AST.Global: [metadata] :: Global -> [(ShortByteString, MDRef MDNode)]
+ LLVM.AST.Operand: Accessibility :: DIAccessibility -> DIFlag
+ LLVM.AST.Operand: AddressEncoding :: Encoding
+ LLVM.AST.Operand: AppleBlock :: DIFlag
+ LLVM.AST.Operand: Artificial :: DIFlag
+ LLVM.AST.Operand: AtomicType :: DerivedTypeTag
+ LLVM.AST.Operand: BaseType :: BasicTypeTag
+ LLVM.AST.Operand: BasicType :: ShortByteString -> Word64 -> Word32 -> Maybe Encoding -> BasicTypeTag -> DIBasicType
+ LLVM.AST.Operand: BitField :: DIFlag
+ LLVM.AST.Operand: BlockByrefStruct :: DIFlag
+ LLVM.AST.Operand: BooleanEncoding :: Encoding
+ LLVM.AST.Operand: CompileUnit :: Word32 -> MDRef DIFile -> ShortByteString -> Bool -> ShortByteString -> Word32 -> ShortByteString -> DebugEmissionKind -> [MDRef DICompositeType] -> [MDRef (Either DIType DISubprogram)] -> [MDRef DIGlobalVariableExpression] -> [MDRef DIImportedEntity] -> [MDRef DIMacroNode] -> Word64 -> Bool -> Bool -> Bool -> DICompileUnit
+ LLVM.AST.Operand: ConstType :: DerivedTypeTag
+ LLVM.AST.Operand: DIArrayType :: [DISubrange] -> Maybe (MDRef DIType) -> Word64 -> Word32 -> [DIFlag] -> DICompositeType
+ LLVM.AST.Operand: DIBasicType :: DIBasicType -> DIType
+ LLVM.AST.Operand: DIClassType :: Maybe (MDRef DIScope) -> ShortByteString -> Maybe (MDRef DIFile) -> Word32 -> [DIFlag] -> Maybe (MDRef DIType) -> [MDRef (Either DIDerivedType DISubprogram)] -> Maybe (MDRef DIType) -> [DITemplateParameter] -> ShortByteString -> Word64 -> Word32 -> DICompositeType
+ LLVM.AST.Operand: DICompileUnit :: DICompileUnit -> DIScope
+ LLVM.AST.Operand: DICompositeType :: DICompositeType -> DIType
+ LLVM.AST.Operand: DIDerivedType :: DIDerivedType -> DIType
+ LLVM.AST.Operand: DIEnumerationType :: Maybe (MDRef DIScope) -> ShortByteString -> Maybe (MDRef DIFile) -> Word32 -> [DIEnumerator] -> Maybe (MDRef DIType) -> ShortByteString -> Word64 -> Word32 -> DICompositeType
+ LLVM.AST.Operand: DIEnumerator :: DIEnumerator -> DINode
+ LLVM.AST.Operand: DIExpression :: DIExpression -> MDNode
+ LLVM.AST.Operand: DIFile :: DIFile -> DIScope
+ LLVM.AST.Operand: DIGlobalVariable :: DIGlobalVariable -> DIVariable
+ LLVM.AST.Operand: DIGlobalVariableExpression :: DIGlobalVariableExpression -> MDNode
+ LLVM.AST.Operand: DIImportedEntity :: DIImportedEntity -> DINode
+ LLVM.AST.Operand: DILexicalBlock :: MDRef DILocalScope -> Maybe (MDRef DIFile) -> Word32 -> Word16 -> DILexicalBlockBase
+ LLVM.AST.Operand: DILexicalBlockBase :: DILexicalBlockBase -> DILocalScope
+ LLVM.AST.Operand: DILexicalBlockFile :: MDRef DILocalScope -> Maybe (MDRef DIFile) -> Word32 -> DILexicalBlockBase
+ LLVM.AST.Operand: DILocalScope :: DILocalScope -> DIScope
+ LLVM.AST.Operand: DILocalVariable :: DILocalVariable -> DIVariable
+ LLVM.AST.Operand: DILocation :: DILocation -> MDNode
+ LLVM.AST.Operand: DIMacro :: DIMacroInfo -> Word32 -> ShortByteString -> ShortByteString -> DIMacroNode
+ LLVM.AST.Operand: DIMacroFile :: Word32 -> MDRef DIFile -> [MDRef DIMacroNode] -> DIMacroNode
+ LLVM.AST.Operand: DIMacroNode :: DIMacroNode -> MDNode
+ LLVM.AST.Operand: DIModule :: DIModule -> DIScope
+ LLVM.AST.Operand: DINamespace :: DINamespace -> DIScope
+ LLVM.AST.Operand: DINode :: DINode -> MDNode
+ LLVM.AST.Operand: DIObjCProperty :: DIObjCProperty -> DINode
+ LLVM.AST.Operand: DIScope :: DIScope -> DINode
+ LLVM.AST.Operand: DIStructureType :: Maybe (MDRef DIScope) -> ShortByteString -> Maybe (MDRef DIFile) -> Word32 -> [DIFlag] -> Maybe (MDRef DIType) -> [MDRef (Either DIDerivedType DISubprogram)] -> Word16 -> Maybe (MDRef DIType) -> ShortByteString -> Word64 -> Word32 -> DICompositeType
+ LLVM.AST.Operand: DISubprogram :: DISubprogram -> DILocalScope
+ LLVM.AST.Operand: DISubrange :: DISubrange -> DINode
+ LLVM.AST.Operand: DISubroutineType :: DISubroutineType -> DIType
+ LLVM.AST.Operand: DITemplateParameter :: DITemplateParameter -> DINode
+ LLVM.AST.Operand: DITemplateTypeParameter :: ShortByteString -> MDRef DIType -> DITemplateParameter
+ LLVM.AST.Operand: DITemplateValueParameter :: ShortByteString -> MDRef DIType -> Metadata -> TemplateValueParameterTag -> DITemplateParameter
+ LLVM.AST.Operand: DIType :: DIType -> DIScope
+ LLVM.AST.Operand: DIUnionType :: Maybe (MDRef DIScope) -> ShortByteString -> Maybe (MDRef DIFile) -> Word32 -> [DIFlag] -> [MDRef (Either DIDerivedType DISubprogram)] -> Word16 -> ShortByteString -> Word64 -> Word32 -> DICompositeType
+ LLVM.AST.Operand: DIVariable :: DIVariable -> DINode
+ LLVM.AST.Operand: DW_OP_ConstU :: Word64 -> DWOp
+ LLVM.AST.Operand: DW_OP_Deref :: DWOp
+ LLVM.AST.Operand: DW_OP_LLVM_Fragment :: Word64 -> Word64 -> DWOpFragment
+ LLVM.AST.Operand: DW_OP_Minus :: DWOp
+ LLVM.AST.Operand: DW_OP_Mul :: DWOp
+ LLVM.AST.Operand: DW_OP_Plus :: DWOp
+ LLVM.AST.Operand: DW_OP_PlusUConst :: Word64 -> DWOp
+ LLVM.AST.Operand: DW_OP_StackValue :: DWOp
+ LLVM.AST.Operand: DW_OP_Swap :: DWOp
+ LLVM.AST.Operand: DW_OP_XDeref :: DWOp
+ LLVM.AST.Operand: Define :: DIMacroInfo
+ LLVM.AST.Operand: DerivedType :: DerivedTypeTag -> ShortByteString -> Maybe (MDRef DIFile) -> Word32 -> Maybe (MDRef DIScope) -> MDRef DIType -> Word64 -> Word32 -> Word64 -> Maybe Word32 -> [DIFlag] -> DIDerivedType
+ LLVM.AST.Operand: DwOpFragment :: DWOpFragment -> DWOp
+ LLVM.AST.Operand: Enumerator :: Int64 -> ShortByteString -> DIEnumerator
+ LLVM.AST.Operand: Explicit :: DIFlag
+ LLVM.AST.Operand: Expression :: [DWOp] -> DIExpression
+ LLVM.AST.Operand: File :: ShortByteString -> ShortByteString -> ShortByteString -> ChecksumKind -> DIFile
+ LLVM.AST.Operand: FloatEncoding :: Encoding
+ LLVM.AST.Operand: Friend :: DerivedTypeTag
+ LLVM.AST.Operand: FullDebug :: DebugEmissionKind
+ LLVM.AST.Operand: FwdDecl :: DIFlag
+ LLVM.AST.Operand: GNUTemplateParameterPack :: TemplateValueParameterTag
+ LLVM.AST.Operand: GNUTemplateTemplateParam :: TemplateValueParameterTag
+ LLVM.AST.Operand: GlobalVariable :: ShortByteString -> Maybe (MDRef DIScope) -> Maybe (MDRef DIFile) -> Word32 -> Maybe (MDRef DIType) -> ShortByteString -> Bool -> Bool -> Maybe (MDRef DIDerivedType) -> Word32 -> DIGlobalVariable
+ LLVM.AST.Operand: GlobalVariableExpression :: MDRef DIGlobalVariable -> MDRef DIExpression -> DIGlobalVariableExpression
+ LLVM.AST.Operand: ImportedDeclaration :: ImportedEntityTag
+ LLVM.AST.Operand: ImportedEntity :: ImportedEntityTag -> ShortByteString -> MDRef DIScope -> Maybe (MDRef DINode) -> Maybe (MDRef DIFile) -> Word32 -> DIImportedEntity
+ LLVM.AST.Operand: ImportedModule :: ImportedEntityTag
+ LLVM.AST.Operand: Inheritance :: DerivedTypeTag
+ LLVM.AST.Operand: InheritanceFlag :: DIInheritance -> DIFlag
+ LLVM.AST.Operand: IntroducedVirtual :: DIFlag
+ LLVM.AST.Operand: LValueReference :: DIFlag
+ LLVM.AST.Operand: LineTablesOnly :: DebugEmissionKind
+ LLVM.AST.Operand: LocalVariable :: ShortByteString -> MDRef DIScope -> Maybe (MDRef DIFile) -> Word32 -> Maybe (MDRef DIType) -> [DIFlag] -> Word16 -> Word32 -> DILocalVariable
+ LLVM.AST.Operand: Location :: Word32 -> Word16 -> MDRef DILocalScope -> DILocation
+ LLVM.AST.Operand: MD5 :: ChecksumKind
+ LLVM.AST.Operand: MDInline :: a -> MDRef a
+ LLVM.AST.Operand: MDRef :: MetadataNodeID -> MDRef a
+ LLVM.AST.Operand: MDTuple :: [Maybe Metadata] -> MDNode
+ LLVM.AST.Operand: MainSubprogram :: DIFlag
+ LLVM.AST.Operand: Member :: DerivedTypeTag
+ LLVM.AST.Operand: Module :: MDRef DIScope -> ShortByteString -> ShortByteString -> ShortByteString -> ShortByteString -> DIModule
+ LLVM.AST.Operand: MultipleInheritance :: DIInheritance
+ LLVM.AST.Operand: Namespace :: ShortByteString -> MDRef DIScope -> Bool -> DINamespace
+ LLVM.AST.Operand: NoDebug :: DebugEmissionKind
+ LLVM.AST.Operand: NoReturn :: DIFlag
+ LLVM.AST.Operand: NoVirtuality :: Virtuality
+ LLVM.AST.Operand: None :: ChecksumKind
+ LLVM.AST.Operand: ObjCProperty :: ShortByteString -> Maybe (MDRef DIFile) -> Word32 -> ShortByteString -> ShortByteString -> Word32 -> Maybe (MDRef DIType) -> DIObjCProperty
+ LLVM.AST.Operand: ObjcClassComplete :: DIFlag
+ LLVM.AST.Operand: ObjectPointer :: DIFlag
+ LLVM.AST.Operand: PointerType :: DerivedTypeTag
+ LLVM.AST.Operand: Private :: DIAccessibility
+ LLVM.AST.Operand: Protected :: DIAccessibility
+ LLVM.AST.Operand: Prototyped :: DIFlag
+ LLVM.AST.Operand: PtrToMemberType :: DerivedTypeTag
+ LLVM.AST.Operand: Public :: DIAccessibility
+ LLVM.AST.Operand: PureVirtual :: Virtuality
+ LLVM.AST.Operand: RValueReference :: DIFlag
+ LLVM.AST.Operand: RValueReferenceType :: DerivedTypeTag
+ LLVM.AST.Operand: ReferenceType :: DerivedTypeTag
+ LLVM.AST.Operand: RestrictType :: DerivedTypeTag
+ LLVM.AST.Operand: SHA1 :: ChecksumKind
+ LLVM.AST.Operand: SignedCharEncoding :: Encoding
+ LLVM.AST.Operand: SignedEncoding :: Encoding
+ LLVM.AST.Operand: SingleInheritance :: DIInheritance
+ LLVM.AST.Operand: StaticMember :: DIFlag
+ LLVM.AST.Operand: Subprogram :: Maybe (MDRef DIScope) -> ShortByteString -> ShortByteString -> Maybe (MDRef DIFile) -> Word32 -> Maybe (MDRef DISubroutineType) -> Bool -> Bool -> Word32 -> Maybe (MDRef DIType) -> Virtuality -> Word32 -> Int32 -> [DIFlag] -> Bool -> Maybe (MDRef DICompileUnit) -> [MDRef DITemplateParameter] -> Maybe (MDRef DISubprogram) -> [MDRef DILocalVariable] -> [MDRef DIType] -> DISubprogram
+ LLVM.AST.Operand: Subrange :: Int64 -> Int64 -> DISubrange
+ LLVM.AST.Operand: SubroutineType :: [DIFlag] -> Word8 -> [Maybe (MDRef DIType)] -> DISubroutineType
+ LLVM.AST.Operand: TemplateValueParameter :: TemplateValueParameterTag
+ LLVM.AST.Operand: Typedef :: DerivedTypeTag
+ LLVM.AST.Operand: Undef :: DIMacroInfo
+ LLVM.AST.Operand: UnsignedCharEncoding :: Encoding
+ LLVM.AST.Operand: UnsignedEncoding :: Encoding
+ LLVM.AST.Operand: UnspecifiedType :: BasicTypeTag
+ LLVM.AST.Operand: Vector :: DIFlag
+ LLVM.AST.Operand: Virtual :: Virtuality
+ LLVM.AST.Operand: VirtualFlag :: DIFlag
+ LLVM.AST.Operand: VirtualInheritance :: DIInheritance
+ LLVM.AST.Operand: VolatileType :: DerivedTypeTag
+ LLVM.AST.Operand: [$sel:alignInBits:BasicType] :: DIBasicType -> Word32
+ LLVM.AST.Operand: [$sel:alignInBits:DIArrayType] :: DICompositeType -> Word32
+ LLVM.AST.Operand: [$sel:alignInBits:DerivedType] :: DIDerivedType -> Word32
+ LLVM.AST.Operand: [$sel:alignInBits:GlobalVariable] :: DIGlobalVariable -> Word32
+ LLVM.AST.Operand: [$sel:alignInBits:LocalVariable] :: DILocalVariable -> Word32
+ LLVM.AST.Operand: [$sel:arg:LocalVariable] :: DILocalVariable -> Word16
+ LLVM.AST.Operand: [$sel:attributes:ObjCProperty] :: DIObjCProperty -> Word32
+ LLVM.AST.Operand: [$sel:baseType:DIArrayType] :: DICompositeType -> Maybe (MDRef DIType)
+ LLVM.AST.Operand: [$sel:checksum:File] :: DIFile -> ShortByteString
+ LLVM.AST.Operand: [$sel:checksumKind:File] :: DIFile -> ChecksumKind
+ LLVM.AST.Operand: [$sel:column:DILexicalBlock] :: DILexicalBlockBase -> Word16
+ LLVM.AST.Operand: [$sel:column:Location] :: DILocation -> Word16
+ LLVM.AST.Operand: [$sel:configurationMacros:Module] :: DIModule -> ShortByteString
+ LLVM.AST.Operand: [$sel:containingType:Subprogram] :: DISubprogram -> Maybe (MDRef DIType)
+ LLVM.AST.Operand: [$sel:count:Subrange] :: DISubrange -> Int64
+ LLVM.AST.Operand: [$sel:dWOId:CompileUnit] :: DICompileUnit -> Word64
+ LLVM.AST.Operand: [$sel:debugInfoForProfiling:CompileUnit] :: DICompileUnit -> Bool
+ LLVM.AST.Operand: [$sel:declaration:Subprogram] :: DISubprogram -> Maybe (MDRef DISubprogram)
+ LLVM.AST.Operand: [$sel:definition:GlobalVariable] :: DIGlobalVariable -> Bool
+ LLVM.AST.Operand: [$sel:definition:Subprogram] :: DISubprogram -> Bool
+ LLVM.AST.Operand: [$sel:derivedAddressSpace:DerivedType] :: DIDerivedType -> Maybe Word32
+ LLVM.AST.Operand: [$sel:derivedBaseType:DerivedType] :: DIDerivedType -> MDRef DIType
+ LLVM.AST.Operand: [$sel:derivedFile:DerivedType] :: DIDerivedType -> Maybe (MDRef DIFile)
+ LLVM.AST.Operand: [$sel:derivedFlags:DerivedType] :: DIDerivedType -> [DIFlag]
+ LLVM.AST.Operand: [$sel:derivedFrom:DIArrayType] :: DICompositeType -> Maybe (MDRef DIType)
+ LLVM.AST.Operand: [$sel:derivedLine:DerivedType] :: DIDerivedType -> Word32
+ LLVM.AST.Operand: [$sel:derivedName:DerivedType] :: DIDerivedType -> ShortByteString
+ LLVM.AST.Operand: [$sel:derivedOffsetInBits:DerivedType] :: DIDerivedType -> Word64
+ LLVM.AST.Operand: [$sel:derivedScope:DerivedType] :: DIDerivedType -> Maybe (MDRef DIScope)
+ LLVM.AST.Operand: [$sel:derivedTag:DerivedType] :: DIDerivedType -> DerivedTypeTag
+ LLVM.AST.Operand: [$sel:directory:File] :: DIFile -> ShortByteString
+ LLVM.AST.Operand: [$sel:discriminator:DILexicalBlock] :: DILexicalBlockBase -> Word32
+ LLVM.AST.Operand: [$sel:elementTy:DIArrayType] :: DICompositeType -> Maybe (MDRef DIType)
+ LLVM.AST.Operand: [$sel:elements:DIArrayType] :: DICompositeType -> [MDRef (Either DIDerivedType DISubprogram)]
+ LLVM.AST.Operand: [$sel:elements:DIMacro] :: DIMacroNode -> [MDRef DIMacroNode]
+ LLVM.AST.Operand: [$sel:emissionKind:CompileUnit] :: DICompileUnit -> DebugEmissionKind
+ LLVM.AST.Operand: [$sel:entity:ImportedEntity] :: DIImportedEntity -> Maybe (MDRef DINode)
+ LLVM.AST.Operand: [$sel:enums:CompileUnit] :: DICompileUnit -> [MDRef DICompositeType]
+ LLVM.AST.Operand: [$sel:exportSymbols:Namespace] :: DINamespace -> Bool
+ LLVM.AST.Operand: [$sel:expr:GlobalVariableExpression] :: DIGlobalVariableExpression -> MDRef DIExpression
+ LLVM.AST.Operand: [$sel:file:CompileUnit] :: DICompileUnit -> MDRef DIFile
+ LLVM.AST.Operand: [$sel:file:DIArrayType] :: DICompositeType -> Maybe (MDRef DIFile)
+ LLVM.AST.Operand: [$sel:file:DILexicalBlock] :: DILexicalBlockBase -> Maybe (MDRef DIFile)
+ LLVM.AST.Operand: [$sel:file:DIMacro] :: DIMacroNode -> MDRef DIFile
+ LLVM.AST.Operand: [$sel:file:GlobalVariable] :: DIGlobalVariable -> Maybe (MDRef DIFile)
+ LLVM.AST.Operand: [$sel:file:ImportedEntity] :: DIImportedEntity -> Maybe (MDRef DIFile)
+ LLVM.AST.Operand: [$sel:file:LocalVariable] :: DILocalVariable -> Maybe (MDRef DIFile)
+ LLVM.AST.Operand: [$sel:file:ObjCProperty] :: DIObjCProperty -> Maybe (MDRef DIFile)
+ LLVM.AST.Operand: [$sel:file:Subprogram] :: DISubprogram -> Maybe (MDRef DIFile)
+ LLVM.AST.Operand: [$sel:filename:File] :: DIFile -> ShortByteString
+ LLVM.AST.Operand: [$sel:flags:CompileUnit] :: DICompileUnit -> ShortByteString
+ LLVM.AST.Operand: [$sel:flags:DIArrayType] :: DICompositeType -> [DIFlag]
+ LLVM.AST.Operand: [$sel:flags:LocalVariable] :: DILocalVariable -> [DIFlag]
+ LLVM.AST.Operand: [$sel:flags:Subprogram] :: DISubprogram -> [DIFlag]
+ LLVM.AST.Operand: [$sel:getterName:ObjCProperty] :: DIObjCProperty -> ShortByteString
+ LLVM.AST.Operand: [$sel:globals:CompileUnit] :: DICompileUnit -> [MDRef DIGlobalVariableExpression]
+ LLVM.AST.Operand: [$sel:gnuPubnames:CompileUnit] :: DICompileUnit -> Bool
+ LLVM.AST.Operand: [$sel:identifier:DIArrayType] :: DICompositeType -> ShortByteString
+ LLVM.AST.Operand: [$sel:imports:CompileUnit] :: DICompileUnit -> [MDRef DIImportedEntity]
+ LLVM.AST.Operand: [$sel:includePath:Module] :: DIModule -> ShortByteString
+ LLVM.AST.Operand: [$sel:info:DIMacro] :: DIMacroNode -> DIMacroInfo
+ LLVM.AST.Operand: [$sel:isysRoot:Module] :: DIModule -> ShortByteString
+ LLVM.AST.Operand: [$sel:language:CompileUnit] :: DICompileUnit -> Word32
+ LLVM.AST.Operand: [$sel:line:DIArrayType] :: DICompositeType -> Word32
+ LLVM.AST.Operand: [$sel:line:DILexicalBlock] :: DILexicalBlockBase -> Word32
+ LLVM.AST.Operand: [$sel:line:DIMacro] :: DIMacroNode -> Word32
+ LLVM.AST.Operand: [$sel:line:GlobalVariable] :: DIGlobalVariable -> Word32
+ LLVM.AST.Operand: [$sel:line:ImportedEntity] :: DIImportedEntity -> Word32
+ LLVM.AST.Operand: [$sel:line:LocalVariable] :: DILocalVariable -> Word32
+ LLVM.AST.Operand: [$sel:line:Location] :: DILocation -> Word32
+ LLVM.AST.Operand: [$sel:line:ObjCProperty] :: DIObjCProperty -> Word32
+ LLVM.AST.Operand: [$sel:line:Subprogram] :: DISubprogram -> Word32
+ LLVM.AST.Operand: [$sel:linkageName:GlobalVariable] :: DIGlobalVariable -> ShortByteString
+ LLVM.AST.Operand: [$sel:linkageName:Subprogram] :: DISubprogram -> ShortByteString
+ LLVM.AST.Operand: [$sel:local:GlobalVariable] :: DIGlobalVariable -> Bool
+ LLVM.AST.Operand: [$sel:localToUnit:Subprogram] :: DISubprogram -> Bool
+ LLVM.AST.Operand: [$sel:lowerBound:Subrange] :: DISubrange -> Int64
+ LLVM.AST.Operand: [$sel:macros:CompileUnit] :: DICompileUnit -> [MDRef DIMacroNode]
+ LLVM.AST.Operand: [$sel:name:DIArrayType] :: DICompositeType -> ShortByteString
+ LLVM.AST.Operand: [$sel:name:DIMacro] :: DIMacroNode -> ShortByteString
+ LLVM.AST.Operand: [$sel:name:DITemplateTypeParameter] :: DITemplateParameter -> ShortByteString
+ LLVM.AST.Operand: [$sel:name:Enumerator] :: DIEnumerator -> ShortByteString
+ LLVM.AST.Operand: [$sel:name:GlobalVariable] :: DIGlobalVariable -> ShortByteString
+ LLVM.AST.Operand: [$sel:name:ImportedEntity] :: DIImportedEntity -> ShortByteString
+ LLVM.AST.Operand: [$sel:name:LocalVariable] :: DILocalVariable -> ShortByteString
+ LLVM.AST.Operand: [$sel:name:Module] :: DIModule -> ShortByteString
+ LLVM.AST.Operand: [$sel:name:Namespace] :: DINamespace -> ShortByteString
+ LLVM.AST.Operand: [$sel:name:ObjCProperty] :: DIObjCProperty -> ShortByteString
+ LLVM.AST.Operand: [$sel:name:Subprogram] :: DISubprogram -> ShortByteString
+ LLVM.AST.Operand: [$sel:offset:DW_OP_LLVM_Fragment] :: DWOpFragment -> Word64
+ LLVM.AST.Operand: [$sel:operands:Expression] :: DIExpression -> [DWOp]
+ LLVM.AST.Operand: [$sel:optimized:CompileUnit] :: DICompileUnit -> Bool
+ LLVM.AST.Operand: [$sel:optimized:Subprogram] :: DISubprogram -> Bool
+ LLVM.AST.Operand: [$sel:producer:CompileUnit] :: DICompileUnit -> ShortByteString
+ LLVM.AST.Operand: [$sel:retainedTypes:CompileUnit] :: DICompileUnit -> [MDRef (Either DIType DISubprogram)]
+ LLVM.AST.Operand: [$sel:runtimeLang:DIArrayType] :: DICompositeType -> Word16
+ LLVM.AST.Operand: [$sel:runtimeVersion:CompileUnit] :: DICompileUnit -> Word32
+ LLVM.AST.Operand: [$sel:scope:DIArrayType] :: DICompositeType -> Maybe (MDRef DIScope)
+ LLVM.AST.Operand: [$sel:scope:DILexicalBlock] :: DILexicalBlockBase -> MDRef DILocalScope
+ LLVM.AST.Operand: [$sel:scope:GlobalVariable] :: DIGlobalVariable -> Maybe (MDRef DIScope)
+ LLVM.AST.Operand: [$sel:scope:ImportedEntity] :: DIImportedEntity -> MDRef DIScope
+ LLVM.AST.Operand: [$sel:scope:LocalVariable] :: DILocalVariable -> MDRef DIScope
+ LLVM.AST.Operand: [$sel:scope:Location] :: DILocation -> MDRef DILocalScope
+ LLVM.AST.Operand: [$sel:scope:Module] :: DIModule -> MDRef DIScope
+ LLVM.AST.Operand: [$sel:scope:Namespace] :: DINamespace -> MDRef DIScope
+ LLVM.AST.Operand: [$sel:scope:Subprogram] :: DISubprogram -> Maybe (MDRef DIScope)
+ LLVM.AST.Operand: [$sel:scopeLine:Subprogram] :: DISubprogram -> Word32
+ LLVM.AST.Operand: [$sel:setterName:ObjCProperty] :: DIObjCProperty -> ShortByteString
+ LLVM.AST.Operand: [$sel:size:DW_OP_LLVM_Fragment] :: DWOpFragment -> Word64
+ LLVM.AST.Operand: [$sel:sizeInBits:BasicType] :: DIBasicType -> Word64
+ LLVM.AST.Operand: [$sel:sizeInBits:DIArrayType] :: DICompositeType -> Word64
+ LLVM.AST.Operand: [$sel:sizeInBits:DerivedType] :: DIDerivedType -> Word64
+ LLVM.AST.Operand: [$sel:splitDebugFileName:CompileUnit] :: DICompileUnit -> ShortByteString
+ LLVM.AST.Operand: [$sel:splitDebugInlining:CompileUnit] :: DICompileUnit -> Bool
+ LLVM.AST.Operand: [$sel:staticDataMemberDeclaration:GlobalVariable] :: DIGlobalVariable -> Maybe (MDRef DIDerivedType)
+ LLVM.AST.Operand: [$sel:subscripts:DIArrayType] :: DICompositeType -> [DISubrange]
+ LLVM.AST.Operand: [$sel:tag:DITemplateTypeParameter] :: DITemplateParameter -> TemplateValueParameterTag
+ LLVM.AST.Operand: [$sel:tag:ImportedEntity] :: DIImportedEntity -> ImportedEntityTag
+ LLVM.AST.Operand: [$sel:templateParams:DIArrayType] :: DICompositeType -> [DITemplateParameter]
+ LLVM.AST.Operand: [$sel:templateParams:Subprogram] :: DISubprogram -> [MDRef DITemplateParameter]
+ LLVM.AST.Operand: [$sel:thisAdjustment:Subprogram] :: DISubprogram -> Int32
+ LLVM.AST.Operand: [$sel:thrownTypes:Subprogram] :: DISubprogram -> [MDRef DIType]
+ LLVM.AST.Operand: [$sel:type':DITemplateTypeParameter] :: DITemplateParameter -> MDRef DIType
+ LLVM.AST.Operand: [$sel:type':GlobalVariable] :: DIGlobalVariable -> Maybe (MDRef DIType)
+ LLVM.AST.Operand: [$sel:type':LocalVariable] :: DILocalVariable -> Maybe (MDRef DIType)
+ LLVM.AST.Operand: [$sel:type':ObjCProperty] :: DIObjCProperty -> Maybe (MDRef DIType)
+ LLVM.AST.Operand: [$sel:type':Subprogram] :: DISubprogram -> Maybe (MDRef DISubroutineType)
+ LLVM.AST.Operand: [$sel:typeCC:SubroutineType] :: DISubroutineType -> Word8
+ LLVM.AST.Operand: [$sel:typeEncoding:BasicType] :: DIBasicType -> Maybe Encoding
+ LLVM.AST.Operand: [$sel:typeFlags:SubroutineType] :: DISubroutineType -> [DIFlag]
+ LLVM.AST.Operand: [$sel:typeName:BasicType] :: DIBasicType -> ShortByteString
+ LLVM.AST.Operand: [$sel:typeTag:BasicType] :: DIBasicType -> BasicTypeTag
+ LLVM.AST.Operand: [$sel:typeTypeArray:SubroutineType] :: DISubroutineType -> [Maybe (MDRef DIType)]
+ LLVM.AST.Operand: [$sel:unit:Subprogram] :: DISubprogram -> Maybe (MDRef DICompileUnit)
+ LLVM.AST.Operand: [$sel:value:DIMacro] :: DIMacroNode -> ShortByteString
+ LLVM.AST.Operand: [$sel:value:DITemplateTypeParameter] :: DITemplateParameter -> Metadata
+ LLVM.AST.Operand: [$sel:value:Enumerator] :: DIEnumerator -> Int64
+ LLVM.AST.Operand: [$sel:values:DIArrayType] :: DICompositeType -> [DIEnumerator]
+ LLVM.AST.Operand: [$sel:var:GlobalVariableExpression] :: DIGlobalVariableExpression -> MDRef DIGlobalVariable
+ LLVM.AST.Operand: [$sel:variables:Subprogram] :: DISubprogram -> [MDRef DILocalVariable]
+ LLVM.AST.Operand: [$sel:virtuality:Subprogram] :: DISubprogram -> Virtuality
+ LLVM.AST.Operand: [$sel:virtualityIndex:Subprogram] :: DISubprogram -> Word32
+ LLVM.AST.Operand: [$sel:vtableHolder:DIArrayType] :: DICompositeType -> Maybe (MDRef DIType)
+ LLVM.AST.Operand: data BasicTypeTag
+ LLVM.AST.Operand: data ChecksumKind
+ LLVM.AST.Operand: data DIAccessibility
+ LLVM.AST.Operand: data DIBasicType
+ LLVM.AST.Operand: data DICompileUnit
+ LLVM.AST.Operand: data DICompositeType
+ LLVM.AST.Operand: data DIDerivedType
+ LLVM.AST.Operand: data DIEnumerator
+ LLVM.AST.Operand: data DIExpression
+ LLVM.AST.Operand: data DIFile
+ LLVM.AST.Operand: data DIFlag
+ LLVM.AST.Operand: data DIGlobalVariable
+ LLVM.AST.Operand: data DIGlobalVariableExpression
+ LLVM.AST.Operand: data DIImportedEntity
+ LLVM.AST.Operand: data DIInheritance
+ LLVM.AST.Operand: data DILexicalBlockBase
+ LLVM.AST.Operand: data DILocalScope
+ LLVM.AST.Operand: data DILocalVariable
+ LLVM.AST.Operand: data DILocation
+ LLVM.AST.Operand: data DIMacroInfo
+ LLVM.AST.Operand: data DIMacroNode
+ LLVM.AST.Operand: data DIModule
+ LLVM.AST.Operand: data DINamespace
+ LLVM.AST.Operand: data DINode
+ LLVM.AST.Operand: data DIObjCProperty
+ LLVM.AST.Operand: data DIScope
+ LLVM.AST.Operand: data DISubprogram
+ LLVM.AST.Operand: data DISubrange
+ LLVM.AST.Operand: data DISubroutineType
+ LLVM.AST.Operand: data DITemplateParameter
+ LLVM.AST.Operand: data DIType
+ LLVM.AST.Operand: data DIVariable
+ LLVM.AST.Operand: data DWOp
+ LLVM.AST.Operand: data DWOpFragment
+ LLVM.AST.Operand: data DebugEmissionKind
+ LLVM.AST.Operand: data DerivedTypeTag
+ LLVM.AST.Operand: data Encoding
+ LLVM.AST.Operand: data ImportedEntityTag
+ LLVM.AST.Operand: data MDNode
+ LLVM.AST.Operand: data MDRef a
+ LLVM.AST.Operand: data TemplateValueParameterTag
+ LLVM.AST.Operand: data Virtuality
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.BasicTypeTag
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.ChecksumKind
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIAccessibility
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIBasicType
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DICompileUnit
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DICompositeType
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIDerivedType
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIEnumerator
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIExpression
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIFile
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIFlag
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIGlobalVariable
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIGlobalVariableExpression
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIImportedEntity
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIInheritance
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DILexicalBlockBase
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DILocalScope
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DILocalVariable
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DILocation
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIMacroInfo
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIMacroNode
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIModule
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DINamespace
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DINode
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIObjCProperty
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIScope
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DISubprogram
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DISubrange
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DISubroutineType
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DITemplateParameter
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIType
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DIVariable
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DWOp
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DWOpFragment
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DebugEmissionKind
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.DerivedTypeTag
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.Encoding
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.ImportedEntityTag
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.MDNode
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.TemplateValueParameterTag
+ LLVM.AST.Operand: instance Data.Data.Data LLVM.AST.Operand.Virtuality
+ LLVM.AST.Operand: instance Data.Data.Data a => Data.Data.Data (LLVM.AST.Operand.MDRef a)
+ LLVM.AST.Operand: instance GHC.Base.Functor LLVM.AST.Operand.MDRef
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.BasicTypeTag
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.ChecksumKind
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIAccessibility
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIBasicType
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DICompileUnit
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DICompositeType
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIDerivedType
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIEnumerator
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIExpression
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIFile
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIFlag
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIGlobalVariable
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIGlobalVariableExpression
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIImportedEntity
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIInheritance
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DILexicalBlockBase
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DILocalScope
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DILocalVariable
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DILocation
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIMacroInfo
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIMacroNode
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIModule
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DINamespace
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DINode
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIObjCProperty
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIScope
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DISubprogram
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DISubrange
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DISubroutineType
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DITemplateParameter
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIType
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DIVariable
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DWOp
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DWOpFragment
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DebugEmissionKind
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.DerivedTypeTag
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.Encoding
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.ImportedEntityTag
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.MDNode
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.TemplateValueParameterTag
+ LLVM.AST.Operand: instance GHC.Classes.Eq LLVM.AST.Operand.Virtuality
+ LLVM.AST.Operand: instance GHC.Classes.Eq a => GHC.Classes.Eq (LLVM.AST.Operand.MDRef a)
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.BasicTypeTag
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.ChecksumKind
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIAccessibility
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIBasicType
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DICompileUnit
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DICompositeType
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIDerivedType
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIEnumerator
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIExpression
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIFile
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIFlag
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIGlobalVariable
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIGlobalVariableExpression
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIImportedEntity
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIInheritance
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DILexicalBlockBase
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DILocalScope
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DILocalVariable
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DILocation
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIMacroInfo
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIMacroNode
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIModule
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DINamespace
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DINode
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIObjCProperty
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIScope
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DISubprogram
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DISubrange
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DISubroutineType
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DITemplateParameter
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIType
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DIVariable
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DWOp
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DWOpFragment
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DebugEmissionKind
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.DerivedTypeTag
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.Encoding
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.ImportedEntityTag
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.MDNode
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.TemplateValueParameterTag
+ LLVM.AST.Operand: instance GHC.Classes.Ord LLVM.AST.Operand.Virtuality
+ LLVM.AST.Operand: instance GHC.Classes.Ord a => GHC.Classes.Ord (LLVM.AST.Operand.MDRef a)
+ LLVM.AST.Operand: instance GHC.Generics.Generic (LLVM.AST.Operand.MDRef a)
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.BasicTypeTag
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.ChecksumKind
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIAccessibility
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIBasicType
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DICompileUnit
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DICompositeType
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIDerivedType
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIEnumerator
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIExpression
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIFile
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIFlag
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIGlobalVariable
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIGlobalVariableExpression
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIImportedEntity
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIInheritance
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DILexicalBlockBase
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DILocalScope
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DILocalVariable
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DILocation
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIMacroInfo
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIMacroNode
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIModule
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DINamespace
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DINode
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIObjCProperty
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIScope
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DISubprogram
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DISubrange
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DISubroutineType
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DITemplateParameter
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIType
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DIVariable
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DWOp
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DWOpFragment
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DebugEmissionKind
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.DerivedTypeTag
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.Encoding
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.ImportedEntityTag
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.MDNode
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.TemplateValueParameterTag
+ LLVM.AST.Operand: instance GHC.Generics.Generic LLVM.AST.Operand.Virtuality
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.BasicTypeTag
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.ChecksumKind
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIAccessibility
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIBasicType
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DICompileUnit
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DICompositeType
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIDerivedType
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIEnumerator
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIExpression
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIFile
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIFlag
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIGlobalVariable
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIGlobalVariableExpression
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIImportedEntity
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIInheritance
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DILexicalBlockBase
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DILocalScope
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DILocalVariable
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DILocation
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIMacroInfo
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIMacroNode
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIModule
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DINamespace
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DINode
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIObjCProperty
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIScope
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DISubprogram
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DISubrange
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DISubroutineType
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DITemplateParameter
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIType
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DIVariable
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DWOp
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DWOpFragment
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DebugEmissionKind
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.DerivedTypeTag
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.Encoding
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.ImportedEntityTag
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.MDNode
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.TemplateValueParameterTag
+ LLVM.AST.Operand: instance GHC.Read.Read LLVM.AST.Operand.Virtuality
+ LLVM.AST.Operand: instance GHC.Read.Read a => GHC.Read.Read (LLVM.AST.Operand.MDRef a)
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.BasicTypeTag
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.ChecksumKind
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIAccessibility
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIBasicType
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DICompileUnit
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DICompositeType
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIDerivedType
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIEnumerator
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIExpression
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIFile
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIFlag
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIGlobalVariable
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIGlobalVariableExpression
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIImportedEntity
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIInheritance
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DILexicalBlockBase
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DILocalScope
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DILocalVariable
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DILocation
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIMacroInfo
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIMacroNode
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIModule
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DINamespace
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DINode
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIObjCProperty
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIScope
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DISubprogram
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DISubrange
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DISubroutineType
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DITemplateParameter
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIType
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DIVariable
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DWOp
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DWOpFragment
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DebugEmissionKind
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.DerivedTypeTag
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.Encoding
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.ImportedEntityTag
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.MDNode
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.TemplateValueParameterTag
+ LLVM.AST.Operand: instance GHC.Show.Show LLVM.AST.Operand.Virtuality
+ LLVM.AST.Operand: instance GHC.Show.Show a => GHC.Show.Show (LLVM.AST.Operand.MDRef a)
+ LLVM.IRBuilder.Internal.SnocList: instance GHC.Base.Semigroup (LLVM.IRBuilder.Internal.SnocList.SnocList a)
+ LLVM.IRBuilder.Monad: currentBlock :: MonadIRBuilder m => m Name
+ LLVM.IRBuilder.Monad: ensureBlock :: MonadIRBuilder m => m ()
+ LLVM.Prelude: (!!) :: () => [a] -> Int -> a
+ LLVM.Prelude: ($!) :: () => a -> b -> a -> b
+ LLVM.Prelude: ($) :: () => a -> b -> a -> b
+ LLVM.Prelude: (&&) :: Bool -> Bool -> Bool
+ LLVM.Prelude: (*) :: Num a => a -> a -> a
+ LLVM.Prelude: (**) :: Floating a => a -> a -> a
+ LLVM.Prelude: (*>) :: Applicative f => f a -> f b -> f b
+ LLVM.Prelude: (+) :: Num a => a -> a -> a
+ LLVM.Prelude: (++) :: () => [a] -> [a] -> [a]
+ LLVM.Prelude: (-) :: Num a => a -> a -> a
+ LLVM.Prelude: (.) :: () => b -> c -> a -> b -> a -> c
+ LLVM.Prelude: (/) :: Fractional a => a -> a -> a
+ LLVM.Prelude: (/=) :: Eq a => a -> a -> Bool
+ LLVM.Prelude: (<$!>) :: Monad m => a -> b -> m a -> m b
+ LLVM.Prelude: (<$) :: Functor f => a -> f b -> f a
+ LLVM.Prelude: (<$>) :: Functor f => a -> b -> f a -> f b
+ LLVM.Prelude: (<) :: Ord a => a -> a -> Bool
+ LLVM.Prelude: (<*) :: Applicative f => f a -> f b -> f a
+ LLVM.Prelude: (<*>) :: Applicative f => f a -> b -> f a -> f b
+ LLVM.Prelude: (<=) :: Ord a => a -> a -> Bool
+ LLVM.Prelude: (<=<) :: Monad m => b -> m c -> a -> m b -> a -> m c
+ LLVM.Prelude: (=<<) :: Monad m => a -> m b -> m a -> m b
+ LLVM.Prelude: (==) :: Eq a => a -> a -> Bool
+ LLVM.Prelude: (>) :: Ord a => a -> a -> Bool
+ LLVM.Prelude: (>=) :: Ord a => a -> a -> Bool
+ LLVM.Prelude: (>=>) :: Monad m => a -> m b -> b -> m c -> a -> m c
+ LLVM.Prelude: (>>) :: Monad m => m a -> m b -> m b
+ LLVM.Prelude: (>>=) :: Monad m => m a -> a -> m b -> m b
+ LLVM.Prelude: (^) :: (Num a, Integral b) => a -> b -> a
+ LLVM.Prelude: (^^) :: (Fractional a, Integral b) => a -> b -> a
+ LLVM.Prelude: (||) :: Bool -> Bool -> Bool
+ LLVM.Prelude: EQ :: Ordering
+ LLVM.Prelude: False :: Bool
+ LLVM.Prelude: GT :: Ordering
+ LLVM.Prelude: Just :: a -> Maybe a
+ LLVM.Prelude: LT :: Ordering
+ LLVM.Prelude: Left :: a -> Either a b
+ LLVM.Prelude: Nothing :: Maybe a
+ LLVM.Prelude: Right :: b -> Either a b
+ LLVM.Prelude: True :: Bool
+ LLVM.Prelude: abs :: Num a => a -> a
+ LLVM.Prelude: acos :: Floating a => a -> a
+ LLVM.Prelude: acosh :: Floating a => a -> a
+ LLVM.Prelude: ap :: Monad m => m a -> b -> m a -> m b
+ LLVM.Prelude: appendFile :: FilePath -> String -> IO ()
+ LLVM.Prelude: asTypeOf :: () => a -> a -> a
+ LLVM.Prelude: asin :: Floating a => a -> a
+ LLVM.Prelude: asinh :: Floating a => a -> a
+ LLVM.Prelude: atan :: Floating a => a -> a
+ LLVM.Prelude: atan2 :: RealFloat a => a -> a -> a
+ LLVM.Prelude: atanh :: Floating a => a -> a
+ LLVM.Prelude: break :: () => a -> Bool -> [a] -> ([a], [a])
+ LLVM.Prelude: ceiling :: (RealFrac a, Integral b) => a -> b
+ LLVM.Prelude: class Functor f => Applicative (f :: * -> *)
+ LLVM.Prelude: class Bounded a
+ LLVM.Prelude: class Typeable a => Data a
+ LLVM.Prelude: class Enum a
+ LLVM.Prelude: class Eq a
+ LLVM.Prelude: class Fractional a => Floating a
+ LLVM.Prelude: class Foldable (t :: * -> *)
+ LLVM.Prelude: class Num a => Fractional a
+ LLVM.Prelude: class Functor (f :: * -> *)
+ LLVM.Prelude: class Generic a
+ LLVM.Prelude: class (Real a, Enum a) => Integral a
+ LLVM.Prelude: class Applicative m => Monad (m :: * -> *)
+ LLVM.Prelude: class (Alternative m, Monad m) => MonadPlus (m :: * -> *)
+ LLVM.Prelude: class Semigroup a => Monoid a
+ LLVM.Prelude: class Num a
+ LLVM.Prelude: class Eq a => Ord a
+ LLVM.Prelude: class Read a
+ LLVM.Prelude: class (Num a, Ord a) => Real a
+ LLVM.Prelude: class (RealFrac a, Floating a) => RealFloat a
+ LLVM.Prelude: class (Real a, Fractional a) => RealFrac a
+ LLVM.Prelude: class Semigroup a
+ LLVM.Prelude: class Show a
+ LLVM.Prelude: class (Functor t, Foldable t) => Traversable (t :: * -> *)
+ LLVM.Prelude: class Typeable (a :: k)
+ LLVM.Prelude: compare :: Ord a => a -> a -> Ordering
+ LLVM.Prelude: const :: () => a -> b -> a
+ LLVM.Prelude: cos :: Floating a => a -> a
+ LLVM.Prelude: cosh :: Floating a => a -> a
+ LLVM.Prelude: curry :: () => (a, b) -> c -> a -> b -> c
+ LLVM.Prelude: cycle :: () => [a] -> [a]
+ LLVM.Prelude: data Bool
+ LLVM.Prelude: data Char
+ LLVM.Prelude: data Double
+ LLVM.Prelude: data Either a b
+ LLVM.Prelude: data Float
+ LLVM.Prelude: data IO a
+ LLVM.Prelude: data Int
+ LLVM.Prelude: data Integer
+ LLVM.Prelude: data Maybe a
+ LLVM.Prelude: data Ordering
+ LLVM.Prelude: data Word
+ LLVM.Prelude: decodeFloat :: RealFloat a => a -> (Integer, Int)
+ LLVM.Prelude: div :: Integral a => a -> a -> a
+ LLVM.Prelude: divMod :: Integral a => a -> a -> (a, a)
+ LLVM.Prelude: drop :: () => Int -> [a] -> [a]
+ LLVM.Prelude: dropWhile :: () => a -> Bool -> [a] -> [a]
+ LLVM.Prelude: either :: () => a -> c -> b -> c -> Either a b -> c
+ LLVM.Prelude: encodeFloat :: RealFloat a => Integer -> Int -> a
+ LLVM.Prelude: enumFrom :: Enum a => a -> [a]
+ LLVM.Prelude: enumFromThen :: Enum a => a -> a -> [a]
+ LLVM.Prelude: enumFromThenTo :: Enum a => a -> a -> a -> [a]
+ LLVM.Prelude: enumFromTo :: Enum a => a -> a -> [a]
+ LLVM.Prelude: error :: HasCallStack => [Char] -> a
+ LLVM.Prelude: errorWithoutStackTrace :: () => [Char] -> a
+ LLVM.Prelude: even :: Integral a => a -> Bool
+ LLVM.Prelude: exp :: Floating a => a -> a
+ LLVM.Prelude: exponent :: RealFloat a => a -> Int
+ LLVM.Prelude: fail :: Monad m => String -> m a
+ LLVM.Prelude: filter :: () => a -> Bool -> [a] -> [a]
+ LLVM.Prelude: filterM :: Applicative m => a -> m Bool -> [a] -> m [a]
+ LLVM.Prelude: flip :: () => a -> b -> c -> b -> a -> c
+ LLVM.Prelude: floatDigits :: RealFloat a => a -> Int
+ LLVM.Prelude: floatRadix :: RealFloat a => a -> Integer
+ LLVM.Prelude: floatRange :: RealFloat a => a -> (Int, Int)
+ LLVM.Prelude: floor :: (RealFrac a, Integral b) => a -> b
+ LLVM.Prelude: fmap :: Functor f => a -> b -> f a -> f b
+ LLVM.Prelude: foldM :: (Foldable t, Monad m) => b -> a -> m b -> b -> t a -> m b
+ LLVM.Prelude: foldM_ :: (Foldable t, Monad m) => b -> a -> m b -> b -> t a -> m ()
+ LLVM.Prelude: foldMap :: (Foldable t, Monoid m) => a -> m -> t a -> m
+ LLVM.Prelude: forever :: Applicative f => f a -> f b
+ LLVM.Prelude: fromEnum :: Enum a => a -> Int
+ LLVM.Prelude: fromInteger :: Num a => Integer -> a
+ LLVM.Prelude: fromIntegral :: (Integral a, Num b) => a -> b
+ LLVM.Prelude: fromRational :: Fractional a => Rational -> a
+ LLVM.Prelude: fst :: () => (a, b) -> a
+ LLVM.Prelude: gcd :: Integral a => a -> a -> a
+ LLVM.Prelude: getChar :: IO Char
+ LLVM.Prelude: getContents :: IO String
+ LLVM.Prelude: getLine :: IO String
+ LLVM.Prelude: guard :: Alternative f => Bool -> f ()
+ LLVM.Prelude: head :: () => [a] -> a
+ LLVM.Prelude: id :: () => a -> a
+ LLVM.Prelude: infixl 4 <$!>
+ LLVM.Prelude: infixl 9 !!
+ LLVM.Prelude: infixr 0 $!
+ LLVM.Prelude: infixr 1 =<<
+ LLVM.Prelude: infixr 2 ||
+ LLVM.Prelude: infixr 3 &&
+ LLVM.Prelude: infixr 5 ++
+ LLVM.Prelude: infixr 8 ^
+ LLVM.Prelude: infixr 9 .
+ LLVM.Prelude: init :: () => [a] -> [a]
+ LLVM.Prelude: interact :: String -> String -> IO ()
+ LLVM.Prelude: ioError :: () => IOError -> IO a
+ LLVM.Prelude: isDenormalized :: RealFloat a => a -> Bool
+ LLVM.Prelude: isIEEE :: RealFloat a => a -> Bool
+ LLVM.Prelude: isInfinite :: RealFloat a => a -> Bool
+ LLVM.Prelude: isNaN :: RealFloat a => a -> Bool
+ LLVM.Prelude: isNegativeZero :: RealFloat a => a -> Bool
+ LLVM.Prelude: iterate :: () => a -> a -> a -> [a]
+ LLVM.Prelude: join :: Monad m => m m a -> m a
+ LLVM.Prelude: last :: () => [a] -> a
+ LLVM.Prelude: lcm :: Integral a => a -> a -> a
+ LLVM.Prelude: length :: Foldable t => t a -> Int
+ LLVM.Prelude: lex :: ReadS String
+ LLVM.Prelude: liftM :: Monad m => a1 -> r -> m a1 -> m r
+ LLVM.Prelude: liftM2 :: Monad m => a1 -> a2 -> r -> m a1 -> m a2 -> m r
+ LLVM.Prelude: liftM3 :: Monad m => a1 -> a2 -> a3 -> r -> m a1 -> m a2 -> m a3 -> m r
+ LLVM.Prelude: liftM4 :: Monad m => a1 -> a2 -> a3 -> a4 -> r -> m a1 -> m a2 -> m a3 -> m a4 -> m r
+ LLVM.Prelude: liftM5 :: Monad m => a1 -> a2 -> a3 -> a4 -> a5 -> r -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r
+ LLVM.Prelude: lines :: String -> [String]
+ LLVM.Prelude: log :: Floating a => a -> a
+ LLVM.Prelude: logBase :: Floating a => a -> a -> a
+ LLVM.Prelude: lookup :: Eq a => a -> [(a, b)] -> Maybe b
+ LLVM.Prelude: map :: () => a -> b -> [a] -> [b]
+ LLVM.Prelude: mapAndUnzipM :: Applicative m => a -> m (b, c) -> [a] -> m ([b], [c])
+ LLVM.Prelude: mappend :: Monoid a => a -> a -> a
+ LLVM.Prelude: max :: Ord a => a -> a -> a
+ LLVM.Prelude: maxBound :: Bounded a => a
+ LLVM.Prelude: maybe :: () => b -> a -> b -> Maybe a -> b
+ LLVM.Prelude: mconcat :: Monoid a => [a] -> a
+ LLVM.Prelude: mempty :: Monoid a => a
+ LLVM.Prelude: mfilter :: MonadPlus m => a -> Bool -> m a -> m a
+ LLVM.Prelude: min :: Ord a => a -> a -> a
+ LLVM.Prelude: minBound :: Bounded a => a
+ LLVM.Prelude: mod :: Integral a => a -> a -> a
+ LLVM.Prelude: mplus :: MonadPlus m => m a -> m a -> m a
+ LLVM.Prelude: mzero :: MonadPlus m => m a
+ LLVM.Prelude: negate :: Num a => a -> a
+ LLVM.Prelude: not :: Bool -> Bool
+ LLVM.Prelude: null :: Foldable t => t a -> Bool
+ LLVM.Prelude: odd :: Integral a => a -> Bool
+ LLVM.Prelude: otherwise :: Bool
+ LLVM.Prelude: pi :: Floating a => a
+ LLVM.Prelude: pred :: Enum a => a -> a
+ LLVM.Prelude: print :: Show a => a -> IO ()
+ LLVM.Prelude: properFraction :: (RealFrac a, Integral b) => a -> (b, a)
+ LLVM.Prelude: pure :: Applicative f => a -> f a
+ LLVM.Prelude: putChar :: Char -> IO ()
+ LLVM.Prelude: putStr :: String -> IO ()
+ LLVM.Prelude: putStrLn :: String -> IO ()
+ LLVM.Prelude: quot :: Integral a => a -> a -> a
+ LLVM.Prelude: quotRem :: Integral a => a -> a -> (a, a)
+ LLVM.Prelude: read :: Read a => String -> a
+ LLVM.Prelude: readFile :: FilePath -> IO String
+ LLVM.Prelude: readIO :: Read a => String -> IO a
+ LLVM.Prelude: readList :: Read a => ReadS [a]
+ LLVM.Prelude: readLn :: Read a => IO a
+ LLVM.Prelude: readParen :: () => Bool -> ReadS a -> ReadS a
+ LLVM.Prelude: reads :: Read a => ReadS a
+ LLVM.Prelude: readsPrec :: Read a => Int -> ReadS a
+ LLVM.Prelude: realToFrac :: (Real a, Fractional b) => a -> b
+ LLVM.Prelude: recip :: Fractional a => a -> a
+ LLVM.Prelude: rem :: Integral a => a -> a -> a
+ LLVM.Prelude: repeat :: () => a -> [a]
+ LLVM.Prelude: replicate :: () => Int -> a -> [a]
+ LLVM.Prelude: replicateM :: Applicative m => Int -> m a -> m [a]
+ LLVM.Prelude: replicateM_ :: Applicative m => Int -> m a -> m ()
+ LLVM.Prelude: return :: Monad m => a -> m a
+ LLVM.Prelude: reverse :: () => [a] -> [a]
+ LLVM.Prelude: round :: (RealFrac a, Integral b) => a -> b
+ LLVM.Prelude: scaleFloat :: RealFloat a => Int -> a -> a
+ LLVM.Prelude: scanl :: () => b -> a -> b -> b -> [a] -> [b]
+ LLVM.Prelude: scanl1 :: () => a -> a -> a -> [a] -> [a]
+ LLVM.Prelude: scanr :: () => a -> b -> b -> b -> [a] -> [b]
+ LLVM.Prelude: scanr1 :: () => a -> a -> a -> [a] -> [a]
+ LLVM.Prelude: seq :: () => a -> b -> b
+ LLVM.Prelude: sequenceA :: (Traversable t, Applicative f) => t f a -> f t a
+ LLVM.Prelude: show :: Show a => a -> String
+ LLVM.Prelude: showChar :: Char -> ShowS
+ LLVM.Prelude: showList :: Show a => [a] -> ShowS
+ LLVM.Prelude: showParen :: Bool -> ShowS -> ShowS
+ LLVM.Prelude: showString :: String -> ShowS
+ LLVM.Prelude: shows :: Show a => a -> ShowS
+ LLVM.Prelude: showsPrec :: Show a => Int -> a -> ShowS
+ LLVM.Prelude: significand :: RealFloat a => a -> a
+ LLVM.Prelude: signum :: Num a => a -> a
+ LLVM.Prelude: sin :: Floating a => a -> a
+ LLVM.Prelude: sinh :: Floating a => a -> a
+ LLVM.Prelude: snd :: () => (a, b) -> b
+ LLVM.Prelude: span :: () => a -> Bool -> [a] -> ([a], [a])
+ LLVM.Prelude: splitAt :: () => Int -> [a] -> ([a], [a])
+ LLVM.Prelude: sqrt :: Floating a => a -> a
+ LLVM.Prelude: subtract :: Num a => a -> a -> a
+ LLVM.Prelude: succ :: Enum a => a -> a
+ LLVM.Prelude: tail :: () => [a] -> [a]
+ LLVM.Prelude: take :: () => Int -> [a] -> [a]
+ LLVM.Prelude: takeWhile :: () => a -> Bool -> [a] -> [a]
+ LLVM.Prelude: tan :: Floating a => a -> a
+ LLVM.Prelude: tanh :: Floating a => a -> a
+ LLVM.Prelude: toEnum :: Enum a => Int -> a
+ LLVM.Prelude: toInteger :: Integral a => a -> Integer
+ LLVM.Prelude: toRational :: Real a => a -> Rational
+ LLVM.Prelude: traverse :: (Traversable t, Applicative f) => a -> f b -> t a -> f t b
+ LLVM.Prelude: truncate :: (RealFrac a, Integral b) => a -> b
+ LLVM.Prelude: type FilePath = String
+ LLVM.Prelude: type IOError = IOException
+ LLVM.Prelude: type Rational = Ratio Integer
+ LLVM.Prelude: type ReadS a = String -> [(a, String)]
+ LLVM.Prelude: type ShowS = String -> String
+ LLVM.Prelude: type String = [Char]
+ LLVM.Prelude: uncurry :: () => a -> b -> c -> (a, b) -> c
+ LLVM.Prelude: undefined :: HasCallStack => a
+ LLVM.Prelude: unless :: Applicative f => Bool -> f () -> f ()
+ LLVM.Prelude: unlines :: [String] -> String
+ LLVM.Prelude: until :: () => a -> Bool -> a -> a -> a -> a
+ LLVM.Prelude: unwords :: [String] -> String
+ LLVM.Prelude: unzip :: () => [(a, b)] -> ([a], [b])
+ LLVM.Prelude: unzip3 :: () => [(a, b, c)] -> ([a], [b], [c])
+ LLVM.Prelude: userError :: String -> IOError
+ LLVM.Prelude: void :: Functor f => f a -> f ()
+ LLVM.Prelude: when :: Applicative f => Bool -> f () -> f ()
+ LLVM.Prelude: words :: String -> [String]
+ LLVM.Prelude: writeFile :: FilePath -> String -> IO ()
+ LLVM.Prelude: zip :: () => [a] -> [b] -> [(a, b)]
+ LLVM.Prelude: zip3 :: () => [a] -> [b] -> [c] -> [(a, b, c)]
+ LLVM.Prelude: zipWith :: () => a -> b -> c -> [a] -> [b] -> [c]
+ LLVM.Prelude: zipWith3 :: () => a -> b -> c -> d -> [a] -> [b] -> [c] -> [d]
+ LLVM.Prelude: zipWithM :: Applicative m => a -> b -> m c -> [a] -> [b] -> m [c]
+ LLVM.Prelude: zipWithM_ :: Applicative m => a -> b -> m c -> [a] -> [b] -> m ()
- LLVM.AST: Function :: Linkage -> Visibility -> Maybe StorageClass -> CallingConvention -> [ParameterAttribute] -> Type -> Name -> ([Parameter], Bool) -> [Either GroupID FunctionAttribute] -> Maybe ShortByteString -> Maybe ShortByteString -> Word32 -> Maybe ShortByteString -> Maybe Constant -> [BasicBlock] -> Maybe Constant -> Global
+ LLVM.AST: Function :: Linkage -> Visibility -> Maybe StorageClass -> CallingConvention -> [ParameterAttribute] -> Type -> Name -> ([Parameter], Bool) -> [Either GroupID FunctionAttribute] -> Maybe ShortByteString -> Maybe ShortByteString -> Word32 -> Maybe ShortByteString -> Maybe Constant -> [BasicBlock] -> Maybe Constant -> [(ShortByteString, MDRef MDNode)] -> Global
- LLVM.AST: GlobalVariable :: Name -> Linkage -> Visibility -> Maybe StorageClass -> Maybe Model -> Maybe UnnamedAddr -> Bool -> Type -> AddrSpace -> Maybe Constant -> Maybe ShortByteString -> Maybe ShortByteString -> Word32 -> Global
+ LLVM.AST: GlobalVariable :: Name -> Linkage -> Visibility -> Maybe StorageClass -> Maybe Model -> Maybe UnnamedAddr -> Bool -> Type -> AddrSpace -> Maybe Constant -> Maybe ShortByteString -> Maybe ShortByteString -> Word32 -> [(ShortByteString, MDRef MDNode)] -> Global
- LLVM.AST: MetadataNodeDefinition :: MetadataNodeID -> [Maybe Metadata] -> Definition
+ LLVM.AST: MetadataNodeDefinition :: MetadataNodeID -> MDNode -> Definition
- LLVM.AST.Global: Function :: Linkage -> Visibility -> Maybe StorageClass -> CallingConvention -> [ParameterAttribute] -> Type -> Name -> ([Parameter], Bool) -> [Either GroupID FunctionAttribute] -> Maybe ShortByteString -> Maybe ShortByteString -> Word32 -> Maybe ShortByteString -> Maybe Constant -> [BasicBlock] -> Maybe Constant -> Global
+ LLVM.AST.Global: Function :: Linkage -> Visibility -> Maybe StorageClass -> CallingConvention -> [ParameterAttribute] -> Type -> Name -> ([Parameter], Bool) -> [Either GroupID FunctionAttribute] -> Maybe ShortByteString -> Maybe ShortByteString -> Word32 -> Maybe ShortByteString -> Maybe Constant -> [BasicBlock] -> Maybe Constant -> [(ShortByteString, MDRef MDNode)] -> Global
- LLVM.AST.Global: GlobalVariable :: Name -> Linkage -> Visibility -> Maybe StorageClass -> Maybe Model -> Maybe UnnamedAddr -> Bool -> Type -> AddrSpace -> Maybe Constant -> Maybe ShortByteString -> Maybe ShortByteString -> Word32 -> Global
+ LLVM.AST.Global: GlobalVariable :: Name -> Linkage -> Visibility -> Maybe StorageClass -> Maybe Model -> Maybe UnnamedAddr -> Bool -> Type -> AddrSpace -> Maybe Constant -> Maybe ShortByteString -> Maybe ShortByteString -> Word32 -> [(ShortByteString, MDRef MDNode)] -> Global
- LLVM.AST.Instruction: type InstructionMetadata = [(ShortByteString, MetadataNode)]
+ LLVM.AST.Instruction: type InstructionMetadata = [(ShortByteString, MDRef MDNode)]
- LLVM.AST.Operand: MDNode :: MetadataNode -> Metadata
+ LLVM.AST.Operand: MDNode :: (MDRef MDNode) -> Metadata
- LLVM.Prelude: (<>) :: Monoid m => m -> m -> m
+ LLVM.Prelude: (<>) :: Semigroup a => a -> a -> a
- LLVM.Prelude: data ByteString :: *
+ LLVM.Prelude: data ByteString
- LLVM.Prelude: data ShortByteString :: *
+ LLVM.Prelude: data ShortByteString
Files
- CHANGELOG.md +16/−0
- llvm-hs-pure.cabal +10/−39
- src/LLVM/AST.hs +8/−3
- src/LLVM/AST/Global.hs +9/−4
- src/LLVM/AST/Instruction.hs +1/−1
- src/LLVM/AST/Operand.hs +483/−18
- src/LLVM/IRBuilder/Instruction.hs +6/−2
- src/LLVM/IRBuilder/Internal/SnocList.hs +0/−5
- src/LLVM/IRBuilder/Module.hs +3/−0
- src/LLVM/IRBuilder/Monad.hs +36/−4
- src/LLVM/Prelude.hs +5/−4
- test/IRBuilder.hs +0/−329
- test/LLVM/Test/IRBuilder.hs +329/−0
- test/LLVM/Test/Tests.hs +4/−2
CHANGELOG.md view
@@ -1,3 +1,19 @@+## 6.1.0 (2018-05-05)++* IRBuilder: Ensure that automatically generated block labels are+ assigned smaller identifiers than the instructions following+ them. This is only important when you use+ `llvm-hs-pretty`. `llvm-hs` does not care about the order of+ identifiers assigned to unnamed values.+* IRBuilder: add `currentBlock` which returns name of the currently+ active block.+* Remove the `MetadataNodeReference` constructor. References to+ metadata nodes are now encoded using the polymorphic `MDRef` type.+* Add debug metadata to the AST in `LLVM.AST.Operand`. Thanks to+ @xldenis who started that effort!+* Drop support for GHC 7.10.+* Add `metadata` field to `GlobalVariable` and `Function`.+ ## 6.0.0 (2018-03-06) * Support for LLVM 6.0
llvm-hs-pure.cabal view
@@ -1,5 +1,5 @@ name: llvm-hs-pure-version: 6.0.0+version: 6.1.0 license: BSD3 license-file: LICENSE author: Anthony Cowley, Stephen Diehl, Moritz Kiefer <moritz.kiefer@purelyfunctional.org>, Benjamin S. Scarlet@@ -9,14 +9,14 @@ bug-reports: http://github.com/llvm-hs/llvm-hs/issues build-type: Simple stability: experimental-cabal-version: >= 1.8+cabal-version: 1.24 category: Compilers/Interpreters, Code Generation synopsis: Pure Haskell LLVM functionality (no FFI). description: llvm-hs-pure is a set of pure Haskell types and functions for interacting with LLVM <http://llvm.org/>. It includes an ADT to represent LLVM IR (<http://llvm.org/docs/LangRef.html>). The llvm-hs package builds on this one with FFI bindings to LLVM, but llvm-hs-pure does not require LLVM to be available.-tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1+tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1 extra-source-files: CHANGELOG.md source-repository head@@ -24,20 +24,11 @@ location: git://github.com/llvm-hs/llvm-hs.git branch: llvm-5 -flag semigroups- description: Add semigroups to build-depends for Data.List.NonEmpty. This will be selected automatically by cabal.- default: False- library+ default-language: Haskell2010 ghc-options: -Wall- if flag(semigroups)- build-depends:- base >= 4.8 && < 4.9,- semigroups >= 0.18 && < 0.19- else- build-depends:- base >= 4.9 && < 5 build-depends:+ base >= 4.9 && < 5, attoparsec >= 0.13, bytestring >= 0.10 && < 0.11, fail,@@ -47,7 +38,7 @@ containers >= 0.4.2.1, unordered-containers >= 0.2 hs-source-dirs: src- extensions:+ default-extensions: NoImplicitPrelude TupleSections DeriveDataTypeable@@ -92,15 +83,10 @@ LLVM.Prelude test-suite test+ default-language: Haskell2010 type: exitcode-stdio-1.0- if flag(semigroups)- build-depends:- base >= 4.8 && < 4.9,- semigroups >= 0.18 && < 0.19- else- build-depends:- base >= 4.9 && < 5 build-depends:+ base >= 4.9 && < 5, tasty >= 0.11, tasty-hunit >= 0.9, tasty-quickcheck >= 0.8,@@ -109,27 +95,12 @@ containers >= 0.4.2.1, mtl >= 2.1 hs-source-dirs: test- extensions:+ default-extensions: TupleSections FlexibleInstances FlexibleContexts main-is: Test.hs other-modules: LLVM.Test.DataLayout+ LLVM.Test.IRBuilder LLVM.Test.Tests--test-suite test-irbuilder- type: exitcode-stdio-1.0- main-is: IRBuilder.hs- hs-source-dirs:- test- build-depends:- base >=4.8 && <4.11- , bytestring- , containers- , hspec- , llvm-hs-pure- , mtl- , text- , transformers- , unordered-containers
src/LLVM/AST.hs view
@@ -12,9 +12,14 @@ UnnamedAddr(..), Parameter(..), BasicBlock(..),+ Operand(..),+ CallableOperand,+ Metadata(..),+ MetadataNodeID(..),+ MDRef(..),+ MDNode(..), module LLVM.AST.Instruction, module LLVM.AST.Name,- module LLVM.AST.Operand, module LLVM.AST.Type ) where @@ -23,7 +28,7 @@ import LLVM.AST.Name import LLVM.AST.Type (Type(..), FloatingPointType(..)) import LLVM.AST.Global-import LLVM.AST.Operand+import LLVM.AST.Operand hiding (Module) import LLVM.AST.Instruction import LLVM.AST.DataLayout import qualified LLVM.AST.Attribute as A@@ -33,7 +38,7 @@ data Definition = GlobalDefinition Global | TypeDefinition Name (Maybe Type)- | MetadataNodeDefinition MetadataNodeID [Maybe Metadata]+ | MetadataNodeDefinition MetadataNodeID MDNode | NamedMetadataDefinition ShortByteString [MetadataNodeID] | ModuleInlineAssembly ByteString | FunctionAttributes A.GroupID [A.FunctionAttribute]
src/LLVM/AST/Global.hs view
@@ -14,6 +14,7 @@ import qualified LLVM.AST.CallingConvention as CC import qualified LLVM.AST.ThreadLocalStorage as TLS import qualified LLVM.AST.Attribute as A+import LLVM.AST.Operand (MDRef, MDNode) -- | <http://llvm.org/doxygen/classllvm_1_1GlobalValue.html> data Global@@ -31,7 +32,8 @@ initializer :: Maybe Constant, section :: Maybe ShortByteString, comdat :: Maybe ShortByteString,- alignment :: Word32+ alignment :: Word32,+ metadata :: [(ShortByteString, MDRef MDNode)] } -- | <http://llvm.org/docs/LangRef.html#aliases> | GlobalAlias {@@ -62,7 +64,8 @@ garbageCollectorName :: Maybe ShortByteString, prefix :: Maybe Constant, basicBlocks :: [BasicBlock],- personalityFunction :: Maybe Constant+ personalityFunction :: Maybe Constant,+ metadata :: [(ShortByteString, MDRef MDNode)] } deriving (Eq, Read, Show, Typeable, Data, Generic) @@ -95,7 +98,8 @@ initializer = Nothing, section = Nothing, comdat = Nothing,- alignment = 0+ alignment = 0,+ metadata = [] } -- | helper for making 'GlobalAlias's@@ -132,5 +136,6 @@ garbageCollectorName = Nothing, prefix = Nothing, basicBlocks = [],- personalityFunction = Nothing+ personalityFunction = Nothing,+ metadata = [] }
src/LLVM/AST/Instruction.hs view
@@ -19,7 +19,7 @@ -- | <http://llvm.org/docs/LangRef.html#metadata-nodes-and-metadata-strings> -- Metadata can be attached to an instruction-type InstructionMetadata = [(ShortByteString, MetadataNode)]+type InstructionMetadata = [(ShortByteString, MDRef MDNode)] -- | <http://llvm.org/docs/LangRef.html#terminators> data Terminator
src/LLVM/AST/Operand.hs view
@@ -1,5 +1,9 @@+{-# LANGUAGE DuplicateRecordFields #-} -- | A type to represent operands to LLVM 'LLVM.AST.Instruction.Instruction's-module LLVM.AST.Operand where+module LLVM.AST.Operand+( module LLVM.AST.Operand+)+where import LLVM.Prelude @@ -8,33 +12,494 @@ import LLVM.AST.InlineAssembly import LLVM.AST.Type ++-- | An 'Operand' is roughly that which is an argument to an 'LLVM.AST.Instruction.Instruction'+data Operand+ -- | %foo+ = LocalReference Type Name+ -- | 'Constant's include 'LLVM.AST.Constant.GlobalReference', for \@foo+ | ConstantOperand Constant+ | MetadataOperand Metadata+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | The 'LLVM.AST.Instruction.Call' instruction is special: the callee can be inline assembly+type CallableOperand = Either InlineAssembly Operand++-- | <http://llvm.org/docs/LangRef.html#metadata>+data Metadata+ = MDString ShortByteString -- ^ <http://llvm.org/docs/doxygen/html/classllvm_1_1MDNode.html>+ | MDNode (MDRef MDNode) -- ^ <http://llvm.org/docs/doxygen/html/classllvm_1_1MDNode.html>+ | MDValue Operand -- ^ <http://llvm.org/docs/doxygen/html/classllvm_1_1ValueAsMetadata.html>+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)+ -- | A 'MetadataNodeID' is a number for identifying a metadata node. -- Note this is different from "named metadata", which are represented with -- 'LLVM.AST.NamedMetadataDefinition'. newtype MetadataNodeID = MetadataNodeID Word deriving (Eq, Ord, Read, Show, Typeable, Data, Generic) --- | <http://llvm.org/docs/LangRef.html#metadata>-data MetadataNode - = MetadataNode [Maybe Metadata]- | MetadataNodeReference MetadataNodeID+-- | `MDRef` can either represent a reference to some piece of+-- metadata or the metadata itself.+--+-- This is mainly useful for encoding cyclic metadata. Note that LLVM+-- represents inline and non-inline nodes identically, so+-- roundtripping the Haskell AST does not preserve whether a node was+-- inline or not.+data MDRef a+ = MDRef MetadataNodeID+ | MDInline a deriving (Eq, Ord, Read, Show, Typeable, Data, Generic) +instance Functor MDRef where+ fmap _ (MDRef i) = MDRef i+ fmap f (MDInline a) = MDInline (f a)++data DWOpFragment = DW_OP_LLVM_Fragment+ { offset :: Word64+ , size :: Word64+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#diexpression>+data DWOp+ = DwOpFragment DWOpFragment -- ^ Must appear at the end+ | DW_OP_StackValue -- ^ Must be the last one or followed by a DW_OP_LLVM_Fragment+ | DW_OP_Swap+ | DW_OP_ConstU Word64+ | DW_OP_PlusUConst Word64+ | DW_OP_Plus+ | DW_OP_Minus+ | DW_OP_Mul+ | DW_OP_Deref+ | DW_OP_XDeref+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)+ -- | <http://llvm.org/docs/LangRef.html#metadata>-data Metadata- = MDString ShortByteString -- ^ <http://llvm.org/docs/doxygen/html/classllvm_1_1MDNode.html>- | MDNode MetadataNode -- ^ <http://llvm.org/docs/doxygen/html/classllvm_1_1MDNode.html>- | MDValue Operand -- ^ <http://llvm.org/docs/doxygen/html/classllvm_1_1ValueAsMetadata.html>+data MDNode+ = MDTuple [Maybe Metadata] -- ^ Nothing represents 'null'+ | DIExpression DIExpression+ | DIGlobalVariableExpression DIGlobalVariableExpression+ | DILocation DILocation+ | DIMacroNode DIMacroNode+ | DINode DINode deriving (Eq, Ord, Read, Show, Typeable, Data, Generic) --- | An 'Operand' is roughly that which is an argument to an 'LLVM.AST.Instruction.Instruction'-data Operand - -- | %foo- = LocalReference Type Name- -- | 'Constant's include 'LLVM.AST.Constant.GlobalReference', for \@foo- | ConstantOperand Constant- | MetadataOperand Metadata+data DILocation = Location+ { line :: Word32+ , column :: Word16+ , scope :: MDRef DILocalScope+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#diexpression>+data DIExpression = Expression+ { operands :: [DWOp]+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | A pair of a `DIGlobalVariable` and a `DIExpression`.+--+-- This is used in the `cuGlobals` fields of `DICompileUnit`.+data DIGlobalVariableExpression = GlobalVariableExpression+ { var :: MDRef DIGlobalVariable+ , expr :: MDRef DIExpression+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | Accessiblity flag+data DIAccessibility+ = Private+ | Protected+ | Public deriving (Eq, Ord, Read, Show, Typeable, Data, Generic) --- | The 'LLVM.AST.Instruction.Call' instruction is special: the callee can be inline assembly-type CallableOperand = Either InlineAssembly Operand+-- | Inheritance flag+data DIInheritance+ = SingleInheritance+ | MultipleInheritance+ | VirtualInheritance+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data DIFlag+ = Accessibility DIAccessibility+ | FwdDecl+ | AppleBlock+ | BlockByrefStruct+ | VirtualFlag+ | Artificial+ | Explicit+ | Prototyped+ | ObjcClassComplete+ | ObjectPointer+ | Vector+ | StaticMember+ | LValueReference+ | RValueReference+ | InheritanceFlag DIInheritance+ | IntroducedVirtual+ | BitField+ | NoReturn+ | MainSubprogram+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data DIMacroInfo = Define | Undef+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/doxygen/classllvm_1_1DIMacroNode.html>+data DIMacroNode+ -- | <https://llvm.org/docs/LangRef.html#dimacro>+ = DIMacro+ { info :: DIMacroInfo+ , line :: Word32+ , name :: ShortByteString+ , value :: ShortByteString+ }+ -- | <https://llvm.org/docs/LangRef.html#dimacrofile>+ | DIMacroFile+ { line :: Word32+ , file :: MDRef DIFile+ , elements :: [MDRef DIMacroNode]+ }+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/doxygen/classllvm_1_1DINode.html>+data DINode+ = DIEnumerator DIEnumerator+ | DIImportedEntity DIImportedEntity+ | DIObjCProperty DIObjCProperty+ | DIScope DIScope+ | DISubrange DISubrange+ | DITemplateParameter DITemplateParameter+ | DIVariable DIVariable+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/doxygen/classllvm_1_1DIObjCProperty.html>+data DIObjCProperty = ObjCProperty+ { name :: ShortByteString+ , file :: Maybe (MDRef DIFile)+ , line :: Word32+ , getterName :: ShortByteString+ , setterName :: ShortByteString+ , attributes :: Word32+ , type' :: Maybe (MDRef DIType)+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data ImportedEntityTag = ImportedModule | ImportedDeclaration+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/doxygen/classllvm_1_1DIImportedEntity.html>+data DIImportedEntity = ImportedEntity+ { tag :: ImportedEntityTag+ , name :: ShortByteString+ , scope :: MDRef DIScope+ , entity :: Maybe (MDRef DINode)+ , file :: Maybe (MDRef DIFile)+ , line :: Word32+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#dienumerator>+data DIEnumerator =+ Enumerator { value :: Int64, name :: ShortByteString }+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#disubrange>+data DISubrange =+ Subrange { count :: Int64, lowerBound :: Int64 }+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/doxygen/classllvm_1_1DIScope.html>+data DIScope+ = DICompileUnit DICompileUnit+ | DIFile DIFile+ | DILocalScope DILocalScope+ | DIModule DIModule+ | DINamespace DINamespace+ | DIType DIType+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data DIModule = Module+ { scope :: MDRef DIScope+ , name :: ShortByteString+ , configurationMacros :: ShortByteString+ , includePath :: ShortByteString+ , isysRoot :: ShortByteString+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data DINamespace = Namespace+ { name :: ShortByteString+ , scope :: MDRef DIScope+ , exportSymbols :: Bool+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data DebugEmissionKind = NoDebug | FullDebug | LineTablesOnly+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#dicompileunit>+data DICompileUnit = CompileUnit+ { language :: Word32+ , file :: MDRef DIFile+ , producer :: ShortByteString+ , optimized :: Bool+ , flags :: ShortByteString+ , runtimeVersion :: Word32+ , splitDebugFileName :: ShortByteString+ , emissionKind :: DebugEmissionKind+ , enums :: [MDRef DICompositeType] -- ^ Only enum types are allowed here+ , retainedTypes :: [MDRef (Either DIType DISubprogram)]+ , globals :: [MDRef DIGlobalVariableExpression]+ , imports :: [MDRef DIImportedEntity]+ , macros :: [MDRef DIMacroNode]+ , dWOId :: Word64+ , splitDebugInlining :: Bool+ , debugInfoForProfiling :: Bool+ , gnuPubnames :: Bool+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#difile>+data DIFile = File+ { filename :: ShortByteString+ , directory :: ShortByteString+ , checksum :: ShortByteString+ , checksumKind :: ChecksumKind+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data ChecksumKind = None | MD5 | SHA1+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/doxygen/classllvm_1_1DILocalScope.html>+data DILocalScope+ = DILexicalBlockBase DILexicalBlockBase+ | DISubprogram DISubprogram+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#disubprogram>+data DISubprogram = Subprogram+ { scope :: Maybe (MDRef DIScope)+ , name :: ShortByteString+ , linkageName :: ShortByteString+ , file :: Maybe (MDRef DIFile)+ , line :: Word32+ , type' :: Maybe (MDRef DISubroutineType)+ , localToUnit :: Bool+ , definition :: Bool+ , scopeLine :: Word32+ , containingType :: Maybe (MDRef DIType)+ , virtuality :: Virtuality+ , virtualityIndex :: Word32+ , thisAdjustment :: Int32+ , flags :: [DIFlag]+ , optimized :: Bool+ , unit :: Maybe (MDRef DICompileUnit)+ , templateParams :: [MDRef DITemplateParameter]+ , declaration :: Maybe (MDRef DISubprogram)+ , variables :: [MDRef DILocalVariable]+ , thrownTypes :: [MDRef DIType]+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data Virtuality = NoVirtuality | Virtual | PureVirtual+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data BasicTypeTag = BaseType | UnspecifiedType+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- <https://llvm.org/doxygen/classllvm_1_1DIType.html>+data DIType+ = DIBasicType DIBasicType+ | DICompositeType DICompositeType+ | DIDerivedType DIDerivedType+ | DISubroutineType DISubroutineType+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#dibasictype>+data DIBasicType = BasicType+ { typeName :: ShortByteString+ , sizeInBits :: Word64+ , alignInBits :: Word32+ , typeEncoding :: Maybe Encoding+ , typeTag :: BasicTypeTag+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#disubroutinetype>+data DISubroutineType = SubroutineType+ { typeFlags :: [DIFlag]+ , typeCC :: Word8+ , typeTypeArray :: [Maybe (MDRef DIType)]+ -- ^ The first element is the return type, the following are the+ -- operand types. `Nothing` corresponds to @void@.+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data DerivedTypeTag+ = Typedef+ | PointerType+ | PtrToMemberType+ | ReferenceType+ | RValueReferenceType+ | ConstType+ | VolatileType+ | RestrictType+ | AtomicType+ | Member+ | Inheritance+ | Friend+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#diderivedtype>+data DIDerivedType =+ DerivedType+ { derivedTag :: DerivedTypeTag+ , derivedName :: ShortByteString+ , derivedFile :: Maybe (MDRef DIFile)+ , derivedLine :: Word32+ , derivedScope :: Maybe (MDRef DIScope)+ , derivedBaseType :: MDRef DIType+ , sizeInBits :: Word64+ , alignInBits :: Word32+ , derivedOffsetInBits :: Word64+ , derivedAddressSpace :: Maybe Word32+ , derivedFlags :: [DIFlag]+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#dicompositetype>+data DICompositeType+ = DIArrayType+ { subscripts :: [DISubrange]+ , elementTy :: Maybe (MDRef DIType)+ , sizeInBits :: Word64+ , alignInBits :: Word32+ , flags :: [DIFlag]+ }+ | DIClassType+ { scope :: Maybe (MDRef DIScope)+ , name :: ShortByteString+ , file :: Maybe (MDRef DIFile)+ , line :: Word32+ , flags :: [DIFlag]+ , derivedFrom :: Maybe (MDRef DIType)+ , elements :: [MDRef (Either DIDerivedType DISubprogram)]+ -- ^ `DIDerivedType` with tag set to one of `Member`, `Inheritance`, `Friend`+ -- or `DISubprogram` with `definition` set to `True`.+ , vtableHolder :: Maybe (MDRef DIType)+ , templateParams :: [DITemplateParameter]+ , identifier :: ShortByteString+ , sizeInBits :: Word64+ , alignInBits :: Word32+ }+ | DIEnumerationType+ { scope :: Maybe (MDRef DIScope)+ , name :: ShortByteString+ , file :: Maybe (MDRef DIFile)+ , line :: Word32+ , values :: [DIEnumerator]+ , baseType :: Maybe (MDRef DIType)+ , identifier :: ShortByteString+ , sizeInBits :: Word64+ , alignInBits :: Word32+ }+ | DIStructureType+ { scope :: Maybe (MDRef DIScope)+ , name :: ShortByteString+ , file :: Maybe (MDRef DIFile)+ , line :: Word32+ , flags :: [DIFlag]+ , derivedFrom :: Maybe (MDRef DIType)+ , elements :: [MDRef (Either DIDerivedType DISubprogram)]+ -- ^ `DIDerivedType` with tag set to one of `Member`, `Inheritance`, `Friend`+ -- or `DISubprogram` with `definition` set to `True`.+ , runtimeLang :: Word16+ , vtableHolder :: Maybe (MDRef DIType)+ , identifier :: ShortByteString+ , sizeInBits :: Word64+ , alignInBits :: Word32+ }+ | DIUnionType+ { scope :: Maybe (MDRef DIScope)+ , name :: ShortByteString+ , file :: Maybe (MDRef DIFile)+ , line :: Word32+ , flags :: [DIFlag]+ , elements :: [MDRef (Either DIDerivedType DISubprogram)]+ -- ^ `DIDerivedType` with tag set to one of `Member`, `Inheritance`, `Friend`+ -- or `DISubprogram` with `definition` set to `True`.+ , runtimeLang :: Word16+ , identifier :: ShortByteString+ , sizeInBits :: Word64+ , alignInBits :: Word32+ }+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data Encoding+ = AddressEncoding+ | BooleanEncoding+ | FloatEncoding+ | SignedEncoding+ | SignedCharEncoding+ | UnsignedEncoding+ | UnsignedCharEncoding+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++data TemplateValueParameterTag+ = TemplateValueParameter+ | GNUTemplateTemplateParam+ | GNUTemplateParameterPack+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/doxygen/classllvm_1_1DITemplateParameter.html>+data DITemplateParameter+ = DITemplateTypeParameter+ { name :: ShortByteString+ , type' :: MDRef DIType+ }+ -- ^ <https://llvm.org/docs/LangRef.html#ditemplatetypeparameter>+ | DITemplateValueParameter+ { name :: ShortByteString+ , type' :: MDRef DIType+ , value :: Metadata+ , tag :: TemplateValueParameterTag+ }+ -- ^ <https://llvm.org/docs/LangRef.html#ditemplatevalueparameter>+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/doxygen/classllvm_1_1DILexicalBlockBase.html>+data DILexicalBlockBase+ = DILexicalBlock+ { scope :: MDRef DILocalScope+ , file :: Maybe (MDRef DIFile)+ , line :: Word32+ , column :: Word16+ }+ -- ^ <https://llvm.org/docs/LangRef.html#dilexicalblock>+ | DILexicalBlockFile+ { scope :: MDRef DILocalScope+ , file :: Maybe (MDRef DIFile)+ , discriminator :: Word32+ }+ -- ^ <https://llvm.org/docs/LangRef.html#dilexicalblockfile>+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/doxygen/classllvm_1_1DIVariable.html>+data DIVariable+ = DIGlobalVariable DIGlobalVariable+ | DILocalVariable DILocalVariable+ deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#diglobalvariable>+data DIGlobalVariable = GlobalVariable+ { name :: ShortByteString+ , scope :: Maybe (MDRef DIScope)+ , file :: Maybe (MDRef DIFile)+ , line :: Word32+ , type' :: Maybe (MDRef DIType)+ , linkageName :: ShortByteString+ , local :: Bool+ , definition :: Bool+ , staticDataMemberDeclaration :: Maybe (MDRef DIDerivedType)+ , alignInBits :: Word32+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)++-- | <https://llvm.org/docs/LangRef.html#dilocalvariable>+data DILocalVariable = LocalVariable+ { name :: ShortByteString+ , scope :: MDRef DIScope+ , file :: Maybe (MDRef DIFile)+ , line :: Word32+ , type' :: Maybe (MDRef DIType)+ , flags :: [DIFlag]+ , arg :: Word16+ , alignInBits :: Word32+ } deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)
src/LLVM/IRBuilder/Instruction.hs view
@@ -133,7 +133,11 @@ bitcast a to = emitInstr to $ BitCast a to [] extractElement :: MonadIRBuilder m => Operand -> Operand -> m Operand-extractElement v i = emitInstr (typeOf v) $ ExtractElement v i []+extractElement v i = emitInstr elemTyp $ ExtractElement v i []+ where elemTyp =+ case typeOf v of+ VectorType _ typ -> typ+ _ -> error "extractElement: Expected a vector type (malformed AST)." insertElement :: MonadIRBuilder m => Operand -> Operand -> Operand -> m Operand insertElement v e i = emitInstr (typeOf v) $ InsertElement v e i []@@ -142,7 +146,7 @@ shuffleVector a b m = emitInstr (typeOf a) $ ShuffleVector a b m [] extractValue :: MonadIRBuilder m => Operand -> [Word32] -> m Operand-extractValue a i = emitInstr (typeOf a) $ ExtractValue a i []+extractValue a i = emitInstr (extractValueType i (typeOf a)) $ ExtractValue a i [] insertValue :: MonadIRBuilder m => Operand -> Operand -> [Word32] -> m Operand insertValue a e i = emitInstr (typeOf a) $ InsertValue a e i []
src/LLVM/IRBuilder/Internal/SnocList.hs view
@@ -1,12 +1,7 @@ {-# LANGUAGE CPP #-} module LLVM.IRBuilder.Internal.SnocList where -#if MIN_VERSION_base(4,11,0) import LLVM.Prelude-#else-import Data.Semigroup (Semigroup(..))-import LLVM.Prelude hiding ((<>))-#endif newtype SnocList a = SnocList { unSnocList :: [a] } deriving (Eq, Show)
src/LLVM/IRBuilder/Module.hs view
@@ -7,6 +7,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} -- For MonadState s (IRBuilderT m) instance+{-# LANGUAGE CPP #-} module LLVM.IRBuilder.Module where @@ -27,7 +28,9 @@ import Control.Monad.State.Lazy import Control.Monad.List import Control.Monad.Trans.Maybe+#if !(MIN_VERSION_mtl(2,2,2)) import Control.Monad.Trans.Identity+#endif import Data.Bifunctor import Data.ByteString.Short as BS
src/LLVM/IRBuilder/Monad.hs view
@@ -5,6 +5,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} -- For MonadState s (ModuleBuilderT m) instance+{-# LANGUAGE CPP #-} module LLVM.IRBuilder.Monad where @@ -15,16 +16,19 @@ import Control.Monad.Fail import qualified Control.Monad.Fail as Fail import Control.Monad.Identity-import Control.Monad.Writer.Lazy as Lazy-import Control.Monad.Writer.Strict as Strict+import qualified Control.Monad.Writer.Lazy as Lazy+import qualified Control.Monad.Writer.Strict as Strict+import Control.Monad.Writer (MonadWriter) import Control.Monad.Reader-import Control.Monad.RWS.Lazy as Lazy-import Control.Monad.RWS.Strict as Strict+import qualified Control.Monad.RWS.Lazy as Lazy+import qualified Control.Monad.RWS.Strict as Strict import qualified Control.Monad.State.Lazy as Lazy import Control.Monad.State.Strict import Control.Monad.List import Control.Monad.Trans.Maybe+#if !(MIN_VERSION_mtl(2,2,2)) import Control.Monad.Trans.Identity+#endif import Data.Bifunctor import Data.String@@ -111,6 +115,20 @@ -- * Low-level functionality ------------------------------------------------------------------------------- +-- | If no partial block exists, create a new block with a fresh label.+--+-- This is useful if you want to ensure that the label for the block+-- is assigned before another label which is not possible with+-- `modifyBlock`.+ensureBlock :: MonadIRBuilder m => m ()+ensureBlock = do+ mbb <- liftIRState $ gets builderBlock+ case mbb of+ Nothing -> do+ nm <- freshUnName+ liftIRState $ modify $ \s -> s { builderBlock = Just $! emptyPartialBlock nm }+ Just _ -> pure ()+ modifyBlock :: MonadIRBuilder m => (PartialBlock -> PartialBlock)@@ -155,6 +173,8 @@ -> Instruction -> m Operand emitInstr retty instr = do+ -- Ensure that the fresh identifier for the block is assigned before the identifier for the instruction.+ ensureBlock nm <- fresh modifyBlock $ \bb -> bb { partialBlockInstrs = partialBlockInstrs bb `snoc` (nm := instr)@@ -229,6 +249,18 @@ result <- ir liftIRState $ modify $ \s -> s { builderNameSuggestion = before } return result++-- | Get the name of the currently active block.+--+-- This function will throw an error if there is no active block. The+-- only situation in which this can occur is if it is called before+-- any call to `block` and before emitting any instructions.+currentBlock :: MonadIRBuilder m => m Name+currentBlock = liftIRState $ do+ name <- gets (fmap partialBlockName . builderBlock)+ case name of+ Just n -> pure n+ Nothing -> error "Called currentBlock when no block was active" ------------------------------------------------------------------------------- -- mtl instances
src/LLVM/Prelude.hs view
@@ -1,5 +1,6 @@ -- | This module is presents a prelude mostly like the post-Applicative-Monad world of--- base >= 4.8 / ghc >= 7.10, even on earlier versions. It's intended as an internal library+-- base >= 4.8 / ghc >= 7.10, as well as the post-Semigroup-Monoid world of+-- base >= 4.11 / ghc >= 8.4, even on earlier versions. It's intended as an internal library -- for llvm-hs-pure and llvm-hs; it's exposed only to be shared between the two. module LLVM.Prelude ( module Prelude,@@ -9,6 +10,7 @@ module Data.Word, module Data.Functor, module Data.Foldable,+ module Data.Semigroup, module Data.Traversable, module Control.Applicative, module Control.Monad,@@ -17,8 +19,7 @@ fromMaybe, leftBiasedZip, findM,- ifM,- (<>)+ ifM ) where import Prelude hiding (@@ -34,10 +35,10 @@ import GHC.Generics (Generic) import Data.Int import Data.Maybe (fromMaybe)-import Data.Monoid ((<>)) import Data.Word import Data.Functor import Data.Foldable+import Data.Semigroup (Semigroup((<>))) import Data.Traversable import Control.Applicative import Control.Monad hiding (
− test/IRBuilder.hs
@@ -1,329 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecursiveDo #-}-module Main- ( main- ) where--import Data.Monoid-import qualified Data.Text.Lazy as T-import qualified Data.Text.Lazy.IO as T-import LLVM.AST hiding (function)-import qualified LLVM.AST.Constant as C-import qualified LLVM.AST.Float as F-import LLVM.AST.Global (basicBlocks, name, parameters, returnType)-import qualified LLVM.AST.Type as AST-import qualified LLVM.AST.CallingConvention as CC-import Test.Hspec hiding (example)-import qualified LLVM.AST.Instruction as I (function)-import LLVM.IRBuilder--main :: IO ()-main =- hspec $ do- describe "module builder" $ do- it "builds the simple module" $- simple `shouldBe`- defaultModule {- moduleName = "exampleModule",- moduleDefinitions =- [ GlobalDefinition functionDefaults {- name = "add",- parameters =- ( [ Parameter AST.i32 "a" []- , Parameter AST.i32 "b" []- ]- , False- ),- returnType = AST.i32,- basicBlocks =- [ BasicBlock- "entry"- [ UnName 0 := Add {- operand0 = LocalReference AST.i32 "a",- operand1 = LocalReference AST.i32 "b",- nsw = False,- nuw = False,- metadata = []- }- ]- (Do (Ret (Just (LocalReference AST.i32 (UnName 0))) []))- ]- }- ]- }- it "calls constant globals" $ do- callWorksWithConstantGlobals- it "supports recursive function calls" $ do- recursiveFunctionCalls- it "builds the example" $ do- let f10 = ConstantOperand (C.Float (F.Double 10))- fadd a b = FAdd { operand0 = a, operand1 = b, fastMathFlags = noFastMathFlags, metadata = [] }- add a b = Add { operand0 = a, operand1 = b, nsw = False, nuw = False, metadata = [] }- example `shouldBe`- defaultModule {- moduleName = "exampleModule",- moduleDefinitions =- [ GlobalDefinition functionDefaults {- name = "foo",- returnType = AST.double,- basicBlocks =- [ BasicBlock (UnName 0) [ "xxx" := fadd f10 f10]- (Do (Ret Nothing []))- , BasicBlock- "blk"- [ UnName 1 := fadd f10 f10- , UnName 2 := fadd (LocalReference AST.double (UnName 1)) (LocalReference AST.double (UnName 1))- , UnName 3 := add (ConstantOperand (C.Int 32 10)) (ConstantOperand (C.Int 32 10))- ]- (Do (Br "blk1" []))- , BasicBlock- "blk1"- [ "c" := fadd f10 f10- , UnName 4 := fadd (LocalReference AST.double "c") (LocalReference AST.double "c")- ]- (Do (Br "blk2" []))- , BasicBlock- "blk2"- [ "phi" :=- Phi- AST.double- [ ( f10, "blk" )- , ( f10, "blk1" )- , ( f10, "blk2" )- ]- []- , UnName 5 := fadd f10 f10- , UnName 6 := fadd (LocalReference AST.double (UnName 5)) (LocalReference AST.double (UnName 5))- ]- (Do (Ret Nothing []))- ]- }- , GlobalDefinition functionDefaults {- name = "bar",- returnType = AST.double,- basicBlocks =- [ BasicBlock- (UnName 0)- [ UnName 1 := fadd f10 f10- , UnName 2 := fadd (LocalReference AST.double (UnName 1)) (LocalReference AST.double (UnName 1))- ]- (Do (Ret Nothing []))- ]- }- , GlobalDefinition functionDefaults {- name = "baz",- parameters =- ( [ Parameter AST.i32 (UnName 0) []- , Parameter AST.double "arg" []- , Parameter AST.i32 (UnName 1) []- , Parameter AST.double "arg1" []]- , False),- returnType = AST.double,- basicBlocks =- [ BasicBlock- (UnName 2)- []- (Do- (Switch- (LocalReference AST.i32 (UnName 1))- (UnName 3)- [ ( C.Int 32 0, UnName 4), ( C.Int 32 1, UnName 7) ] []))- , BasicBlock- (UnName 3)- []- (Do (Br (UnName 4) []))- , BasicBlock- (UnName 4)- [ "arg2" := fadd (LocalReference AST.double "arg") f10- , UnName 5 := fadd (LocalReference AST.double "arg2") (LocalReference AST.double "arg2")- , UnName 6 := Select {- condition' = ConstantOperand (C.Int 1 0),- trueValue = LocalReference AST.double "arg2",- falseValue = LocalReference AST.double (UnName 5),- metadata = []- }- ]- (Do (Ret Nothing []))- , BasicBlock- (UnName 7)- [ UnName 8 := GetElementPtr {- inBounds = False,- address = ConstantOperand (C.Null (AST.ptr (AST.ptr (AST.ptr AST.i32)))),- indices =- [ ConstantOperand (C.Int 32 10)- , ConstantOperand (C.Int 32 20)- , ConstantOperand (C.Int 32 30)- ],- metadata = []- }- , UnName 9 := GetElementPtr {- inBounds = False,- address = LocalReference (AST.ptr AST.i32) (UnName 8),- indices = [ ConstantOperand (C.Int 32 40) ],- metadata = []- }- ]- (Do (Ret Nothing []))- ]- }- ]- }--recursiveFunctionCalls :: Expectation-recursiveFunctionCalls = do- m `shouldBe` defaultModule- { moduleName = "exampleModule"- , moduleDefinitions =- [ GlobalDefinition functionDefaults- { returnType = AST.i32- , name = Name "f"- , parameters = ([Parameter AST.i32 "a" []], False)- , basicBlocks =- [ BasicBlock (Name "entry")- [ UnName 0 := Call- { tailCallKind = Nothing- , callingConvention = CC.C- , returnAttributes = []- , I.function =- Right (ConstantOperand (C.GlobalReference (AST.ptr (FunctionType AST.i32 [AST.i32] False)) (Name "f")))- , arguments = [(LocalReference (IntegerType {typeBits = 32}) (Name "a"),[])]- , functionAttributes = []- , metadata = []- }- ]- (Do (Ret (Just (LocalReference AST.i32 (UnName 0))) []))- ]- }- ]- }- where- m = buildModule "exampleModule" $ mdo- f <- function "f" [(AST.i32, "a")] AST.i32 $ \[a] -> mdo- entry <- block `named` "entry"; do- c <- call f [(a, [])]- ret c- pure ()--callWorksWithConstantGlobals = do- funcCall `shouldBe` defaultModule- { moduleName = "exampleModule"- , moduleDefinitions =- [ GlobalDefinition functionDefaults {- returnType = AST.ptr AST.i8,- name = Name "malloc",- parameters = ([Parameter (IntegerType {typeBits = 64}) (Name "") []],False),- basicBlocks = []- }- , GlobalDefinition functionDefaults {- returnType = VoidType,- name = Name "omg",- parameters = ([],False),- basicBlocks = [- BasicBlock (UnName 1) [- UnName 0 := Call { tailCallKind = Nothing- , I.function = Right (- ConstantOperand (- C.GlobalReference- (AST.ptr $ FunctionType {resultType = AST.ptr $ IntegerType {typeBits = 8}, argumentTypes = [IntegerType {typeBits = 64}], isVarArg = False})- (Name "malloc")- )- )- , callingConvention = CC.C- , returnAttributes = []- , arguments = [(ConstantOperand (C.Int {C.integerBits = 64, C.integerValue = 10}),[])]- , functionAttributes = []- , metadata = []- }- ]- (Do (Unreachable {metadata' = []}))- ]- }- ]- }--simple :: Module-simple = buildModule "exampleModule" $ mdo-- function "add" [(AST.i32, "a"), (AST.i32, "b")] AST.i32 $ \[a, b] -> mdo-- entry <- block `named` "entry"; do- c <- add a b- ret c--example :: Module-example = mkModule $ execModuleBuilder emptyModuleBuilder $ mdo-- foo <- function "foo" [] AST.double $ \_ -> mdo- xxx <- fadd c1 c1 `named` "xxx"-- blk1 <- block `named` "blk"; do- a <- fadd c1 c1- b <- fadd a a- c <- add c2 c2- br blk2-- blk2 <- block `named` "blk"; do- a <- fadd c1 c1 `named` "c"- b <- fadd a a- br blk3-- blk3 <- block `named` "blk"; do- l <- phi [(c1, blk1), (c1, blk2), (c1, blk3)] `named` "phi"- a <- fadd c1 c1- b <- fadd a a- retVoid-- pure ()--- function "bar" [] AST.double $ \_ -> mdo-- blk3 <- block; do- a <- fadd c1 c1- b <- fadd a a- retVoid-- pure ()-- function "baz" [(AST.i32, NoParameterName), (AST.double, "arg"), (AST.i32, NoParameterName), (AST.double, "arg")] AST.double $ \[rrr, arg, arg2, arg3] -> mdo-- switch arg2 blk1 [(C.Int 32 0, blk2), (C.Int 32 1, blk3)]-- blk1 <- block; do- br blk2-- blk2 <- block; do- a <- fadd arg c1 `named` "arg"- b <- fadd a a- select (cons $ C.Int 1 0) a b- retVoid-- blk3 <- block; do- let nul = cons $ C.Null $ AST.ptr $ AST.ptr $ AST.ptr $ IntegerType 32- addr <- gep nul [cons $ C.Int 32 10, cons $ C.Int 32 20, cons $ C.Int 32 30]- addr' <- gep addr [cons $ C.Int 32 40]- retVoid-- pure ()- where- mkModule ds = defaultModule { moduleName = "exampleModule", moduleDefinitions = ds }- cons = ConstantOperand--funcCall :: Module-funcCall = mkModule $ execModuleBuilder emptyModuleBuilder $ mdo- extern "malloc" [AST.i64] (AST.ptr AST.i8)-- let mallocTy = AST.ptr $ AST.FunctionType (AST.ptr AST.i8) [AST.i64] False-- function "omg" [] (AST.void) $ \_ -> do- size <- int64 10- call (ConstantOperand $ C.GlobalReference mallocTy "malloc") [(size, [])]- unreachable- where- mkModule ds = defaultModule { moduleName = "exampleModule", moduleDefinitions = ds }--c1 :: Operand-c1 = ConstantOperand $ C.Float (F.Double 10)--c2 :: Operand-c2 = ConstantOperand $ C.Int 32 10
+ test/LLVM/Test/IRBuilder.hs view
@@ -0,0 +1,329 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecursiveDo #-}+module LLVM.Test.IRBuilder+ ( tests+ ) where++import Test.Tasty+import Test.Tasty.HUnit++import LLVM.AST hiding (function)+import qualified LLVM.AST.Constant as C+import qualified LLVM.AST.Float as F+import LLVM.AST.Global (basicBlocks, name, parameters, returnType)+import qualified LLVM.AST.Type as AST+import qualified LLVM.AST.CallingConvention as CC+import qualified LLVM.AST.Instruction as I (function)+import LLVM.IRBuilder++tests :: TestTree+tests =+ testGroup "IRBuilder" [+ testGroup "module builder"+ [ testCase "builds the simple module" $+ simple @?=+ defaultModule {+ moduleName = "exampleModule",+ moduleDefinitions =+ [ GlobalDefinition functionDefaults {+ name = "add",+ parameters =+ ( [ Parameter AST.i32 "a" []+ , Parameter AST.i32 "b" []+ ]+ , False+ ),+ returnType = AST.i32,+ basicBlocks =+ [ BasicBlock+ "entry"+ [ UnName 0 := Add {+ operand0 = LocalReference AST.i32 "a",+ operand1 = LocalReference AST.i32 "b",+ nsw = False,+ nuw = False,+ metadata = []+ }+ ]+ (Do (Ret (Just (LocalReference AST.i32 (UnName 0))) []))+ ]+ }+ ]+ }+ , testCase "calls constant globals" callWorksWithConstantGlobals+ , testCase "supports recursive function calls" recursiveFunctionCalls+ , testCase "builds the example" $ do+ let f10 = ConstantOperand (C.Float (F.Double 10))+ fadd a b = FAdd { operand0 = a, operand1 = b, fastMathFlags = noFastMathFlags, metadata = [] }+ add a b = Add { operand0 = a, operand1 = b, nsw = False, nuw = False, metadata = [] }+ example @?=+ defaultModule {+ moduleName = "exampleModule",+ moduleDefinitions =+ [ GlobalDefinition functionDefaults {+ name = "foo",+ returnType = AST.double,+ basicBlocks =+ [ BasicBlock (UnName 0) [ "xxx" := fadd f10 f10]+ (Do (Ret Nothing []))+ , BasicBlock+ "blk"+ [ UnName 1 := fadd f10 f10+ , UnName 2 := fadd (LocalReference AST.double (UnName 1)) (LocalReference AST.double (UnName 1))+ , UnName 3 := add (ConstantOperand (C.Int 32 10)) (ConstantOperand (C.Int 32 10))+ ]+ (Do (Br "blk1" []))+ , BasicBlock+ "blk1"+ [ "c" := fadd f10 f10+ , UnName 4 := fadd (LocalReference AST.double "c") (LocalReference AST.double "c")+ ]+ (Do (Br "blk2" []))+ , BasicBlock+ "blk2"+ [ "phi" :=+ Phi+ AST.double+ [ ( f10, "blk" )+ , ( f10, "blk1" )+ , ( f10, "blk2" )+ ]+ []+ , UnName 5 := fadd f10 f10+ , UnName 6 := fadd (LocalReference AST.double (UnName 5)) (LocalReference AST.double (UnName 5))+ ]+ (Do (Ret Nothing []))+ ]+ }+ , GlobalDefinition functionDefaults {+ name = "bar",+ returnType = AST.double,+ basicBlocks =+ [ BasicBlock+ (UnName 0)+ [ UnName 1 := fadd f10 f10+ , UnName 2 := fadd (LocalReference AST.double (UnName 1)) (LocalReference AST.double (UnName 1))+ ]+ (Do (Ret Nothing []))+ ]+ }+ , GlobalDefinition functionDefaults {+ name = "baz",+ parameters =+ ( [ Parameter AST.i32 (UnName 0) []+ , Parameter AST.double "arg" []+ , Parameter AST.i32 (UnName 1) []+ , Parameter AST.double "arg1" []]+ , False),+ returnType = AST.double,+ basicBlocks =+ [ BasicBlock+ (UnName 2)+ []+ (Do+ (Switch+ (LocalReference AST.i32 (UnName 1))+ (UnName 3)+ [ ( C.Int 32 0, UnName 4), ( C.Int 32 1, UnName 7) ] []))+ , BasicBlock+ (UnName 3)+ []+ (Do (Br (UnName 4) []))+ , BasicBlock+ (UnName 4)+ [ "arg2" := fadd (LocalReference AST.double "arg") f10+ , UnName 5 := fadd (LocalReference AST.double "arg2") (LocalReference AST.double "arg2")+ , UnName 6 := Select {+ condition' = ConstantOperand (C.Int 1 0),+ trueValue = LocalReference AST.double "arg2",+ falseValue = LocalReference AST.double (UnName 5),+ metadata = []+ }+ ]+ (Do (Ret Nothing []))+ , BasicBlock+ (UnName 7)+ [ UnName 8 := GetElementPtr {+ inBounds = False,+ address = ConstantOperand (C.Null (AST.ptr (AST.ptr (AST.ptr AST.i32)))),+ indices =+ [ ConstantOperand (C.Int 32 10)+ , ConstantOperand (C.Int 32 20)+ , ConstantOperand (C.Int 32 30)+ ],+ metadata = []+ }+ , UnName 9 := GetElementPtr {+ inBounds = False,+ address = LocalReference (AST.ptr AST.i32) (UnName 8),+ indices = [ ConstantOperand (C.Int 32 40) ],+ metadata = []+ }+ ]+ (Do (Ret Nothing []))+ ]+ }+ ]+ }+ ]+ ]++recursiveFunctionCalls :: Assertion+recursiveFunctionCalls = do+ m @?= defaultModule+ { moduleName = "exampleModule"+ , moduleDefinitions =+ [ GlobalDefinition functionDefaults+ { returnType = AST.i32+ , name = Name "f"+ , parameters = ([Parameter AST.i32 "a" []], False)+ , basicBlocks =+ [ BasicBlock (Name "entry")+ [ UnName 0 := Call+ { tailCallKind = Nothing+ , callingConvention = CC.C+ , returnAttributes = []+ , I.function =+ Right (ConstantOperand (C.GlobalReference (AST.ptr (FunctionType AST.i32 [AST.i32] False)) (Name "f")))+ , arguments = [(LocalReference (IntegerType {typeBits = 32}) (Name "a"),[])]+ , functionAttributes = []+ , metadata = []+ }+ ]+ (Do (Ret (Just (LocalReference AST.i32 (UnName 0))) []))+ ]+ }+ ]+ }+ where+ m = buildModule "exampleModule" $ mdo+ f <- function "f" [(AST.i32, "a")] AST.i32 $ \[a] -> mdo+ entry <- block `named` "entry"; do+ c <- call f [(a, [])]+ ret c+ pure ()++callWorksWithConstantGlobals :: Assertion+callWorksWithConstantGlobals = do+ funcCall @?= defaultModule+ { moduleName = "exampleModule"+ , moduleDefinitions =+ [ GlobalDefinition functionDefaults {+ returnType = AST.ptr AST.i8,+ name = Name "malloc",+ parameters = ([Parameter (IntegerType {typeBits = 64}) (Name "") []],False),+ basicBlocks = []+ }+ , GlobalDefinition functionDefaults {+ returnType = VoidType,+ name = Name "omg",+ parameters = ([],False),+ basicBlocks = [+ BasicBlock (UnName 0) [+ UnName 1 := Call { tailCallKind = Nothing+ , I.function = Right (+ ConstantOperand (+ C.GlobalReference+ (AST.ptr $ FunctionType {resultType = AST.ptr $ IntegerType {typeBits = 8}, argumentTypes = [IntegerType {typeBits = 64}], isVarArg = False})+ (Name "malloc")+ )+ )+ , callingConvention = CC.C+ , returnAttributes = []+ , arguments = [(ConstantOperand (C.Int {C.integerBits = 64, C.integerValue = 10}),[])]+ , functionAttributes = []+ , metadata = []+ }+ ]+ (Do (Unreachable {metadata' = []}))+ ]+ }+ ]+ }++simple :: Module+simple = buildModule "exampleModule" $ mdo++ function "add" [(AST.i32, "a"), (AST.i32, "b")] AST.i32 $ \[a, b] -> mdo++ entry <- block `named` "entry"; do+ c <- add a b+ ret c++example :: Module+example = mkModule $ execModuleBuilder emptyModuleBuilder $ mdo++ foo <- function "foo" [] AST.double $ \_ -> mdo+ xxx <- fadd c1 c1 `named` "xxx"++ blk1 <- block `named` "blk"; do+ a <- fadd c1 c1+ b <- fadd a a+ c <- add c2 c2+ br blk2++ blk2 <- block `named` "blk"; do+ a <- fadd c1 c1 `named` "c"+ b <- fadd a a+ br blk3++ blk3 <- block `named` "blk"; do+ l <- phi [(c1, blk1), (c1, blk2), (c1, blk3)] `named` "phi"+ a <- fadd c1 c1+ b <- fadd a a+ retVoid++ pure ()+++ function "bar" [] AST.double $ \_ -> mdo++ blk3 <- block; do+ a <- fadd c1 c1+ b <- fadd a a+ retVoid++ pure ()++ function "baz" [(AST.i32, NoParameterName), (AST.double, "arg"), (AST.i32, NoParameterName), (AST.double, "arg")] AST.double $ \[rrr, arg, arg2, arg3] -> mdo++ switch arg2 blk1 [(C.Int 32 0, blk2), (C.Int 32 1, blk3)]++ blk1 <- block; do+ br blk2++ blk2 <- block; do+ a <- fadd arg c1 `named` "arg"+ b <- fadd a a+ select (cons $ C.Int 1 0) a b+ retVoid++ blk3 <- block; do+ let nul = cons $ C.Null $ AST.ptr $ AST.ptr $ AST.ptr $ IntegerType 32+ addr <- gep nul [cons $ C.Int 32 10, cons $ C.Int 32 20, cons $ C.Int 32 30]+ addr' <- gep addr [cons $ C.Int 32 40]+ retVoid++ pure ()+ where+ mkModule ds = defaultModule { moduleName = "exampleModule", moduleDefinitions = ds }+ cons = ConstantOperand++funcCall :: Module+funcCall = mkModule $ execModuleBuilder emptyModuleBuilder $ mdo+ extern "malloc" [AST.i64] (AST.ptr AST.i8)++ let mallocTy = AST.ptr $ AST.FunctionType (AST.ptr AST.i8) [AST.i64] False++ function "omg" [] (AST.void) $ \_ -> do+ size <- int64 10+ call (ConstantOperand $ C.GlobalReference mallocTy "malloc") [(size, [])]+ unreachable+ where+ mkModule ds = defaultModule { moduleName = "exampleModule", moduleDefinitions = ds }++c1 :: Operand+c1 = ConstantOperand $ C.Float (F.Double 10)++c2 :: Operand+c2 = ConstantOperand $ C.Int 32 10
test/LLVM/Test/Tests.hs view
@@ -3,7 +3,9 @@ import Test.Tasty import qualified LLVM.Test.DataLayout as DataLayout+import qualified LLVM.Test.IRBuilder as IRBuilder -tests = testGroup "llvm-hs" [- DataLayout.tests+tests = testGroup "llvm-hs"+ [ DataLayout.tests+ , IRBuilder.tests ]