1 9      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~)*+)*+)*+)*+ S,Manage compile passes. -KA module provider is used by the code generator to get access to a module. .Type of top level modules. /YFree all storage related to a module. *Note*, this is a dangerous call, since referring V to the module after this call is an error. The reason for the explicit call to free O the module instead of an automatic lifetime management is that modules have a P somewhat complicated ownership. Handing a module to a module provider changes [ the ownership of the module, and the module provider will free the module when necessary. 0Write a module to a file. 1Read a module from a file. 234&Turn a module into a module provider. 56789Create a pass manager. :$Create a pass manager for a module. =Add a control flow graph simplification pass to the manager. 0Add a constant propagation pass to the manager. 2Add a global value numbering pass to the manager. ;<=>?@AO,-./0123456789:;<=>?@AM,-./0123456789:;<=>?@A BCD     EGet a list created by calls to staticFunction ,that must be passed to the execution engine via &LLVM.ExecutionEngine.addGlobalMappings. FRAllows you to define part of a module while in the middle of defining a function. BCD     EFBCD     EFGCResult tells whether the module was modified by any of the passes. GGG HIJ8Struct types; a list (nested tuple) of component types. KL'Label type, produced by a basic block. M5Fixed sized vector, the array size is encoded in the n parameter. NO5Fixed sized arrays, the array size is encoded in the n parameter. PQ128 bit floating point. RS!Variable sized unsigned integer.  The n parameter should belong to PosI. TUVariable sized signed integer.  The n parameter should belong to PosI. VHIJKLMNOPQRSTUVHIIJKKLMNNOPPQRRSTTUVV *W*Define what vararg types are permissible. XThe X$ type is a placeholder for the real  type that  can be obtained with  castVarArgs. YZ[Function type. \Types with a fixed size. ]IFirst class types, i.e., the types that can be passed as arguments, etc. ^PNumber of elements for instructions that handle both primitive and vector types _Primitive types. `Floating types. aIntegral or pointer type. bIntegral types. cdef5Arithmetic types, i.e., integral and floating types. ghGType descriptor, used to convey type information through the LLVM API. ijklmnopqrstuThe u> class classifies all types that have an LLVM representation. vw The argument is never evaluated xyz{|('(WXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|&WXYZ[\]^_`abceddefggh tsrqponmlkjiijklmnopqrstuvvwxyz{| L}~eA basic block is a sequence of non-branching instructions, terminated by a control flow instruction. )This class is just to simplify contexts.  !0A function is simply a pointer to the function. "#$%&'()*Create a new module. 'Create a new explicitely named module.  module name Give the body for a module. module that is defined  module body )Create a new module with the given body.  module body +,-.Create a new named function. Function name Create a new function. Use 3 to create a function with external linkage, since  it needs a known name. _Define a function body. The basic block returned by the function is the function entry point. Function to define (created by ). Function body. +Create a new function with the given body. Function body. +Create a new function with the given body. Function body. ?Set the calling convention of a function. By default it is the  C calling convention. KAdd attributes to a value. Beware, what attributes are allowed depends on  what kind of value it is. /QCreate a reference to an external function while code generating for a function. 3 If LLVM cannot resolve its name, then you may try . As  , but for s rather than s 0JMake an external C function with a fixed address callable from LLVM code. 7This callback function can also be a Haskell function, that was imported like  % foreign import ccall "&nextElement" J nextElementFunPtr :: FunPtr (StablePtr (IORef [Word32]) -> IO Word32) See examples/List.hs. When you only use %, then LLVM cannot resolve the name. (However, I do not know why.) Thus % manages a list of static functions. (This list is automatically installed by ExecutionEngine.simpleFunction  and can be manually obtained by E and installed by !ExecutionEngine.addGlobalMappings. " Installing" means calling LLVM's addGlobalMapping according to  @http://old.nabble.com/jit-with-external-functions-td7769793.html. As  , but for s rather than s 1$Create a new named global variable.  Constant?  Visibility Name Create a new global variable. +Give a global variable a (constant) value. %Create and define a global variable. +Create and define a named global variable. 23HMake a constant vector. Replicates or truncates the list to get length n. GMake a constant array. Replicates or truncates the list to get length n. Make a constant struct. Make a constant packed struct. e 4567 !"#$%}~%&'()1<}~%%&'&'()()1"89:;<3Get all the information needed to free a function. T Freeing code might have to be done from a (C) finalizer, so it has to done from C. \ The function c_freeFunctionObject take these pointers as arguments and frees the function. =>?@ABCDMThe LLVM execution engine is encapsulated so it cannot be accessed directly. D The reason is that (currently) there must only ever be one engine, ( so access to it is wrapped in a monad. EIn contrast to generateFunction this compiles a function once. 7Thus it is faster for many calls to the same function. See examples/ Vector.hs. .If the function calls back into Haskell code, ,you also have to set the function addresses using  or . .Tell LLVM the address of an external function +if it cannot resolve a name automatically. +Alternatively you may declare the function with staticFunction instead of externFunction. 'Pass a list of global mappings to LLVM that can be obtained from LLVM.Core.getGlobalMappings. FGHIJKLMNO89:CEJK8989:CEJKPQR STUHMake a constant vector. Replicates or truncates the list to get length n. + This behaviour is consistent with that of LLVM.Core.CodeGen.constVector. VWSSXAcceptable single index to getElementPointer. YAcceptable arguments to getElementPointer. Z0Acceptable argument to array memory allocation. [Acceptable arguments to . \]^0Acceptable operands to comparison instructions. _Always true (always folded) True if unordered or not equal 'True if unordered, less than, or equal True if unordered or less than *True if unordered, greater than, or equal "True if unordered or greater than True if unordered or equal 'True if unordered: isnan(X) | isnan(Y) True if ordered (no nans) )True if ordered and operands are unequal 'True if ordered and less than or equal True if ordered and less than *True if ordered and greater than or equal !True if ordered and greater than True if ordered and equal Always false (always folded) signed less or equal signed less than signed greater or equal signed greater than unsigned less or equal unsigned less than unsigned greater or equal unsigned greater than  not equal equal less or equal  less than greater or equal  greater than  not equal equal `Acceptable arguments to j and k. ab8Acceptable arguments to arithmetic binary instructions. cdeAcceptable arguments to the F instruction. f      !"#$%&'()*+,-./0123456789:;<=>?@ABCDghEijF{Return from the current function with the given value. Use () as the return value for what would be a void function is C. kG]Branch to the first basic block if the boolean is true, otherwise to the second basic block. Boolean to branch upon. Target for true. Target for false. H1Unconditionally branch to the given basic block. Branch target. IBranch table instruction. Value to branch upon. Default branch target. )Labels and corresponding branch targets. J;Unwind the call stack until a function call performed with  is reached. $ I.e., throw a non-local exception. K?Inform the code generator that this code can never be reached. lLMNOPQR:signed or unsigned integer division depending on the type S3signed or unsigned remainder depending on the type TUVWXYZ[Floating point division. \Floating point remainder. ]^_`abmncdefgGet a value from a vector. Vector Index into the vector h.Insert a value into a vector, nondestructive. Vector Value to insert Index into the vector iPermute vector. jGet a value from an aggregate.  Aggregate Index into the aggregate k2Insert a value into an aggregate, nondestructive.  Aggregate Value to insert Index into the aggregate l)Truncate a value to a shorter bit width. m&Zero extend a value to a wider width. n$Sign extend a value to wider width. o!Truncate a floating point value. pExtend a floating point value. q7Convert a floating point value to an unsigned integer. r4Convert a floating point value to a signed integer. s.Convert a floating point value to an integer.  It is mapped to fptosi or fptoui depending on the type a. t7Convert an unsigned integer to a floating point value. u4Convert a signed integer to a floating point value. v.Convert an integer to a floating point value.  It is mapped to sitofp or uitofp depending on the type a. w!Convert a pointer to an integer. x!Convert an integer to a pointer. yLConvert between to values of the same size by just copying the bit pattern. z#Same as bitcast but instead of the '(:==:)'& type class it uses type unification. B This way, properties like reflexivity, symmetry and transitivity & are obvious to the Haskell compiler. opqrstuv{ Compare values of ordered types 7and choose predicates according to the compared types. 'Floating point numbers are compared in "ordered" mode, that is NaN operands yields w as result.  Pointers are compared unsigned. ?These choices are consistent with comparison in plain Haskell. xyz{||}Compare integers. ~Compare floating point values. 2Select between two values depending on a boolean. }/Call a function with the given arguments. The 8 instruction is variadic, i.e., the number of arguments ! it takes depends on the type of f. )Call a function with exception handling. Normal return point. Exception return point. Function to call. /Call a function with the given arguments. The  instruction D is variadic, i.e., the number of arguments it takes depends on the  type of f. D This also sets the calling convention of the call to the function. C As LLVM itself defines, if the calling conventions of the calling   instruction and the function being called are different, undefined  behavior results. )Call a function with exception handling. D This also sets the calling convention of the call to the function. C As LLVM itself defines, if the calling conventions of the calling   instruction and the function being called are different, undefined  behavior results. Calling convention Normal return point. Exception return point. Function to call. QJoin several variables (virtual registers) from different basic blocks into one. 8 All of the variables in the list are joined. See also . /Add additional inputs to an existing phi node. M The reason for this instruction is that sometimes the structure of the code ^ makes it impossible to have all variables in scope at the point where you need the phi node. "Must be a variable from a call to . Variables to add. Allocate heap memory. Allocate heap (array) memory. Allocate stack memory. Allocate stack (array) memory. Free heap memory. ~;If we want to export that, then we should have a Size type & This is the official implementation, , but it suffers from the ptrtoint(gep) bug. Load a value from memory. Address to load from. Store a value in memory Value to store. Address to store to. +Address arithmetic. See LLVM description. ) The index is a nested tuple of the form (i1,(i2,( ... ()))). T (This is without a doubt the most confusing LLVM instruction, but the types help.) 9Like getElementPtr, but with an initial index that is 0. Z This is useful since any pointer first need to be indexed off the pointer, and then into 9 its actual value. This first indexing is often with 0.       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ("!            !"#?>=<;:9876543210/.-,+*)('&%$$%&'()*+,-./0123456789:;<=>?@DCBAABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Print a value. Print a type. Get the name of a . 2Convert a varargs function to a regular function. x  !"#$%&'(,-./0123456789:;<=>?@ABCDEFHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~%      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~w&./-4,9:0123#?>=<;:9876543210/.-,+*)('&%$"!      @DCBAEFGHIJKLMNcOPQdXYZeRSTU[VW\]^_`abfghijklmnopqrstuvwxyz{|}~uv'(fgcedba`_]\[^YZ|htsrqponmlkji{zwxyXWUVSTQROPMNLJKHICD~F6BE} 578<>=?@A% !"#$;GRemove the IO from a function return type. This is unsafe in general. IClass of LLVM function types that can be translated to the corresponding  Haskell type. 3Generate a Haskell function from an LLVM function. NNote that the function is compiled for every call (Just-In-Time compilation). E If you want to compile the function once and call it a lot of times  then you should better use . ITranslate a function to Haskell code. This is a simplified interface to , the execution engine and module mechanism.  It is based on  , so see there for limitations. Combine  and . ' Synonym for CodeGenFunction r (Value a). Comparison functions. Comparison functions. Comparison functions. Comparison functions. Comparison functions. Comparison functions.  Lazy and.  Lazy or. YConditional, returns first element of the pair when condition is true, otherwise second. Return a value from an . Use x < - set $ ... to make a binding. Unlift a function with TValue to have Value arguments. Lift a function from having Value arguments to having TValue arguments. Define a recursive ,, gets passed itself as the first argument.  !"#$%&'()*+,-./0123456789:;<=>?@>?ABCD E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _` a a b b c d d e e f f g g h h i j k l m n o p q r s t u v w x y z { | } ~                           !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~C  E        F  G                                            D [                             ! " #  $ % & ' ( )  *  +  , - . / 0 1 2 3 456789:;;<=>>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~T llvm-3.0.0.0 LLVM.CoreLLVM.Util.ForeignLLVM.Util.OptimizeLLVM.ExecutionEngineLLVM.Util.LoopLLVM.Util.ArithmeticLLVM.Util.FileLLVM.Util.MemoryLLVM.Core.UtilLLVM.Core.CodeGenMonadLLVM.Core.DataLLVM.Core.TypeLLVM.Core.CodeGenLLVM.ExecutionEngine.EngineLLVM.ExecutionEngine.TargetLLVM.Core.VectorLLVM.Core.InstructionsbaseGHC.PtrPtrllvm-base-3.0.0.0 LLVM.FFI.CoreExternalLinkageAvailableExternallyLinkageLinkOnceAnyLinkageLinkOnceODRLinkageWeakAnyLinkageWeakODRLinkageAppendingLinkageInternalLinkagePrivateLinkageDLLImportLinkageDLLExportLinkageExternalWeakLinkage GhostLinkage CommonLinkageLinkerPrivateLinkageLinkage ZExtAttribute SExtAttributeNoReturnAttributeInRegAttributeStructRetAttributeNoUnwindAttributeNoAliasAttributeByValAttribute NestAttributeReadNoneAttributeReadOnlyAttributeNoInlineAttributeAlwaysInlineAttributeOptimizeForSizeAttributeStackProtectAttributeStackProtectReqAttributeNoCaptureAttributeNoRedZoneAttributeNoImplicitFloatAttributeNakedAttribute AttributeLLVM.Target.NativeinitializeNativeTargettype-level-0.2.4Data.TypeLevel.Num.SetsNatPoswithalloca withArrayLen PassManagerModuleProviderModule destroyModulewriteBitcodeToFilereadBitcodeFromFile getFunctionsgetGlobalVariables%createModuleProviderForExistingModulegetBasicBlocks getParamsgetInstructions getOperandscreatePassManagercreateFunctionPassManagerannotateValueListhasUsersgetUsesgetUsersgetUser isChildOfgetDepGlobalMappingsCodeGenFunction CodeGenModulegetGlobalMappingsliftCodeGenModuleoptimizeModule PackedStructStructLabelVectorArrayFP128WordNIntN CastVarArgsVarArgs UnknownSize:& IsFunctionIsSized IsFirstClassNumberOfElements IsPrimitive IsFloatingIsIntegerOrPointer IsIntegerArithmeticType FloatingType IntegerType IsArithmeticarithmeticTypeTypeDesc TDInvalidTypeTDStructTDLabel TDFunctionTDPtrTDVectorTDArrayTDIntTDVoidTDFP128TDDoubleTDFloatIsTypetypeDesctypeReftypeName typeDesc2isSigned isFloating&TGlobal TFunctionGlobal BasicBlock FunctionRet FunctionArgsFunctionIsConst ConstValueValue ModuleValue newModulenewNamedModule defineModule createModulegetModuleValuescastModuleValuevalueOfvaluezeroallOnesundefnewNamedFunction newFunctiondefineFunctioncreateFunctioncreateNamedFunctionsetFuncCallConv addAttributescreateBasicBlock newBasicBlocknewNamedBasicBlockdefineBasicBlockgetCurrentBasicBlocktoLabel fromLabelexternFunction externGlobalstaticFunction staticGlobalnewNamedGlobal newGlobal defineGlobal createGlobalcreateNamedGlobal createStringcreateStringNul withString withStringNul constVector constArray constStructconstPackedStructGeneric FreePointers EngineAccessrunEngineAccessaddModuleProvidergetPointerToFunctionaddFunctionValueaddGlobalMappings addModulegetFreePointers TargetDataaBIAlignmentOfType aBISizeOfType littleEndiancallFrameAlignmentOfType intPtrType pointerSizepreferredAlignmentOfTypesizeOfTypeInBitsstoreSizeOfTypewithIntPtrType getTargetDatatargetDataFromStringtoVector fromVectorvector IsIndexArg GetElementPtrAllocArgCallArgsCmpRetCmpOp FPPredicateFPTFPUNEFPULEFPULTFPUGEFPUGTFPUEQFPUNOFPORDFPONEFPOLEFPOLTFPOGEFPOGTFPOEQFPFalse IntPredicateIntSLEIntSLTIntSGEIntSGTIntULEIntULTIntUGEIntUGTIntNEIntEQ CmpPredicateCmpLECmpLTCmpGECmpGTCmpNECmpEQGetValueABinOpRet Terminate InstrDesc IDInvalidOp IDInsertValueIDExtractValueIDShuffleVectorIDInsertElementIDExtractElementIDVAArg IDUserOp2 IDUserOp1IDSelectIDCallIDPhiIDFCmpIDICmp IDBitcast IDIntToPtr IDPtrToIntIDFPExt IDFPTruncIDSItoFPIDUItoFPIDFPtoSIIDFPtoUIIDSExtIDZExtIDTruncIDGetElementPtrIDStoreIDLoadIDAllocaIDBinOp IDUnreachableIDUnwindIDInvoke IDIndirectBrIDSwitch IDBrUncondIDBrCond IDRetVoidIDRet BinOpDescBOXorBOOrBOAndBOAShRBOLShRBOShLBOFRemBOSRemBOURemBOFDiv BOSDivExactBOSDivBOUDivBOFMul BOMulNuwNswBOMulNswBOMulNuwBOMulBOFSub BOSubNuwNswBOSubNswBOSubNuwBOSubBOFAdd BOAddNuwNswBOAddNswBOAddNuwBOAddArgDescAEALAIAV getInstrDescretcondBrbrswitchunwind unreachableaddsubmuliaddisubimulidiviremudivsdivuremsremfaddfsubfmulfdivfremshllshrashrandorxorneginegfneginvextractelement insertelement shufflevector extractvalue insertvaluetrunczextsextfptruncfpextfptouifptosifptointuitofpsitofpinttofpptrtointinttoptrbitcast bitcastUnifycmppcmpicmpfcmpselectcallinvoke callWithConvinvokeWithConvphi addPhiInputsmalloc arrayMalloc arrayAllocafreeloadstore getElementPtrgetElementPtr0 dumpValuedumpType getValueName castVarArgsUnsafe unsafePurify TranslatablegenerateFunctionsimpleFunctionunsafeGenerateFunctionPhiphisaddPhisforLoop mapVector mapVector2 CallIntrinsic UnwrapArgs ArithFunctionCmpTValue%==%/=%>%>=%<%<=%&&%||???retrnset arithFunctiontoArithFunctionrecursiveFunctionwriteCodeGenModuleoptimizeFunctionoptimizeFunctionCG IsLengthTypememcpymemmovememsetUsefromPassManagerBuilder fromBuilderfromModuleProvider fromModuleType functionType structType withModule valueHasType showTypeOf showType'withModuleProvider withBuilder createBuilder positionAtEndgetInsertBlockappendBasicBlock addFunctiongetParam addGlobalconstStringInternal constStringconstStringNul withValuemakeCallmakeCallWithCc makeInvokemakeInvokeWithCc buildEmptyPhiwithEmptyCString addPhiInswithPassManageraddCFGSimplificationPassaddConstantPropagationPassaddDemoteMemoryToRegisterPass addGVNPassaddInstructionCombiningPassaddPromoteMemoryToRegisterPassaddReassociatePass addTargetDatarunFunctionPassManagerinitializeFunctionPassManagerfinalizeFunctionPassManager getValueNameU getObjList isConstant isIntrinsicForeign.C.StringCStringForeign.Marshal.ArrayCGFCGFState cgf_module cgf_builder cgf_functioncgf_nextCGMCGMState cgm_module cgm_externscgm_global_mappingscgm_nextgenMSym getModulerunCodeGenModulegenFSym getFunction getBuildergetFunctionModule getExterns putExternsaddGlobalMappingrunCodeGenFunctiontransformers-0.2.2.0Control.Monad.IO.ClassliftIOaddOptimizationPassescreateStandardFunctionPassescreateStandardModulePassesghc-prim GHC.TypesIOPtrSize StructFields fieldTypesfuncType IsConstStructconstValueFieldsOfFAapArgs FunctionRef IsConstFields constFieldsOfconstOf unConstValueunValue constOfPtr constEnumconstIconstF applyArgs externCorewithCurrentBuilder fixArraySizestringDefaultVisibilityHiddenVisibilityProtectedVisibility Visibility toGeneric fromGeneric GenericValuefromGenericValueEAEAState ea_engine ea_providers theEnginecreateExecutionEngine getTheEnginegetExecutionEngineTargetDataaddFunctionValueCorewithGenericValuecreateGenericValueWithwithAll runFunctiongetRunFunction toGenericIntfromGenericInt toGenericRealfromGenericRealgetEngineTargetDataRefmakeTargetDataMkVector ourTargetDataunVectorbinopunopGetFieldgetArg getIxList getAllocArgdoCallCallercmpBldcmpop FFIConvertgetIxFFIUnOpabinop FFIConstBinOpFFIBinOpret' alignedFree alignedMalloc getArgDesc terminatewithCurrentBuilder_withArithmeticType buildBinOp buildUnOpconvertuintFromCmpPredicatesintFromCmpPredicatefpFromCmpPredicatefromIntPredicatetoIntPredicatefromFPPredicate toFPPredicateFalseucmpBldscmpBldfcmpBld_ucmp_scmp doCallDef_sizeOf_alignOf sizeOfArrayalignOfunConst translatecallIntrinsic1'callIntrinsic2' unwrapArgs LiftTuple liftTupleUncurryNuncurryNcurryNarithFunction' adjSignedadjFloat addReadNonecallIntrinsicP1callIntrinsicP2macOScallIntrinsic1callIntrinsic2optimizeoptimizeFunction' memcpyFunc memmoveFunc memsetFunc