Portability | requires GHC 6.8, LLVM |
---|---|
Stability | experimental |
Maintainer | bos@serpentine.com |
Safe Haskell | Safe |
This module provides direct access to the LLVM C bindings.
- initializeCore :: PassRegistryRef -> IO ()
- newtype Bool = Bool Int32
- false :: Bool
- true :: Bool
- consBool :: Bool -> Bool
- deconsBool :: Bool -> Bool
- disposeMessage :: CString -> IO ()
- data Context
- type ContextRef = Ptr Context
- contextCreate :: IO ContextRef
- contextDispose :: ContextRef -> IO ()
- getGlobalContext :: IO ContextRef
- getMDKindID :: CString -> CUInt -> IO CUInt
- getMDKindIDInContext :: ContextRef -> CString -> CUInt -> IO CUInt
- data Module
- type ModuleRef = Ptr Module
- moduleCreateWithName :: CString -> IO ModuleRef
- moduleCreateWithNameInContext :: CString -> IO ModuleRef
- disposeModule :: ModuleRef -> IO ()
- ptrDisposeModule :: FunPtr (ModuleRef -> IO ())
- getDataLayout :: ModuleRef -> IO CString
- setDataLayout :: ModuleRef -> CString -> IO ()
- getTarget :: ModuleRef -> IO CString
- setTarget :: ModuleRef -> CString -> IO ()
- defaultTargetTriple :: String
- hostTriple :: String
- dumpModule :: ModuleRef -> IO ()
- setModuleInlineAsm :: ModuleRef -> CString -> IO ()
- getModuleContext :: ModuleRef -> IO ContextRef
- data Type
- type TypeRef = Ptr Type
- data TypeKind
- getTypeKind :: TypeRef -> IO TypeKind
- typeIsSized :: TypeRef -> IO Bool
- getTypeContext :: TypeRef -> IO ContextRef
- int1TypeInContext :: ContextRef -> IO TypeRef
- int8TypeInContext :: ContextRef -> IO TypeRef
- int16TypeInContext :: ContextRef -> IO TypeRef
- int32TypeInContext :: ContextRef -> IO TypeRef
- int64TypeInContext :: ContextRef -> IO TypeRef
- intTypeInContext :: ContextRef -> CUInt -> IO TypeRef
- int1Type :: IO TypeRef
- int8Type :: IO TypeRef
- int16Type :: IO TypeRef
- int32Type :: IO TypeRef
- int64Type :: IO TypeRef
- integerType :: CUInt -> IO TypeRef
- getIntTypeWidth :: TypeRef -> IO CUInt
- floatTypeInContext :: ContextRef -> IO TypeRef
- doubleTypeInContext :: ContextRef -> IO TypeRef
- x86FP80TypeInContext :: ContextRef -> IO TypeRef
- fP128TypeInContext :: ContextRef -> IO TypeRef
- pPCFP128TypeInContext :: ContextRef -> IO TypeRef
- floatType :: IO TypeRef
- doubleType :: IO TypeRef
- x86FP80Type :: IO TypeRef
- fP128Type :: IO TypeRef
- pPCFP128Type :: IO TypeRef
- functionType :: TypeRef -> Ptr TypeRef -> CUInt -> Bool -> IO TypeRef
- isFunctionVarArg :: TypeRef -> IO Bool
- getReturnType :: TypeRef -> IO TypeRef
- countParamTypes :: TypeRef -> IO CUInt
- getParamTypes :: TypeRef -> Ptr TypeRef -> IO ()
- structTypeInContext :: ContextRef -> Ptr TypeRef -> CUInt -> Bool -> IO TypeRef
- structType :: Ptr TypeRef -> CUInt -> Bool -> IO TypeRef
- structCreateNamed :: ContextRef -> CString -> IO TypeRef
- getStructName :: TypeRef -> IO CString
- structSetBody :: TypeRef -> Ptr TypeRef -> CUInt -> Bool -> IO ()
- countStructElementTypes :: TypeRef -> IO CUInt
- getStructElementTypes :: TypeRef -> Ptr TypeRef -> IO ()
- isPackedStruct :: TypeRef -> IO Bool
- isOpaqueStruct :: TypeRef -> IO Bool
- getTypeByName :: ModuleRef -> CString -> IO TypeRef
- arrayType :: TypeRef -> CUInt -> IO TypeRef
- pointerType :: TypeRef -> CUInt -> IO TypeRef
- vectorType :: TypeRef -> CUInt -> IO TypeRef
- getElementType :: TypeRef -> IO TypeRef
- getArrayLength :: TypeRef -> IO CUInt
- getPointerAddressSpace :: TypeRef -> IO CUInt
- getVectorSize :: TypeRef -> IO CUInt
- voidTypeInContext :: ContextRef -> IO TypeRef
- labelTypeInContext :: ContextRef -> IO TypeRef
- x86MMXTypeInContext :: ContextRef -> IO TypeRef
- voidType :: IO TypeRef
- labelType :: IO TypeRef
- x86MMXType :: IO TypeRef
- data Value
- type ValueRef = Ptr Value
- typeOf :: ValueRef -> IO TypeRef
- getValueName :: ValueRef -> IO CString
- setValueName :: ValueRef -> CString -> IO ()
- dumpValue :: ValueRef -> IO ()
- replaceAllUsesWith :: ValueRef -> ValueRef -> IO ()
- hasMetadata :: ValueRef -> IO Bool
- getMetadata :: ValueRef -> CUInt -> IO ValueRef
- setMetadata :: ValueRef -> CUInt -> ValueRef -> IO ()
- data OpaqueUse
- type UseRef = Ptr OpaqueUse
- getFirstUse :: ValueRef -> IO UseRef
- getNextUse :: UseRef -> IO UseRef
- getUser :: UseRef -> IO ValueRef
- getUsedValue :: UseRef -> IO ValueRef
- getOperand :: ValueRef -> CUInt -> IO ValueRef
- setOperand :: ValueRef -> CUInt -> ValueRef -> IO ()
- getNumOperands :: ValueRef -> IO CUInt
- constNull :: TypeRef -> IO ValueRef
- constAllOnes :: TypeRef -> IO ValueRef
- getUndef :: TypeRef -> IO ValueRef
- isConstant :: ValueRef -> IO Bool
- isNull :: ValueRef -> IO Bool
- isUndef :: ValueRef -> IO Bool
- constPointerNull :: TypeRef -> IO ValueRef
- mDStringInContext :: ContextRef -> CString -> CUInt -> IO ValueRef
- mDString :: CString -> CUInt -> IO ValueRef
- mDNodeInContext :: ContextRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- mDNode :: Ptr ValueRef -> CUInt -> IO ValueRef
- getMDString :: ValueRef -> Ptr CUInt -> IO CString
- getNamedMetadataNumOperands :: ModuleRef -> CString -> IO CUInt
- getNamedMetadataOperands :: ModuleRef -> CString -> Ptr ValueRef -> IO ()
- constInt :: TypeRef -> CULLong -> Bool -> IO ValueRef
- constIntOfArbitraryPrecision :: TypeRef -> CUInt -> Ptr CULLong -> IO ValueRef
- constIntOfString :: TypeRef -> CString -> CUInt -> IO ValueRef
- constIntOfStringAndSize :: TypeRef -> CString -> CUInt -> CUInt -> IO ValueRef
- constReal :: TypeRef -> CDouble -> IO ValueRef
- constRealOfString :: TypeRef -> CString -> IO ValueRef
- constRealOfStringAndSize :: TypeRef -> CString -> CUInt -> IO ValueRef
- constIntGetZExtValue :: ValueRef -> IO CULLong
- constIntGetSExtValue :: ValueRef -> IO CLLong
- constStringInContext :: ContextRef -> CString -> CUInt -> Bool -> IO ValueRef
- constStructInContext :: ContextRef -> Ptr ValueRef -> CUInt -> Bool -> IO ValueRef
- constString :: CString -> CUInt -> Bool -> IO ValueRef
- constArray :: TypeRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- constStruct :: Ptr ValueRef -> CUInt -> Bool -> IO ValueRef
- constNamedStruct :: TypeRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- constVector :: Ptr ValueRef -> CUInt -> IO ValueRef
- getConstOpcode :: ValueRef -> IO CUInt
- alignOf :: TypeRef -> IO ValueRef
- sizeOf :: TypeRef -> IO ValueRef
- constNeg :: ValueRef -> IO ValueRef
- constNUWNeg :: ValueRef -> IO ValueRef
- constNSWNeg :: ValueRef -> IO ValueRef
- constFNeg :: ValueRef -> IO ValueRef
- constNot :: ValueRef -> IO ValueRef
- constAdd :: ValueRef -> ValueRef -> IO ValueRef
- constNSWAdd :: ValueRef -> ValueRef -> IO ValueRef
- constNUWAdd :: ValueRef -> ValueRef -> IO ValueRef
- constFAdd :: ValueRef -> ValueRef -> IO ValueRef
- constSub :: ValueRef -> ValueRef -> IO ValueRef
- constNSWSub :: ValueRef -> ValueRef -> IO ValueRef
- constNUWSub :: ValueRef -> ValueRef -> IO ValueRef
- constFSub :: ValueRef -> ValueRef -> IO ValueRef
- constMul :: ValueRef -> ValueRef -> IO ValueRef
- constNSWMul :: ValueRef -> ValueRef -> IO ValueRef
- constNUWMul :: ValueRef -> ValueRef -> IO ValueRef
- constFMul :: ValueRef -> ValueRef -> IO ValueRef
- constUDiv :: ValueRef -> ValueRef -> IO ValueRef
- constSDiv :: ValueRef -> ValueRef -> IO ValueRef
- constExactSDiv :: ValueRef -> ValueRef -> IO ValueRef
- constFDiv :: ValueRef -> ValueRef -> IO ValueRef
- constURem :: ValueRef -> ValueRef -> IO ValueRef
- constSRem :: ValueRef -> ValueRef -> IO ValueRef
- constFRem :: ValueRef -> ValueRef -> IO ValueRef
- constAnd :: ValueRef -> ValueRef -> IO ValueRef
- constOr :: ValueRef -> ValueRef -> IO ValueRef
- constXor :: ValueRef -> ValueRef -> IO ValueRef
- constICmp :: CInt -> ValueRef -> ValueRef -> IO ValueRef
- constFCmp :: CInt -> ValueRef -> ValueRef -> IO ValueRef
- constShl :: ValueRef -> ValueRef -> IO ValueRef
- constLShr :: ValueRef -> ValueRef -> IO ValueRef
- constAShr :: ValueRef -> ValueRef -> IO ValueRef
- constGEP :: ValueRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- constInBoundsGEP :: ValueRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- constTrunc :: ValueRef -> TypeRef -> IO ValueRef
- constSExt :: ValueRef -> TypeRef -> IO ValueRef
- constZExt :: ValueRef -> TypeRef -> IO ValueRef
- constFPTrunc :: ValueRef -> TypeRef -> IO ValueRef
- constFPExt :: ValueRef -> TypeRef -> IO ValueRef
- constUIToFP :: ValueRef -> TypeRef -> IO ValueRef
- constSIToFP :: ValueRef -> TypeRef -> IO ValueRef
- constFPToUI :: ValueRef -> TypeRef -> IO ValueRef
- constFPToSI :: ValueRef -> TypeRef -> IO ValueRef
- constPtrToInt :: ValueRef -> TypeRef -> IO ValueRef
- constIntToPtr :: ValueRef -> TypeRef -> IO ValueRef
- constBitCast :: ValueRef -> TypeRef -> IO ValueRef
- constZExtOrBitCast :: ValueRef -> TypeRef -> IO ValueRef
- constSExtOrBitCast :: ValueRef -> TypeRef -> IO ValueRef
- constTruncOrBitCast :: ValueRef -> TypeRef -> IO ValueRef
- constPointerCast :: ValueRef -> TypeRef -> IO ValueRef
- constIntCast :: ValueRef -> TypeRef -> CUInt -> IO ValueRef
- constFPCast :: ValueRef -> TypeRef -> IO ValueRef
- constSelect :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
- constExtractElement :: ValueRef -> ValueRef -> IO ValueRef
- constInsertElement :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
- constShuffleVector :: ValueRef -> ValueRef -> ValueRef -> IO ValueRef
- constExtractValue :: ValueRef -> Ptr CUInt -> CUInt -> IO ValueRef
- constInsertValue :: ValueRef -> ValueRef -> Ptr CUInt -> CUInt -> IO ValueRef
- constInlineAsm :: TypeRef -> CString -> CString -> Bool -> Bool -> IO ValueRef
- blockAddress :: ValueRef -> BasicBlockRef -> IO ValueRef
- setHasUnsafeAlgebra :: ValueRef -> CUInt -> IO ()
- setHasNoNaNs :: ValueRef -> CUInt -> IO ()
- setHasNoInfs :: ValueRef -> CUInt -> IO ()
- setHasNoSignedZeros :: ValueRef -> CUInt -> IO ()
- setHasAllowReciprocal :: ValueRef -> CUInt -> IO ()
- data FastMathFlags
- = NoNaNs
- | NoInfs
- | NoSignedZeros
- | AllowReciprocal
- | UnsafeAlgebra
- type FastMathFlagSet = T CUInt FastMathFlags
- noNaNs :: FastMathFlagSet
- noInfs :: FastMathFlagSet
- noSignedZeros :: FastMathFlagSet
- allowReciprocal :: FastMathFlagSet
- unsafeAlgebra :: FastMathFlagSet
- setFastMathFlags :: ValueRef -> FastMathFlagSet -> IO ()
- data Linkage
- = ExternalLinkage
- | AvailableExternallyLinkage
- | LinkOnceAnyLinkage
- | LinkOnceODRLinkage
- | LinkOnceODRAutoHideLinkage
- | WeakAnyLinkage
- | WeakODRLinkage
- | AppendingLinkage
- | InternalLinkage
- | PrivateLinkage
- | DLLImportLinkage
- | DLLExportLinkage
- | ExternalWeakLinkage
- | GhostLinkage
- | CommonLinkage
- | LinkerPrivateLinkage
- | LinkerPrivateWeakLinkage
- fromLinkage :: Linkage -> CUInt
- toLinkage :: CUInt -> Linkage
- data Visibility
- fromVisibility :: Visibility -> CUInt
- toVisibility :: CUInt -> Visibility
- getGlobalParent :: ValueRef -> IO ModuleRef
- isDeclaration :: ValueRef -> IO Bool
- getLinkage :: ValueRef -> IO CUInt
- setLinkage :: ValueRef -> CUInt -> IO ()
- getSection :: ValueRef -> IO CString
- setSection :: ValueRef -> CString -> IO ()
- getVisibility :: ValueRef -> IO CUInt
- setVisibility :: ValueRef -> CUInt -> IO ()
- getAlignment :: ValueRef -> IO CUInt
- setAlignment :: ValueRef -> CUInt -> IO ()
- addGlobal :: ModuleRef -> TypeRef -> CString -> IO ValueRef
- addGlobalInAddressSpace :: ModuleRef -> TypeRef -> CString -> CUInt -> IO ValueRef
- getNamedGlobal :: ModuleRef -> CString -> IO ValueRef
- getFirstGlobal :: ModuleRef -> IO ValueRef
- getLastGlobal :: ModuleRef -> IO ValueRef
- getNextGlobal :: ValueRef -> IO ValueRef
- getPreviousGlobal :: ValueRef -> IO ValueRef
- deleteGlobal :: ValueRef -> IO ()
- getInitializer :: ValueRef -> IO ValueRef
- setInitializer :: ValueRef -> ValueRef -> IO ()
- isThreadLocal :: ValueRef -> IO Bool
- setThreadLocal :: ValueRef -> Bool -> IO ()
- isGlobalConstant :: ValueRef -> IO Bool
- setGlobalConstant :: ValueRef -> Bool -> IO ()
- addAlias :: ModuleRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
- data Attribute
- = ZExtAttribute
- | SExtAttribute
- | NoReturnAttribute
- | InRegAttribute
- | StructRetAttribute
- | NoUnwindAttribute
- | NoAliasAttribute
- | ByValAttribute
- | NestAttribute
- | ReadNoneAttribute
- | ReadOnlyAttribute
- | NoInlineAttribute
- | AlwaysInlineAttribute
- | OptimizeForSizeAttribute
- | StackProtectAttribute
- | StackProtectReqAttribute
- | NoCaptureAttribute
- | NoRedZoneAttribute
- | NoImplicitFloatAttribute
- | NakedAttribute
- fromAttribute :: Attribute -> CAttribute
- toAttribute :: CAttribute -> Attribute
- data CallingConvention
- = C
- | Fast
- | Cold
- | X86StdCall
- | X86FastCall
- | GHC
- fromCallingConvention :: CallingConvention -> CUInt
- toCallingConvention :: CUInt -> CallingConvention
- addFunction :: ModuleRef -> CString -> TypeRef -> IO ValueRef
- getNamedFunction :: ModuleRef -> CString -> IO ValueRef
- getFirstFunction :: ModuleRef -> IO ValueRef
- getLastFunction :: ModuleRef -> IO ValueRef
- getNextFunction :: ValueRef -> IO ValueRef
- getPreviousFunction :: ValueRef -> IO ValueRef
- deleteFunction :: ValueRef -> IO ()
- getIntrinsicID :: ValueRef -> IO CUInt
- getFunctionCallConv :: ValueRef -> IO CUInt
- setFunctionCallConv :: ValueRef -> CUInt -> IO ()
- getGC :: ValueRef -> IO CString
- setGC :: ValueRef -> CString -> IO ()
- addFunctionAttr :: ValueRef -> CAttribute -> IO ()
- getFunctionAttr :: ValueRef -> IO CUInt
- removeFunctionAttr :: ValueRef -> CAttribute -> IO ()
- countParams :: ValueRef -> IO CUInt
- getParams :: ValueRef -> Ptr ValueRef -> IO ()
- getParam :: ValueRef -> CUInt -> IO ValueRef
- getParamParent :: ValueRef -> IO ValueRef
- getFirstParam :: ValueRef -> IO ValueRef
- getLastParam :: ValueRef -> IO ValueRef
- getNextParam :: ValueRef -> IO ValueRef
- getPreviousParam :: ValueRef -> IO ValueRef
- addAttribute :: ValueRef -> CAttribute -> IO ()
- removeAttribute :: ValueRef -> CAttribute -> IO ()
- getAttribute :: ValueRef -> IO CUInt
- setParamAlignment :: ValueRef -> CUInt -> IO ()
- type BasicBlock = Value
- type BasicBlockRef = Ptr BasicBlock
- basicBlockAsValue :: BasicBlockRef -> IO ValueRef
- valueIsBasicBlock :: ValueRef -> IO Bool
- valueAsBasicBlock :: ValueRef -> IO BasicBlockRef
- getBasicBlockParent :: BasicBlockRef -> IO ValueRef
- getBasicBlockTerminator :: BasicBlockRef -> IO ValueRef
- countBasicBlocks :: ValueRef -> IO CUInt
- getBasicBlocks :: ValueRef -> Ptr BasicBlockRef -> IO ()
- getFirstBasicBlock :: ValueRef -> IO BasicBlockRef
- getLastBasicBlock :: ValueRef -> IO BasicBlockRef
- getNextBasicBlock :: BasicBlockRef -> IO BasicBlockRef
- getPreviousBasicBlock :: BasicBlockRef -> IO BasicBlockRef
- getEntryBasicBlock :: ValueRef -> IO BasicBlockRef
- appendBasicBlockInContext :: ContextRef -> ValueRef -> CString -> IO BasicBlockRef
- insertBasicBlockInContext :: ContextRef -> BasicBlockRef -> CString -> IO BasicBlockRef
- appendBasicBlock :: ValueRef -> CString -> IO BasicBlockRef
- insertBasicBlock :: BasicBlockRef -> CString -> IO BasicBlockRef
- deleteBasicBlock :: BasicBlockRef -> IO ()
- removeBasicBlockFromParent :: BasicBlockRef -> IO ()
- moveBasicBlockBefore :: BasicBlockRef -> BasicBlockRef -> IO ()
- moveBasicBlockAfter :: BasicBlockRef -> BasicBlockRef -> IO ()
- getFirstInstruction :: BasicBlockRef -> IO ValueRef
- getLastInstruction :: BasicBlockRef -> IO ValueRef
- getInstructionParent :: ValueRef -> IO BasicBlockRef
- getNextInstruction :: ValueRef -> IO ValueRef
- getPreviousInstruction :: ValueRef -> IO ValueRef
- instructionEraseFromParent :: ValueRef -> IO ()
- getInstructionOpcode :: ValueRef -> IO Int
- getICmpPredicate :: ValueRef -> IO Int
- getInstructionCallConv :: ValueRef -> IO CUInt
- setInstructionCallConv :: ValueRef -> CUInt -> IO ()
- addInstrAttribute :: ValueRef -> CUInt -> CAttribute -> IO ()
- removeInstrAttribute :: ValueRef -> CUInt -> CAttribute -> IO ()
- setInstrParamAlignment :: ValueRef -> CUInt -> CUInt -> IO ()
- isTailCall :: ValueRef -> IO Bool
- setTailCall :: ValueRef -> Bool -> IO ()
- getSwitchDefaultDest :: ValueRef -> IO BasicBlockRef
- addIncoming :: ValueRef -> Ptr ValueRef -> Ptr ValueRef -> CUInt -> IO ()
- countIncoming :: ValueRef -> IO CUInt
- getIncomingValue :: ValueRef -> CUInt -> IO ValueRef
- getIncomingBlock :: ValueRef -> CUInt -> IO BasicBlockRef
- data Builder
- type BuilderRef = Ptr Builder
- createBuilderInContext :: ContextRef -> IO BuilderRef
- createBuilder :: IO BuilderRef
- positionBuilder :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()
- positionBefore :: BuilderRef -> ValueRef -> IO ()
- positionAtEnd :: BuilderRef -> BasicBlockRef -> IO ()
- getInsertBlock :: BuilderRef -> IO BasicBlockRef
- clearInsertionPosition :: BuilderRef -> IO ()
- insertIntoBuilder :: BuilderRef -> ValueRef -> IO ()
- insertIntoBuilderWithName :: BuilderRef -> ValueRef -> CString -> IO ()
- ptrDisposeBuilder :: FunPtr (BuilderRef -> IO ())
- setCurrentDebugLocation :: BuilderRef -> ValueRef -> IO ()
- getCurrentDebugLocation :: BuilderRef -> IO ValueRef
- setInstDebugLocation :: BuilderRef -> ValueRef -> IO ()
- buildRetVoid :: BuilderRef -> IO ValueRef
- buildRet :: BuilderRef -> ValueRef -> IO ValueRef
- buildAggregateRet :: BuilderRef -> Ptr ValueRef -> CUInt -> IO ValueRef
- buildBr :: BuilderRef -> BasicBlockRef -> IO ValueRef
- buildCondBr :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRef
- buildSwitch :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRef
- buildIndirectBr :: BuilderRef -> ValueRef -> CUInt -> IO ValueRef
- buildInvoke :: BuilderRef -> ValueRef -> Ptr ValueRef -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRef
- buildLandingPad :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRef
- buildResume :: BuilderRef -> ValueRef -> IO ValueRef
- buildUnreachable :: BuilderRef -> IO ValueRef
- addCase :: ValueRef -> ValueRef -> BasicBlockRef -> IO ()
- addDestination :: ValueRef -> BasicBlockRef -> IO ()
- addClause :: ValueRef -> ValueRef -> IO ()
- setCleanup :: ValueRef -> Bool -> IO ()
- buildAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNSWAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNUWAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNSWSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNUWSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNSWMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNUWMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildUDiv :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildSDiv :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildExactSDiv :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFDiv :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildURem :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildSRem :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFRem :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildShl :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildLShr :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildAShr :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildAnd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildOr :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildXor :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildBinOp :: BuilderRef -> CUInt -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildNSWNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildNUWNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildFNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildNot :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildMalloc :: BuilderRef -> TypeRef -> CString -> IO ValueRef
- buildArrayMalloc :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
- buildAlloca :: BuilderRef -> TypeRef -> CString -> IO ValueRef
- buildArrayAlloca :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRef
- buildFree :: BuilderRef -> ValueRef -> IO ValueRef
- buildLoad :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildStore :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRef
- buildGEP :: BuilderRef -> ValueRef -> Ptr ValueRef -> CUInt -> CString -> IO ValueRef
- buildInBoundsGEP :: BuilderRef -> ValueRef -> Ptr ValueRef -> CUInt -> CString -> IO ValueRef
- buildStructGEP :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
- buildGlobalString :: BuilderRef -> CString -> CString -> IO ValueRef
- buildGlobalStringPtr :: BuilderRef -> CString -> CString -> IO ValueRef
- buildTrunc :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildZExt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildSExt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildFPToUI :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildFPToSI :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildUIToFP :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildSIToFP :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildFPTrunc :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildFPExt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildPtrToInt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildIntToPtr :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildZExtOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildSExtOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildTruncOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildCast :: BuilderRef -> CUInt -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildPointerCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildIntCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildFPCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildICmp :: BuilderRef -> CInt -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildFCmp :: BuilderRef -> CInt -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildPhi :: BuilderRef -> TypeRef -> CString -> IO ValueRef
- buildCall :: BuilderRef -> ValueRef -> Ptr ValueRef -> CUInt -> CString -> IO ValueRef
- buildSelect :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildVAArg :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRef
- buildExtractElement :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildInsertElement :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildShuffleVector :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- buildExtractValue :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRef
- buildInsertValue :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRef
- buildIsNull :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildIsNotNull :: BuilderRef -> ValueRef -> CString -> IO ValueRef
- buildPtrDiff :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef
- data MemoryBuffer
- type MemoryBufferRef = Ptr MemoryBuffer
- createMemoryBufferWithContentsOfFile :: CString -> Ptr MemoryBufferRef -> Ptr CString -> IO Bool
- createMemoryBufferWithSTDIN :: Ptr MemoryBufferRef -> Ptr CString -> IO Bool
- disposeMemoryBuffer :: MemoryBufferRef -> IO ()
- data PassRegistry
- type PassRegistryRef = Ptr PassRegistry
- getGlobalPassRegistry :: IO PassRegistryRef
- data PassManager
- type PassManagerRef = Ptr PassManager
- ptrDisposePassManager :: FunPtr (PassManagerRef -> IO ())
- createPassManager :: IO PassManagerRef
- createFunctionPassManagerForModule :: ModuleRef -> IO PassManagerRef
- runPassManager :: PassManagerRef -> ModuleRef -> IO Bool
- initializeFunctionPassManager :: PassManagerRef -> IO Bool
- runFunctionPassManager :: PassManagerRef -> ValueRef -> IO Bool
- finalizeFunctionPassManager :: PassManagerRef -> IO Bool
- disposePassManager :: PassManagerRef -> IO ()
- getNumUses :: ValueRef -> IO CInt
- instGetOpcode :: ValueRef -> IO CInt
- cmpInstGetPredicate :: ValueRef -> IO CInt
Documentation
Boolean values
deconsBool :: Bool -> BoolSource
Error handling
disposeMessage :: CString -> IO ()Source
Context functions
type ContextRef = Ptr ContextSource
contextDispose :: ContextRef -> IO ()Source
getMDKindID :: CString -> CUInt -> IO CUIntSource
getMDKindIDInContext :: ContextRef -> CString -> CUInt -> IO CUIntSource
Modules
disposeModule :: ModuleRef -> IO ()Source
dumpModule :: ModuleRef -> IO ()Source
Types
getTypeKind :: TypeRef -> IO TypeKindSource
typeIsSized :: TypeRef -> IO BoolSource
Integer types
intTypeInContext :: ContextRef -> CUInt -> IO TypeRefSource
integerType :: CUInt -> IO TypeRefSource
getIntTypeWidth :: TypeRef -> IO CUIntSource
Real types
Function types
:: TypeRef | return type |
-> Ptr TypeRef | array of argument types |
-> CUInt | number of elements in array |
-> Bool | non-zero if function is varargs |
-> IO TypeRef |
Create a function type.
isFunctionVarArg :: TypeRef -> IO BoolSource
Indicate whether a function takes varargs.
getReturnType :: TypeRef -> IO TypeRefSource
Give a function's return type.
countParamTypes :: TypeRef -> IO CUIntSource
Give the number of fixed parameters that a function takes.
getParamTypes :: TypeRef -> Ptr TypeRef -> IO ()Source
Fill out an array with the types of a function's fixed parameters.
Struct types
structTypeInContext :: ContextRef -> Ptr TypeRef -> CUInt -> Bool -> IO TypeRefSource
structCreateNamed :: ContextRef -> CString -> IO TypeRefSource
getStructName :: TypeRef -> IO CStringSource
countStructElementTypes :: TypeRef -> IO CUIntSource
isPackedStruct :: TypeRef -> IO BoolSource
isOpaqueStruct :: TypeRef -> IO BoolSource
Array, pointer, and vector types
getElementType :: TypeRef -> IO TypeRefSource
Get the type of a sequential type's elements.
getArrayLength :: TypeRef -> IO CUIntSource
getPointerAddressSpace :: TypeRef -> IO CUIntSource
getVectorSize :: TypeRef -> IO CUIntSource
Other types
Values
getValueName :: ValueRef -> IO CStringSource
hasMetadata :: ValueRef -> IO BoolSource
getMetadata :: ValueRef -> CUInt -> IO ValueRefSource
Uses
getFirstUse :: ValueRef -> IO UseRefSource
getNextUse :: UseRef -> IO UseRefSource
getUsedValue :: UseRef -> IO ValueRefSource
Users
getOperand :: ValueRef -> CUInt -> IO ValueRefSource
getNumOperands :: ValueRef -> IO CUIntSource
Constants
constAllOnes :: TypeRef -> IO ValueRefSource
isConstant :: ValueRef -> IO BoolSource
Metadata
mDStringInContext :: ContextRef -> CString -> CUInt -> IO ValueRefSource
mDNodeInContext :: ContextRef -> Ptr ValueRef -> CUInt -> IO ValueRefSource
getNamedMetadataNumOperands :: ModuleRef -> CString -> IO CUIntSource
Scalar constants
constIntGetZExtValue :: ValueRef -> IO CULLongSource
constIntGetSExtValue :: ValueRef -> IO CLLongSource
Composite constants
constStringInContext :: ContextRef -> CString -> CUInt -> Bool -> IO ValueRefSource
constStructInContext :: ContextRef -> Ptr ValueRef -> CUInt -> Bool -> IO ValueRefSource
Constant Expressions
getConstOpcode :: ValueRef -> IO CUIntSource
constNUWNeg :: ValueRef -> IO ValueRefSource
constNSWNeg :: ValueRef -> IO ValueRefSource
blockAddress :: ValueRef -> BasicBlockRef -> IO ValueRefSource
Floating point attributes
setHasUnsafeAlgebra :: ValueRef -> CUInt -> IO ()Source
setHasNoNaNs :: ValueRef -> CUInt -> IO ()Source
setHasNoInfs :: ValueRef -> CUInt -> IO ()Source
setHasNoSignedZeros :: ValueRef -> CUInt -> IO ()Source
setHasAllowReciprocal :: ValueRef -> CUInt -> IO ()Source
data FastMathFlags Source
type FastMathFlagSet = T CUInt FastMathFlagsSource
setFastMathFlags :: ValueRef -> FastMathFlagSet -> IO ()Source
Support operations and types
An enumeration for the kinds of linkage for global values.
ExternalLinkage | Externally visible function |
AvailableExternallyLinkage | |
LinkOnceAnyLinkage | Keep one copy of function when linking (inline) |
LinkOnceODRLinkage | Same, but only replaced by something equivalent. |
LinkOnceODRAutoHideLinkage | Like LinkOnceODR, but possibly hidden. |
WeakAnyLinkage | Keep one copy of named function when linking (weak) |
WeakODRLinkage | Same, but only replaced by something equivalent. |
AppendingLinkage | Special purpose, only applies to global arrays |
InternalLinkage | Rename collisions when linking (static functions) |
PrivateLinkage | Like Internal, but omit from symbol table |
DLLImportLinkage | Function to be imported from DLL |
DLLExportLinkage | Function to be accessible from DLL |
ExternalWeakLinkage | ExternalWeak linkage description |
GhostLinkage | Stand-in functions for streaming fns from BC files |
CommonLinkage | Tentative definitions |
LinkerPrivateLinkage | Like Private, but linker removes. |
LinkerPrivateWeakLinkage | Like LinkerPrivate, but is weak. |
fromLinkage :: Linkage -> CUIntSource
data Visibility Source
An enumeration for the kinds of visibility of global values.
DefaultVisibility | The GV is visible |
HiddenVisibility | The GV is hidden |
ProtectedVisibility | The GV is protected |
fromVisibility :: Visibility -> CUIntSource
toVisibility :: CUInt -> VisibilitySource
Global variables, functions, and aliases (globals)
isDeclaration :: ValueRef -> IO BoolSource
getLinkage :: ValueRef -> IO CUIntSource
setLinkage :: ValueRef -> CUInt -> IO ()Source
getSection :: ValueRef -> IO CStringSource
getVisibility :: ValueRef -> IO CUIntSource
setVisibility :: ValueRef -> CUInt -> IO ()Source
getAlignment :: ValueRef -> IO CUIntSource
setAlignment :: ValueRef -> CUInt -> IO ()Source
Global variables
deleteGlobal :: ValueRef -> IO ()Source
isThreadLocal :: ValueRef -> IO BoolSource
isGlobalConstant :: ValueRef -> IO BoolSource
Aliases
Parameter passing
fromAttribute :: Attribute -> CAttributeSource
toAttribute :: CAttribute -> AttributeSource
Calling conventions
data CallingConvention Source
fromCallingConvention :: CallingConvention -> CUIntSource
toCallingConvention :: CUInt -> CallingConventionSource
Functions
addFunctionAttr :: ValueRef -> CAttribute -> IO ()Source
getFunctionAttr :: ValueRef -> IO CUIntSource
removeFunctionAttr :: ValueRef -> CAttribute -> IO ()Source
Parameters
getLastParam :: ValueRef -> IO ValueRefSource
getNextParam :: ValueRef -> IO ValueRefSource
addAttribute :: ValueRef -> CAttribute -> IO ()Source
removeAttribute :: ValueRef -> CAttribute -> IO ()Source
getAttribute :: ValueRef -> IO CUIntSource
setParamAlignment :: ValueRef -> CUInt -> IO ()Source
Basic blocks
type BasicBlock = ValueSource
type BasicBlockRef = Ptr BasicBlockSource
:: ValueRef | basic block |
-> IO BasicBlockRef |
:: ValueRef | function |
-> Ptr BasicBlockRef | array to fill out |
-> IO () |
:: ValueRef | function |
-> IO BasicBlockRef |
:: ValueRef | function |
-> CString | name for label |
-> IO BasicBlockRef |
:: BasicBlockRef | insert before this one |
-> CString | name for label |
-> IO BasicBlockRef |
Instructions
getICmpPredicate :: ValueRef -> IO IntSource
Call Sites
getInstructionCallConv :: ValueRef -> IO CUIntSource
setInstructionCallConv :: ValueRef -> CUInt -> IO ()Source
addInstrAttribute :: ValueRef -> CUInt -> CAttribute -> IO ()Source
removeInstrAttribute :: ValueRef -> CUInt -> CAttribute -> IO ()Source
setInstrParamAlignment :: ValueRef -> CUInt -> CUInt -> IO ()Source
Call Instructions (only)
isTailCall :: ValueRef -> IO BoolSource
Switch Instructions (only)
Phi nodes
countIncoming :: ValueRef -> IO CUIntSource
getIncomingValue :: ValueRef -> CUInt -> IO ValueRefSource
getIncomingBlock :: ValueRef -> CUInt -> IO BasicBlockRefSource
Instruction building
type BuilderRef = Ptr BuilderSource
positionBuilder :: BuilderRef -> BasicBlockRef -> ValueRef -> IO ()Source
positionBefore :: BuilderRef -> ValueRef -> IO ()Source
positionAtEnd :: BuilderRef -> BasicBlockRef -> IO ()Source
insertIntoBuilder :: BuilderRef -> ValueRef -> IO ()Source
insertIntoBuilderWithName :: BuilderRef -> ValueRef -> CString -> IO ()Source
ptrDisposeBuilder :: FunPtr (BuilderRef -> IO ())Source
Metadata
setCurrentDebugLocation :: BuilderRef -> ValueRef -> IO ()Source
setInstDebugLocation :: BuilderRef -> ValueRef -> IO ()Source
Terminators
buildAggregateRet :: BuilderRef -> Ptr ValueRef -> CUInt -> IO ValueRefSource
buildBr :: BuilderRef -> BasicBlockRef -> IO ValueRefSource
buildCondBr :: BuilderRef -> ValueRef -> BasicBlockRef -> BasicBlockRef -> IO ValueRefSource
buildSwitch :: BuilderRef -> ValueRef -> BasicBlockRef -> CUInt -> IO ValueRefSource
buildIndirectBr :: BuilderRef -> ValueRef -> CUInt -> IO ValueRefSource
buildInvoke :: BuilderRef -> ValueRef -> Ptr ValueRef -> CUInt -> BasicBlockRef -> BasicBlockRef -> CString -> IO ValueRefSource
buildLandingPad :: BuilderRef -> TypeRef -> ValueRef -> CUInt -> CString -> IO ValueRefSource
buildResume :: BuilderRef -> ValueRef -> IO ValueRefSource
addDestination :: ValueRef -> BasicBlockRef -> IO ()Source
Arithmetic
buildNSWAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildNUWAdd :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildNSWSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildNUWSub :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildNSWMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildNUWMul :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildExactSDiv :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildBinOp :: BuilderRef -> CUInt -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildNSWNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRefSource
buildNUWNeg :: BuilderRef -> ValueRef -> CString -> IO ValueRefSource
Memory
buildMalloc :: BuilderRef -> TypeRef -> CString -> IO ValueRefSource
buildArrayMalloc :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRefSource
buildAlloca :: BuilderRef -> TypeRef -> CString -> IO ValueRefSource
buildArrayAlloca :: BuilderRef -> TypeRef -> ValueRef -> CString -> IO ValueRefSource
buildStore :: BuilderRef -> ValueRef -> ValueRef -> IO ValueRefSource
buildInBoundsGEP :: BuilderRef -> ValueRef -> Ptr ValueRef -> CUInt -> CString -> IO ValueRefSource
buildStructGEP :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRefSource
buildGlobalString :: BuilderRef -> CString -> CString -> IO ValueRefSource
buildGlobalStringPtr :: BuilderRef -> CString -> CString -> IO ValueRefSource
Casts
buildTrunc :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildFPToUI :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildFPToSI :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildUIToFP :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildSIToFP :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildFPTrunc :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildFPExt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildPtrToInt :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildIntToPtr :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildZExtOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildSExtOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildTruncOrBitCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildPointerCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildIntCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildFPCast :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
Comparisons
Miscellaneous instructions
buildSelect :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildVAArg :: BuilderRef -> ValueRef -> TypeRef -> CString -> IO ValueRefSource
buildExtractElement :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildInsertElement :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildShuffleVector :: BuilderRef -> ValueRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
buildExtractValue :: BuilderRef -> ValueRef -> CUInt -> CString -> IO ValueRefSource
buildInsertValue :: BuilderRef -> ValueRef -> ValueRef -> CUInt -> CString -> IO ValueRefSource
buildIsNull :: BuilderRef -> ValueRef -> CString -> IO ValueRefSource
buildIsNotNull :: BuilderRef -> ValueRef -> CString -> IO ValueRefSource
buildPtrDiff :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRefSource
Memory buffers
type MemoryBufferRef = Ptr MemoryBufferSource
createMemoryBufferWithContentsOfFile :: CString -> Ptr MemoryBufferRef -> Ptr CString -> IO BoolSource
PassRegistry
type PassRegistryRef = Ptr PassRegistrySource
Pass manager
type PassManagerRef = Ptr PassManagerSource
runPassManager :: PassManagerRef -> ModuleRef -> IO BoolSource
Functions from extras.cpp
getNumUses :: ValueRef -> IO CIntSource
instGetOpcode :: ValueRef -> IO CIntSource
cmpInstGetPredicate :: ValueRef -> IO CIntSource