<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Llvm.Types</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_Llvm-Types.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ghc-7.4.2: The GHC API</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Llvm.Types</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">LLVM Basic Types and Variables </a><ul><li><a href="#g:2">Operations on LLVM Basic Types and Variables </a></li><li><a href="#g:3">Shortcut for Common Types </a></li></ul></li><li><a href="#g:4">LLVM Function Types </a></li><li><a href="#g:5">LLVM Operations </a></li><li><a href="#g:6">Floating point conversion </a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The LLVM Type System. </p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:LMGlobal">LMGlobal</a> = (<a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a>, <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a>)</li><li class="src short"><span class="keyword">type</span> <a href="#t:LMString">LMString</a> = <a href="FastString.html#t:FastString">FastString</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:LlvmAlias">LlvmAlias</a> = (<a href="Llvm-Types.html#t:LMString">LMString</a>, <a href="Llvm-Types.html#t:LlvmType">LlvmType</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmType">LlvmType</a> <ul class="subs"><li>= <a href="#v:LMInt">LMInt</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> </li><li>| <a href="#v:LMFloat">LMFloat</a> </li><li>| <a href="#v:LMDouble">LMDouble</a> </li><li>| <a href="#v:LMFloat80">LMFloat80</a> </li><li>| <a href="#v:LMFloat128">LMFloat128</a> </li><li>| <a href="#v:LMPointer">LMPointer</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMArray">LMArray</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMLabel">LMLabel</a> </li><li>| <a href="#v:LMVoid">LMVoid</a> </li><li>| <a href="#v:LMStruct">LMStruct</a> [<a href="Llvm-Types.html#t:LlvmType">LlvmType</a>] </li><li>| <a href="#v:LMAlias">LMAlias</a> <a href="Llvm-Types.html#t:LlvmAlias">LlvmAlias</a> </li><li>| <a href="#v:LMFunction">LMFunction</a> <a href="Llvm-Types.html#t:LlvmFunctionDecl">LlvmFunctionDecl</a> </li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:LMSection">LMSection</a> = <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Llvm-Types.html#t:LMString">LMString</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:LMAlign">LMAlign</a> = <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:LMConst">LMConst</a> = <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmVar">LlvmVar</a> <ul class="subs"><li>= <a href="#v:LMGlobalVar">LMGlobalVar</a> <a href="Llvm-Types.html#t:LMString">LMString</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> <a href="Llvm-Types.html#t:LlvmLinkageType">LlvmLinkageType</a> <a href="Llvm-Types.html#t:LMSection">LMSection</a> <a href="Llvm-Types.html#t:LMAlign">LMAlign</a> <a href="Llvm-Types.html#t:LMConst">LMConst</a> </li><li>| <a href="#v:LMLocalVar">LMLocalVar</a> <a href="Unique.html#t:Unique">Unique</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMNLocalVar">LMNLocalVar</a> <a href="Llvm-Types.html#t:LMString">LMString</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMLitVar">LMLitVar</a> <a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmLit">LlvmLit</a> <ul class="subs"><li>= <a href="#v:LMIntLit">LMIntLit</a> <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMFloatLit">LMFloatLit</a> <a href="../base-4.5.1.0/Prelude.html#t:Double">Double</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMNullLit">LMNullLit</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMUndefLit">LMUndefLit</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmStatic">LlvmStatic</a> <ul class="subs"><li>= <a href="#v:LMComment">LMComment</a> <a href="Llvm-Types.html#t:LMString">LMString</a> </li><li>| <a href="#v:LMStaticLit">LMStaticLit</a> <a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a> </li><li>| <a href="#v:LMUninitType">LMUninitType</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMStaticStr">LMStaticStr</a> <a href="Llvm-Types.html#t:LMString">LMString</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMStaticArray">LMStaticArray</a> [<a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a>] <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMStaticStruc">LMStaticStruc</a> [<a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a>] <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMStaticPointer">LMStaticPointer</a> <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> </li><li>| <a href="#v:LMBitc">LMBitc</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMPtoI">LMPtoI</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> </li><li>| <a href="#v:LMAdd">LMAdd</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> </li><li>| <a href="#v:LMSub">LMSub</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> </li></ul></li><li class="src short"><a href="#v:commaCat">commaCat</a> :: <a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> a => [a] -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:getName">getName</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:getPlainName">getPlainName</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:getLit">getLit</a> :: <a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:getVarType">getVarType</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:getLitType">getLitType</a> :: <a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:getStatType">getStatType</a> :: <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:getGlobalType">getGlobalType</a> :: <a href="Llvm-Types.html#t:LMGlobal">LMGlobal</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:getGlobalVar">getGlobalVar</a> :: <a href="Llvm-Types.html#t:LMGlobal">LMGlobal</a> -> <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></li><li class="src short"><a href="#v:getLink">getLink</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="Llvm-Types.html#t:LlvmLinkageType">LlvmLinkageType</a></li><li class="src short"><a href="#v:pLift">pLift</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:pVarLift">pVarLift</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></li><li class="src short"><a href="#v:pLower">pLower</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:pVarLower">pVarLower</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></li><li class="src short"><a href="#v:isInt">isInt</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isFloat">isFloat</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isPointer">isPointer</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isGlobal">isGlobal</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:llvmWidthInBits">llvmWidthInBits</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:i128">i128</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:i8Ptr">i8Ptr</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:i1">i1</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:i8">i8</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:i16">i16</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:i32">i32</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:i64">i64</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:llvmWord">llvmWord</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><a href="#v:llvmWordPtr">llvmWordPtr</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmFunctionDecl">LlvmFunctionDecl</a> = <a href="#v:LlvmFunctionDecl">LlvmFunctionDecl</a> {<ul class="subs"><li><a href="#v:decName">decName</a> :: <a href="Llvm-Types.html#t:LMString">LMString</a></li><li><a href="#v:funcLinkage">funcLinkage</a> :: <a href="Llvm-Types.html#t:LlvmLinkageType">LlvmLinkageType</a></li><li><a href="#v:funcCc">funcCc</a> :: <a href="Llvm-Types.html#t:LlvmCallConvention">LlvmCallConvention</a></li><li><a href="#v:decReturnType">decReturnType</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></li><li><a href="#v:decVarargs">decVarargs</a> :: <a href="Llvm-Types.html#t:LlvmParameterListType">LlvmParameterListType</a></li><li><a href="#v:decParams">decParams</a> :: [<a href="Llvm-Types.html#t:LlvmParameter">LlvmParameter</a>]</li><li><a href="#v:funcAlign">funcAlign</a> :: <a href="Llvm-Types.html#t:LMAlign">LMAlign</a></li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:LlvmFunctionDecls">LlvmFunctionDecls</a> = [<a href="Llvm-Types.html#t:LlvmFunctionDecl">LlvmFunctionDecl</a>]</li><li class="src short"><span class="keyword">type</span> <a href="#t:LlvmParameter">LlvmParameter</a> = (<a href="Llvm-Types.html#t:LlvmType">LlvmType</a>, [<a href="Llvm-Types.html#t:LlvmParamAttr">LlvmParamAttr</a>])</li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmParamAttr">LlvmParamAttr</a> <ul class="subs"><li>= <a href="#v:ZeroExt">ZeroExt</a> </li><li>| <a href="#v:SignExt">SignExt</a> </li><li>| <a href="#v:InReg">InReg</a> </li><li>| <a href="#v:ByVal">ByVal</a> </li><li>| <a href="#v:SRet">SRet</a> </li><li>| <a href="#v:NoAlias">NoAlias</a> </li><li>| <a href="#v:NoCapture">NoCapture</a> </li><li>| <a href="#v:Nest">Nest</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmFuncAttr">LlvmFuncAttr</a> <ul class="subs"><li>= <a href="#v:AlwaysInline">AlwaysInline</a> </li><li>| <a href="#v:InlineHint">InlineHint</a> </li><li>| <a href="#v:NoInline">NoInline</a> </li><li>| <a href="#v:OptSize">OptSize</a> </li><li>| <a href="#v:NoReturn">NoReturn</a> </li><li>| <a href="#v:NoUnwind">NoUnwind</a> </li><li>| <a href="#v:ReadNone">ReadNone</a> </li><li>| <a href="#v:ReadOnly">ReadOnly</a> </li><li>| <a href="#v:Ssp">Ssp</a> </li><li>| <a href="#v:SspReq">SspReq</a> </li><li>| <a href="#v:NoRedZone">NoRedZone</a> </li><li>| <a href="#v:NoImplicitFloat">NoImplicitFloat</a> </li><li>| <a href="#v:Naked">Naked</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmCallType">LlvmCallType</a> <ul class="subs"><li>= <a href="#v:StdCall">StdCall</a> </li><li>| <a href="#v:TailCall">TailCall</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmCallConvention">LlvmCallConvention</a> <ul class="subs"><li>= <a href="#v:CC_Ccc">CC_Ccc</a> </li><li>| <a href="#v:CC_Fastcc">CC_Fastcc</a> </li><li>| <a href="#v:CC_Coldcc">CC_Coldcc</a> </li><li>| <a href="#v:CC_Ncc">CC_Ncc</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> </li><li>| <a href="#v:CC_X86_Stdcc">CC_X86_Stdcc</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmParameterListType">LlvmParameterListType</a> <ul class="subs"><li>= <a href="#v:FixedArgs">FixedArgs</a> </li><li>| <a href="#v:VarArgs">VarArgs</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmLinkageType">LlvmLinkageType</a> <ul class="subs"><li>= <a href="#v:Internal">Internal</a> </li><li>| <a href="#v:LinkOnce">LinkOnce</a> </li><li>| <a href="#v:Weak">Weak</a> </li><li>| <a href="#v:Appending">Appending</a> </li><li>| <a href="#v:ExternWeak">ExternWeak</a> </li><li>| <a href="#v:ExternallyVisible">ExternallyVisible</a> </li><li>| <a href="#v:External">External</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmMachOp">LlvmMachOp</a> <ul class="subs"><li>= <a href="#v:LM_MO_Add">LM_MO_Add</a> </li><li>| <a href="#v:LM_MO_Sub">LM_MO_Sub</a> </li><li>| <a href="#v:LM_MO_Mul">LM_MO_Mul</a> </li><li>| <a href="#v:LM_MO_UDiv">LM_MO_UDiv</a> </li><li>| <a href="#v:LM_MO_SDiv">LM_MO_SDiv</a> </li><li>| <a href="#v:LM_MO_URem">LM_MO_URem</a> </li><li>| <a href="#v:LM_MO_SRem">LM_MO_SRem</a> </li><li>| <a href="#v:LM_MO_FAdd">LM_MO_FAdd</a> </li><li>| <a href="#v:LM_MO_FSub">LM_MO_FSub</a> </li><li>| <a href="#v:LM_MO_FMul">LM_MO_FMul</a> </li><li>| <a href="#v:LM_MO_FDiv">LM_MO_FDiv</a> </li><li>| <a href="#v:LM_MO_FRem">LM_MO_FRem</a> </li><li>| <a href="#v:LM_MO_Shl">LM_MO_Shl</a> </li><li>| <a href="#v:LM_MO_LShr">LM_MO_LShr</a> </li><li>| <a href="#v:LM_MO_AShr">LM_MO_AShr</a> </li><li>| <a href="#v:LM_MO_And">LM_MO_And</a> </li><li>| <a href="#v:LM_MO_Or">LM_MO_Or</a> </li><li>| <a href="#v:LM_MO_Xor">LM_MO_Xor</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmCmpOp">LlvmCmpOp</a> <ul class="subs"><li>= <a href="#v:LM_CMP_Eq">LM_CMP_Eq</a> </li><li>| <a href="#v:LM_CMP_Ne">LM_CMP_Ne</a> </li><li>| <a href="#v:LM_CMP_Ugt">LM_CMP_Ugt</a> </li><li>| <a href="#v:LM_CMP_Uge">LM_CMP_Uge</a> </li><li>| <a href="#v:LM_CMP_Ult">LM_CMP_Ult</a> </li><li>| <a href="#v:LM_CMP_Ule">LM_CMP_Ule</a> </li><li>| <a href="#v:LM_CMP_Sgt">LM_CMP_Sgt</a> </li><li>| <a href="#v:LM_CMP_Sge">LM_CMP_Sge</a> </li><li>| <a href="#v:LM_CMP_Slt">LM_CMP_Slt</a> </li><li>| <a href="#v:LM_CMP_Sle">LM_CMP_Sle</a> </li><li>| <a href="#v:LM_CMP_Feq">LM_CMP_Feq</a> </li><li>| <a href="#v:LM_CMP_Fne">LM_CMP_Fne</a> </li><li>| <a href="#v:LM_CMP_Fgt">LM_CMP_Fgt</a> </li><li>| <a href="#v:LM_CMP_Fge">LM_CMP_Fge</a> </li><li>| <a href="#v:LM_CMP_Flt">LM_CMP_Flt</a> </li><li>| <a href="#v:LM_CMP_Fle">LM_CMP_Fle</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:LlvmCastOp">LlvmCastOp</a> <ul class="subs"><li>= <a href="#v:LM_Trunc">LM_Trunc</a> </li><li>| <a href="#v:LM_Zext">LM_Zext</a> </li><li>| <a href="#v:LM_Sext">LM_Sext</a> </li><li>| <a href="#v:LM_Fptrunc">LM_Fptrunc</a> </li><li>| <a href="#v:LM_Fpext">LM_Fpext</a> </li><li>| <a href="#v:LM_Fptoui">LM_Fptoui</a> </li><li>| <a href="#v:LM_Fptosi">LM_Fptosi</a> </li><li>| <a href="#v:LM_Uitofp">LM_Uitofp</a> </li><li>| <a href="#v:LM_Sitofp">LM_Sitofp</a> </li><li>| <a href="#v:LM_Ptrtoint">LM_Ptrtoint</a> </li><li>| <a href="#v:LM_Inttoptr">LM_Inttoptr</a> </li><li>| <a href="#v:LM_Bitcast">LM_Bitcast</a> </li></ul></li><li class="src short"><a href="#v:dToStr">dToStr</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Double">Double</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:fToStr">fToStr</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Float">Float</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:fixEndian">fixEndian</a> :: [a] -> [a]</li></ul></div><div id="interface"><h1 id="g:1">LLVM Basic Types and Variables </h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LMGlobal" class="def">LMGlobal</a> = (<a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a>, <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a>)</p><div class="doc"><p>A global mutable variable. Maybe defined or external </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LMString" class="def">LMString</a> = <a href="FastString.html#t:FastString">FastString</a></p><div class="doc"><p>A String in LLVM </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LlvmAlias" class="def">LlvmAlias</a> = (<a href="Llvm-Types.html#t:LMString">LMString</a>, <a href="Llvm-Types.html#t:LlvmType">LlvmType</a>)</p><div class="doc"><p>A type alias </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmType" class="def">LlvmType</a> </p><div class="doc"><p>Llvm Types </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LMInt" class="def">LMInt</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>An integer with a given width in bits. </p></td></tr><tr><td class="src"><a name="v:LMFloat" class="def">LMFloat</a></td><td class="doc"><p>32 bit floating point </p></td></tr><tr><td class="src"><a name="v:LMDouble" class="def">LMDouble</a></td><td class="doc"><p>64 bit floating point </p></td></tr><tr><td class="src"><a name="v:LMFloat80" class="def">LMFloat80</a></td><td class="doc"><p>80 bit (x86 only) floating point </p></td></tr><tr><td class="src"><a name="v:LMFloat128" class="def">LMFloat128</a></td><td class="doc"><p>128 bit floating point </p></td></tr><tr><td class="src"><a name="v:LMPointer" class="def">LMPointer</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>A pointer to a <code><a href="Llvm-Types.html#t:LlvmType">LlvmType</a></code> </p></td></tr><tr><td class="src"><a name="v:LMArray" class="def">LMArray</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>An array of <code><a href="Llvm-Types.html#t:LlvmType">LlvmType</a></code> </p></td></tr><tr><td class="src"><a name="v:LMLabel" class="def">LMLabel</a></td><td class="doc"><p>A <code><a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></code> can represent a label (address) </p></td></tr><tr><td class="src"><a name="v:LMVoid" class="def">LMVoid</a></td><td class="doc"><p>Void type </p></td></tr><tr><td class="src"><a name="v:LMStruct" class="def">LMStruct</a> [<a href="Llvm-Types.html#t:LlvmType">LlvmType</a>]</td><td class="doc"><p>Structure type </p></td></tr><tr><td class="src"><a name="v:LMAlias" class="def">LMAlias</a> <a href="Llvm-Types.html#t:LlvmAlias">LlvmAlias</a></td><td class="doc"><p>A type alias </p></td></tr><tr><td class="src"><a name="v:LMFunction" class="def">LMFunction</a> <a href="Llvm-Types.html#t:LlvmFunctionDecl">LlvmFunctionDecl</a></td><td class="doc"><p>Function type, used to create pointers to functions </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmType" class="caption collapser" onclick="toggleSection('i:LlvmType')">Instances</p><div id="section.i:LlvmType" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LMSection" class="def">LMSection</a> = <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Llvm-Types.html#t:LMString">LMString</a></p><div class="doc"><p>An LLVM section definition. If Nothing then let LLVM decide the section </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LMAlign" class="def">LMAlign</a> = <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LMConst" class="def">LMConst</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src"> = <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>is a variable constant or not </p></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmVar" class="def">LlvmVar</a> </p><div class="doc"><p>Llvm Variables </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LMGlobalVar" class="def">LMGlobalVar</a> <a href="Llvm-Types.html#t:LMString">LMString</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> <a href="Llvm-Types.html#t:LlvmLinkageType">LlvmLinkageType</a> <a href="Llvm-Types.html#t:LMSection">LMSection</a> <a href="Llvm-Types.html#t:LMAlign">LMAlign</a> <a href="Llvm-Types.html#t:LMConst">LMConst</a></td><td class="doc"><p>Variables with a global scope. </p></td></tr><tr><td class="src"><a name="v:LMLocalVar" class="def">LMLocalVar</a> <a href="Unique.html#t:Unique">Unique</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>Variables local to a function or parameters. </p></td></tr><tr><td class="src"><a name="v:LMNLocalVar" class="def">LMNLocalVar</a> <a href="Llvm-Types.html#t:LMString">LMString</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>Named local variables. Sometimes we need to be able to explicitly name variables (e.g for function arguments). </p></td></tr><tr><td class="src"><a name="v:LMLitVar" class="def">LMLitVar</a> <a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a></td><td class="doc"><p>A constant variable </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmVar" class="caption collapser" onclick="toggleSection('i:LlvmVar')">Instances</p><div id="section.i:LlvmVar" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmLit" class="def">LlvmLit</a> </p><div class="doc"><p>Llvm Literal Data. </p><p>These can be used inline in expressions. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LMIntLit" class="def">LMIntLit</a> <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>Refers to an integer constant (i64 42). </p></td></tr><tr><td class="src"><a name="v:LMFloatLit" class="def">LMFloatLit</a> <a href="../base-4.5.1.0/Prelude.html#t:Double">Double</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>Floating point literal </p></td></tr><tr><td class="src"><a name="v:LMNullLit" class="def">LMNullLit</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>Literal NULL, only applicable to pointer types </p></td></tr><tr><td class="src"><a name="v:LMUndefLit" class="def">LMUndefLit</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>Undefined value, random bit pattern. Useful for optimisations. </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmLit" class="caption collapser" onclick="toggleSection('i:LlvmLit')">Instances</p><div id="section.i:LlvmLit" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmStatic" class="def">LlvmStatic</a> </p><div class="doc"><p>Llvm Static Data. </p><p>These represent the possible global level variables and constants. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LMComment" class="def">LMComment</a> <a href="Llvm-Types.html#t:LMString">LMString</a></td><td class="doc"><p>A comment in a static section </p></td></tr><tr><td class="src"><a name="v:LMStaticLit" class="def">LMStaticLit</a> <a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a></td><td class="doc"><p>A static variant of a literal value </p></td></tr><tr><td class="src"><a name="v:LMUninitType" class="def">LMUninitType</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>For uninitialised data </p></td></tr><tr><td class="src"><a name="v:LMStaticStr" class="def">LMStaticStr</a> <a href="Llvm-Types.html#t:LMString">LMString</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>Defines a static <code><a href="Llvm-Types.html#t:LMString">LMString</a></code> </p></td></tr><tr><td class="src"><a name="v:LMStaticArray" class="def">LMStaticArray</a> [<a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a>] <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>A static array </p></td></tr><tr><td class="src"><a name="v:LMStaticStruc" class="def">LMStaticStruc</a> [<a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a>] <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>A static structure type </p></td></tr><tr><td class="src"><a name="v:LMStaticPointer" class="def">LMStaticPointer</a> <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></td><td class="doc"><p>A pointer to other data </p></td></tr><tr><td class="src"><a name="v:LMBitc" class="def">LMBitc</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>Pointer to Pointer conversion </p></td></tr><tr><td class="src"><a name="v:LMPtoI" class="def">LMPtoI</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></td><td class="doc"><p>Pointer to Integer conversion </p></td></tr><tr><td class="src"><a name="v:LMAdd" class="def">LMAdd</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a></td><td class="doc"><p>Constant addition operation </p></td></tr><tr><td class="src"><a name="v:LMSub" class="def">LMSub</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a></td><td class="doc"><p>Constant subtraction operation </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmStatic" class="caption collapser" onclick="toggleSection('i:LlvmStatic')">Instances</p><div id="section.i:LlvmStatic" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:commaCat" class="def">commaCat</a> :: <a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> a => [a] -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Concatenate an array together, separated by commas </p></div></div><h2 id="g:2">Operations on LLVM Basic Types and Variables </h2><div class="top"><p class="src"><a name="v:getName" class="def">getName</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Return the variable name or value of the <code><a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></code> in Llvm IR textual representation (e.g. <code>@x</code>, <code>%y</code> or <code>42</code>). </p></div></div><div class="top"><p class="src"><a name="v:getPlainName" class="def">getPlainName</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Return the variable name or value of the <code><a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></code> in a plain textual representation (e.g. <code>x</code>, <code>y</code> or <code>42</code>). </p></div></div><div class="top"><p class="src"><a name="v:getLit" class="def">getLit</a> :: <a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Print a literal value. No type. </p></div></div><div class="top"><p class="src"><a name="v:getVarType" class="def">getVarType</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p><div class="doc"><p>Return the <code><a href="Llvm-Types.html#t:LlvmType">LlvmType</a></code> of the <code><a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></code> </p></div></div><div class="top"><p class="src"><a name="v:getLitType" class="def">getLitType</a> :: <a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p><div class="doc"><p>Return the <code><a href="Llvm-Types.html#t:LlvmType">LlvmType</a></code> of a <code><a href="Llvm-Types.html#t:LlvmLit">LlvmLit</a></code> </p></div></div><div class="top"><p class="src"><a name="v:getStatType" class="def">getStatType</a> :: <a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p><div class="doc"><p>Return the <code><a href="Llvm-Types.html#t:LlvmType">LlvmType</a></code> of the <code><a href="Llvm-Types.html#t:LlvmStatic">LlvmStatic</a></code> </p></div></div><div class="top"><p class="src"><a name="v:getGlobalType" class="def">getGlobalType</a> :: <a href="Llvm-Types.html#t:LMGlobal">LMGlobal</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p><div class="doc"><p>Return the <code><a href="Llvm-Types.html#t:LlvmType">LlvmType</a></code> of the <code><a href="Llvm-Types.html#t:LMGlobal">LMGlobal</a></code> </p></div></div><div class="top"><p class="src"><a name="v:getGlobalVar" class="def">getGlobalVar</a> :: <a href="Llvm-Types.html#t:LMGlobal">LMGlobal</a> -> <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></p><div class="doc"><p>Return the <code><a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></code> part of a <code><a href="Llvm-Types.html#t:LMGlobal">LMGlobal</a></code> </p></div></div><div class="top"><p class="src"><a name="v:getLink" class="def">getLink</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="Llvm-Types.html#t:LlvmLinkageType">LlvmLinkageType</a></p><div class="doc"><p>Return the <code><a href="Llvm-Types.html#t:LlvmLinkageType">LlvmLinkageType</a></code> for a <code><a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></code> </p></div></div><div class="top"><p class="src"><a name="v:pLift" class="def">pLift</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p><div class="doc"><p>Add a pointer indirection to the supplied type. <code><a href="Llvm-Types.html#v:LMLabel">LMLabel</a></code> and <code><a href="Llvm-Types.html#v:LMVoid">LMVoid</a></code> cannot be lifted. </p></div></div><div class="top"><p class="src"><a name="v:pVarLift" class="def">pVarLift</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></p><div class="doc"><p>Lower a variable of <code><a href="Llvm-Types.html#v:LMPointer">LMPointer</a></code> type. </p></div></div><div class="top"><p class="src"><a name="v:pLower" class="def">pLower</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p><div class="doc"><p>Remove the pointer indirection of the supplied type. Only <code><a href="Llvm-Types.html#v:LMPointer">LMPointer</a></code> constructors can be lowered. </p></div></div><div class="top"><p class="src"><a name="v:pVarLower" class="def">pVarLower</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></p><div class="doc"><p>Lower a variable of <code><a href="Llvm-Types.html#v:LMPointer">LMPointer</a></code> type. </p></div></div><div class="top"><p class="src"><a name="v:isInt" class="def">isInt</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Test if the given <code><a href="Llvm-Types.html#t:LlvmType">LlvmType</a></code> is an integer </p></div></div><div class="top"><p class="src"><a name="v:isFloat" class="def">isFloat</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Test if the given <code><a href="Llvm-Types.html#t:LlvmType">LlvmType</a></code> is a floating point type </p></div></div><div class="top"><p class="src"><a name="v:isPointer" class="def">isPointer</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Test if the given <code><a href="Llvm-Types.html#t:LlvmType">LlvmType</a></code> is an <code><a href="Llvm-Types.html#v:LMPointer">LMPointer</a></code> construct </p></div></div><div class="top"><p class="src"><a name="v:isGlobal" class="def">isGlobal</a> :: <a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Test if a <code><a href="Llvm-Types.html#t:LlvmVar">LlvmVar</a></code> is global. </p></div></div><div class="top"><p class="src"><a name="v:llvmWidthInBits" class="def">llvmWidthInBits</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p><div class="doc"><p>Width in bits of an <code><a href="Llvm-Types.html#t:LlvmType">LlvmType</a></code>, returns 0 if not applicable </p></div></div><h2 id="g:3">Shortcut for Common Types </h2><div class="top"><p class="src"><a name="v:i128" class="def">i128</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p></div><div class="top"><p class="src"><a name="v:i8Ptr" class="def">i8Ptr</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p></div><div class="top"><p class="src"><a name="v:i1" class="def">i1</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p></div><div class="top"><p class="src"><a name="v:i8" class="def">i8</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p></div><div class="top"><p class="src"><a name="v:i16" class="def">i16</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p></div><div class="top"><p class="src"><a name="v:i32" class="def">i32</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p></div><div class="top"><p class="src"><a name="v:i64" class="def">i64</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p></div><div class="top"><p class="src"><a name="v:llvmWord" class="def">llvmWord</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p><div class="doc"><p>The target architectures word size </p></div></div><div class="top"><p class="src"><a name="v:llvmWordPtr" class="def">llvmWordPtr</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></p><div class="doc"><p>The target architectures word size </p></div></div><h1 id="g:4">LLVM Function Types </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmFunctionDecl" class="def">LlvmFunctionDecl</a> </p><div class="doc"><p>An LLVM Function </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LlvmFunctionDecl" class="def">LlvmFunctionDecl</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:decName" class="def">decName</a> :: <a href="Llvm-Types.html#t:LMString">LMString</a></dt><dd class="doc"><p>Unique identifier of the function </p></dd><dt class="src"><a name="v:funcLinkage" class="def">funcLinkage</a> :: <a href="Llvm-Types.html#t:LlvmLinkageType">LlvmLinkageType</a></dt><dd class="doc"><p>LinkageType of the function </p></dd><dt class="src"><a name="v:funcCc" class="def">funcCc</a> :: <a href="Llvm-Types.html#t:LlvmCallConvention">LlvmCallConvention</a></dt><dd class="doc"><p>The calling convention of the function </p></dd><dt class="src"><a name="v:decReturnType" class="def">decReturnType</a> :: <a href="Llvm-Types.html#t:LlvmType">LlvmType</a></dt><dd class="doc"><p>Type of the returned value </p></dd><dt class="src"><a name="v:decVarargs" class="def">decVarargs</a> :: <a href="Llvm-Types.html#t:LlvmParameterListType">LlvmParameterListType</a></dt><dd class="doc"><p>Indicates if this function uses varargs </p></dd><dt class="src"><a name="v:decParams" class="def">decParams</a> :: [<a href="Llvm-Types.html#t:LlvmParameter">LlvmParameter</a>]</dt><dd class="doc"><p>Parameter types and attributes </p></dd><dt class="src"><a name="v:funcAlign" class="def">funcAlign</a> :: <a href="Llvm-Types.html#t:LMAlign">LMAlign</a></dt><dd class="doc"><p>Function align value, must be power of 2 </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmFunctionDecl" class="caption collapser" onclick="toggleSection('i:LlvmFunctionDecl')">Instances</p><div id="section.i:LlvmFunctionDecl" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmFunctionDecl">LlvmFunctionDecl</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmFunctionDecl">LlvmFunctionDecl</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LlvmFunctionDecls" class="def">LlvmFunctionDecls</a> = [<a href="Llvm-Types.html#t:LlvmFunctionDecl">LlvmFunctionDecl</a>]</p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LlvmParameter" class="def">LlvmParameter</a> = (<a href="Llvm-Types.html#t:LlvmType">LlvmType</a>, [<a href="Llvm-Types.html#t:LlvmParamAttr">LlvmParamAttr</a>])</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmParamAttr" class="def">LlvmParamAttr</a> </p><div class="doc"><p>LLVM Parameter Attributes. </p><p>Parameter attributes are used to communicate additional information about the result or parameters of a function </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ZeroExt" class="def">ZeroExt</a></td><td class="doc"><p>This indicates to the code generator that the parameter or return value should be zero-extended to a 32-bit value by the caller (for a parameter) or the callee (for a return value). </p></td></tr><tr><td class="src"><a name="v:SignExt" class="def">SignExt</a></td><td class="doc"><p>This indicates to the code generator that the parameter or return value should be sign-extended to a 32-bit value by the caller (for a parameter) or the callee (for a return value). </p></td></tr><tr><td class="src"><a name="v:InReg" class="def">InReg</a></td><td class="doc"><p>This indicates that this parameter or return value should be treated in a special target-dependent fashion during while emitting code for a function call or return (usually, by putting it in a register as opposed to memory). </p></td></tr><tr><td class="src"><a name="v:ByVal" class="def">ByVal</a></td><td class="doc"><p>This indicates that the pointer parameter should really be passed by value to the function. </p></td></tr><tr><td class="src"><a name="v:SRet" class="def">SRet</a></td><td class="doc"><p>This indicates that the pointer parameter specifies the address of a structure that is the return value of the function in the source program. </p></td></tr><tr><td class="src"><a name="v:NoAlias" class="def">NoAlias</a></td><td class="doc"><p>This indicates that the pointer does not alias any global or any other parameter. </p></td></tr><tr><td class="src"><a name="v:NoCapture" class="def">NoCapture</a></td><td class="doc"><p>This indicates that the callee does not make any copies of the pointer that outlive the callee itself </p></td></tr><tr><td class="src"><a name="v:Nest" class="def">Nest</a></td><td class="doc"><p>This indicates that the pointer parameter can be excised using the trampoline intrinsics. </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmParamAttr" class="caption collapser" onclick="toggleSection('i:LlvmParamAttr')">Instances</p><div id="section.i:LlvmParamAttr" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmParamAttr">LlvmParamAttr</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmParamAttr">LlvmParamAttr</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmFuncAttr" class="def">LlvmFuncAttr</a> </p><div class="doc"><p>Llvm Function Attributes. </p><p>Function attributes are set to communicate additional information about a function. Function attributes are considered to be part of the function, not of the function type, so functions with different parameter attributes can have the same function type. Functions can have multiple attributes. </p><p>Descriptions taken from <a href="http://llvm.org/docs/LangRef.html#fnattrs">http://llvm.org/docs/LangRef.html#fnattrs</a> </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:AlwaysInline" class="def">AlwaysInline</a></td><td class="doc"><p>This attribute indicates that the inliner should attempt to inline this function into callers whenever possible, ignoring any active inlining size threshold for this caller. </p></td></tr><tr><td class="src"><a name="v:InlineHint" class="def">InlineHint</a></td><td class="doc"><p>This attribute indicates that the source code contained a hint that inlining this function is desirable (such as the "inline" keyword in C/C++). It is just a hint; it imposes no requirements on the inliner. </p></td></tr><tr><td class="src"><a name="v:NoInline" class="def">NoInline</a></td><td class="doc"><p>This attribute indicates that the inliner should never inline this function in any situation. This attribute may not be used together with the alwaysinline attribute. </p></td></tr><tr><td class="src"><a name="v:OptSize" class="def">OptSize</a></td><td class="doc"><p>This attribute suggests that optimization passes and code generator passes make choices that keep the code size of this function low, and otherwise do optimizations specifically to reduce code size. </p></td></tr><tr><td class="src"><a name="v:NoReturn" class="def">NoReturn</a></td><td class="doc"><p>This function attribute indicates that the function never returns normally. This produces undefined behavior at runtime if the function ever does dynamically return. </p></td></tr><tr><td class="src"><a name="v:NoUnwind" class="def">NoUnwind</a></td><td class="doc"><p>This function attribute indicates that the function never returns with an unwind or exceptional control flow. If the function does unwind, its runtime behavior is undefined. </p></td></tr><tr><td class="src"><a name="v:ReadNone" class="def">ReadNone</a></td><td class="doc"><p>This attribute indicates that the function computes its result (or decides to unwind an exception) based strictly on its arguments, without dereferencing any pointer arguments or otherwise accessing any mutable state (e.g. memory, control registers, etc) visible to caller functions. It does not write through any pointer arguments (including byval arguments) and never changes any state visible to callers. This means that it cannot unwind exceptions by calling the C++ exception throwing methods, but could use the unwind instruction. </p></td></tr><tr><td class="src"><a name="v:ReadOnly" class="def">ReadOnly</a></td><td class="doc"><p>This attribute indicates that the function does not write through any pointer arguments (including byval arguments) or otherwise modify any state (e.g. memory, control registers, etc) visible to caller functions. It may dereference pointer arguments and read state that may be set in the caller. A readonly function always returns the same value (or unwinds an exception identically) when called with the same set of arguments and global state. It cannot unwind an exception by calling the C++ exception throwing methods, but may use the unwind instruction. </p></td></tr><tr><td class="src"><a name="v:Ssp" class="def">Ssp</a></td><td class="doc"><p>This attribute indicates that the function should emit a stack smashing protector. It is in the form of a "canary"—a random value placed on the stack before the local variables that's checked upon return from the function to see if it has been overwritten. A heuristic is used to determine if a function needs stack protectors or not. </p><p>If a function that has an ssp attribute is inlined into a function that doesn't have an ssp attribute, then the resulting function will have an ssp attribute. </p></td></tr><tr><td class="src"><a name="v:SspReq" class="def">SspReq</a></td><td class="doc"><p>This attribute indicates that the function should always emit a stack smashing protector. This overrides the ssp function attribute. </p><p>If a function that has an sspreq attribute is inlined into a function that doesn't have an sspreq attribute or which has an ssp attribute, then the resulting function will have an sspreq attribute. </p></td></tr><tr><td class="src"><a name="v:NoRedZone" class="def">NoRedZone</a></td><td class="doc"><p>This attribute indicates that the code generator should not use a red zone, even if the target-specific ABI normally permits it. </p></td></tr><tr><td class="src"><a name="v:NoImplicitFloat" class="def">NoImplicitFloat</a></td><td class="doc"><p>This attributes disables implicit floating point instructions. </p></td></tr><tr><td class="src"><a name="v:Naked" class="def">Naked</a></td><td class="doc"><p>This attribute disables prologue / epilogue emission for the function. This can have very system-specific consequences. </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmFuncAttr" class="caption collapser" onclick="toggleSection('i:LlvmFuncAttr')">Instances</p><div id="section.i:LlvmFuncAttr" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmFuncAttr">LlvmFuncAttr</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmFuncAttr">LlvmFuncAttr</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmCallType" class="def">LlvmCallType</a> </p><div class="doc"><p>Different types to call a function. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:StdCall" class="def">StdCall</a></td><td class="doc"><p>Normal call, allocate a new stack frame. </p></td></tr><tr><td class="src"><a name="v:TailCall" class="def">TailCall</a></td><td class="doc"><p>Tail call, perform the call in the current stack frame. </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmCallType" class="caption collapser" onclick="toggleSection('i:LlvmCallType')">Instances</p><div id="section.i:LlvmCallType" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmCallType">LlvmCallType</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmCallType">LlvmCallType</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmCallConvention" class="def">LlvmCallConvention</a> </p><div class="doc"><p>Different calling conventions a function can use. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:CC_Ccc" class="def">CC_Ccc</a></td><td class="doc"><p>The C calling convention. This calling convention (the default if no other calling convention is specified) matches the target C calling conventions. This calling convention supports varargs function calls and tolerates some mismatch in the declared prototype and implemented declaration of the function (as does normal C). </p></td></tr><tr><td class="src"><a name="v:CC_Fastcc" class="def">CC_Fastcc</a></td><td class="doc"><p>This calling convention attempts to make calls as fast as possible (e.g. by passing things in registers). This calling convention allows the target to use whatever tricks it wants to produce fast code for the target, without having to conform to an externally specified ABI (Application Binary Interface). Implementations of this convention should allow arbitrary tail call optimization to be supported. This calling convention does not support varargs and requires the prototype of al callees to exactly match the prototype of the function definition. </p></td></tr><tr><td class="src"><a name="v:CC_Coldcc" class="def">CC_Coldcc</a></td><td class="doc"><p>This calling convention attempts to make code in the caller as efficient as possible under the assumption that the call is not commonly executed. As such, these calls often preserve all registers so that the call does not break any live ranges in the caller side. This calling convention does not support varargs and requires the prototype of all callees to exactly match the prototype of the function definition. </p></td></tr><tr><td class="src"><a name="v:CC_Ncc" class="def">CC_Ncc</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Any calling convention may be specified by number, allowing target-specific calling conventions to be used. Target specific calling conventions start at 64. </p></td></tr><tr><td class="src"><a name="v:CC_X86_Stdcc" class="def">CC_X86_Stdcc</a></td><td class="doc"><p>X86 Specific <code><a href="Llvm-Types.html#v:StdCall">StdCall</a></code> convention. LLVM includes a specific alias for it rather than just using CC_Ncc. </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmCallConvention" class="caption collapser" onclick="toggleSection('i:LlvmCallConvention')">Instances</p><div id="section.i:LlvmCallConvention" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmCallConvention">LlvmCallConvention</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmCallConvention">LlvmCallConvention</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmParameterListType" class="def">LlvmParameterListType</a> </p><div class="doc"><p>Functions can have a fixed amount of parameters, or a variable amount. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:FixedArgs" class="def">FixedArgs</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:VarArgs" class="def">VarArgs</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:LlvmParameterListType" class="caption collapser" onclick="toggleSection('i:LlvmParameterListType')">Instances</p><div id="section.i:LlvmParameterListType" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmParameterListType">LlvmParameterListType</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmParameterListType">LlvmParameterListType</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmLinkageType" class="def">LlvmLinkageType</a> </p><div class="doc"><p>Linkage type of a symbol. </p><p>The description of the constructors is copied from the Llvm Assembly Language Reference Manual <a href="http://www.llvm.org/docs/LangRef.html#linkage">http://www.llvm.org/docs/LangRef.html#linkage</a>, because they correspond to the Llvm linkage types. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Internal" class="def">Internal</a></td><td class="doc"><p>Global values with internal linkage are only directly accessible by objects in the current module. In particular, linking code into a module with an internal global value may cause the internal to be renamed as necessary to avoid collisions. Because the symbol is internal to the module, all references can be updated. This corresponds to the notion of the <code>static</code> keyword in C. </p></td></tr><tr><td class="src"><a name="v:LinkOnce" class="def">LinkOnce</a></td><td class="doc"><p>Globals with <code>linkonce</code> linkage are merged with other globals of the same name when linkage occurs. This is typically used to implement inline functions, templates, or other code which must be generated in each translation unit that uses it. Unreferenced linkonce globals are allowed to be discarded. </p></td></tr><tr><td class="src"><a name="v:Weak" class="def">Weak</a></td><td class="doc"><p><code>weak</code> linkage is exactly the same as linkonce linkage, except that unreferenced weak globals may not be discarded. This is used for globals that may be emitted in multiple translation units, but that are not guaranteed to be emitted into every translation unit that uses them. One example of this are common globals in C, such as <code>int X;</code> at global scope. </p></td></tr><tr><td class="src"><a name="v:Appending" class="def">Appending</a></td><td class="doc"><p><code>appending</code> linkage may only be applied to global variables of pointer to array type. When two global variables with appending linkage are linked together, the two global arrays are appended together. This is the Llvm, typesafe, equivalent of having the system linker append together <code>sections</code> with identical names when .o files are linked. </p></td></tr><tr><td class="src"><a name="v:ExternWeak" class="def">ExternWeak</a></td><td class="doc"><p>The semantics of this linkage follow the ELF model: the symbol is weak until linked, if not linked, the symbol becomes null instead of being an undefined reference. </p></td></tr><tr><td class="src"><a name="v:ExternallyVisible" class="def">ExternallyVisible</a></td><td class="doc"><p>The symbol participates in linkage and can be used to resolve external symbol references. </p></td></tr><tr><td class="src"><a name="v:External" class="def">External</a></td><td class="doc"><p>Alias for <code><a href="Llvm-Types.html#v:ExternallyVisible">ExternallyVisible</a></code> but with explicit textual form in LLVM assembly. </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmLinkageType" class="caption collapser" onclick="toggleSection('i:LlvmLinkageType')">Instances</p><div id="section.i:LlvmLinkageType" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmLinkageType">LlvmLinkageType</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmLinkageType">LlvmLinkageType</a></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:5">LLVM Operations </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmMachOp" class="def">LlvmMachOp</a> </p><div class="doc"><p>Llvm binary operators machine operations. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LM_MO_Add" class="def">LM_MO_Add</a></td><td class="doc"><p>add two integer, floating point or vector values. </p></td></tr><tr><td class="src"><a name="v:LM_MO_Sub" class="def">LM_MO_Sub</a></td><td class="doc"><p>subtract two ... </p></td></tr><tr><td class="src"><a name="v:LM_MO_Mul" class="def">LM_MO_Mul</a></td><td class="doc"><p>multiply .. </p></td></tr><tr><td class="src"><a name="v:LM_MO_UDiv" class="def">LM_MO_UDiv</a></td><td class="doc"><p>unsigned integer or vector division. </p></td></tr><tr><td class="src"><a name="v:LM_MO_SDiv" class="def">LM_MO_SDiv</a></td><td class="doc"><p>signed integer .. </p></td></tr><tr><td class="src"><a name="v:LM_MO_URem" class="def">LM_MO_URem</a></td><td class="doc"><p>unsigned integer or vector remainder (mod) </p></td></tr><tr><td class="src"><a name="v:LM_MO_SRem" class="def">LM_MO_SRem</a></td><td class="doc"><p>signed ... </p></td></tr><tr><td class="src"><a name="v:LM_MO_FAdd" class="def">LM_MO_FAdd</a></td><td class="doc"><p>add two floating point or vector values. </p></td></tr><tr><td class="src"><a name="v:LM_MO_FSub" class="def">LM_MO_FSub</a></td><td class="doc"><p>subtract two ... </p></td></tr><tr><td class="src"><a name="v:LM_MO_FMul" class="def">LM_MO_FMul</a></td><td class="doc"><p>multiply ... </p></td></tr><tr><td class="src"><a name="v:LM_MO_FDiv" class="def">LM_MO_FDiv</a></td><td class="doc"><p>divide ... </p></td></tr><tr><td class="src"><a name="v:LM_MO_FRem" class="def">LM_MO_FRem</a></td><td class="doc"><p>remainder ... </p></td></tr><tr><td class="src"><a name="v:LM_MO_Shl" class="def">LM_MO_Shl</a></td><td class="doc"><p>Left shift </p></td></tr><tr><td class="src"><a name="v:LM_MO_LShr" class="def">LM_MO_LShr</a></td><td class="doc"><p>Logical shift right Shift right, filling with zero </p></td></tr><tr><td class="src"><a name="v:LM_MO_AShr" class="def">LM_MO_AShr</a></td><td class="doc"><p>Arithmetic shift right The most significant bits of the result will be equal to the sign bit of the left operand. </p></td></tr><tr><td class="src"><a name="v:LM_MO_And" class="def">LM_MO_And</a></td><td class="doc"><p>AND bitwise logical operation. </p></td></tr><tr><td class="src"><a name="v:LM_MO_Or" class="def">LM_MO_Or</a></td><td class="doc"><p>OR bitwise logical operation. </p></td></tr><tr><td class="src"><a name="v:LM_MO_Xor" class="def">LM_MO_Xor</a></td><td class="doc"><p>XOR bitwise logical operation. </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmMachOp" class="caption collapser" onclick="toggleSection('i:LlvmMachOp')">Instances</p><div id="section.i:LlvmMachOp" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmMachOp">LlvmMachOp</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmMachOp">LlvmMachOp</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmCmpOp" class="def">LlvmCmpOp</a> </p><div class="doc"><p>Llvm compare operations. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LM_CMP_Eq" class="def">LM_CMP_Eq</a></td><td class="doc"><p>Equal (Signed and Unsigned) </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Ne" class="def">LM_CMP_Ne</a></td><td class="doc"><p>Not equal (Signed and Unsigned) </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Ugt" class="def">LM_CMP_Ugt</a></td><td class="doc"><p>Unsigned greater than </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Uge" class="def">LM_CMP_Uge</a></td><td class="doc"><p>Unsigned greater than or equal </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Ult" class="def">LM_CMP_Ult</a></td><td class="doc"><p>Unsigned less than </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Ule" class="def">LM_CMP_Ule</a></td><td class="doc"><p>Unsigned less than or equal </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Sgt" class="def">LM_CMP_Sgt</a></td><td class="doc"><p>Signed greater than </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Sge" class="def">LM_CMP_Sge</a></td><td class="doc"><p>Signed greater than or equal </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Slt" class="def">LM_CMP_Slt</a></td><td class="doc"><p>Signed less than </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Sle" class="def">LM_CMP_Sle</a></td><td class="doc"><p>Signed less than or equal </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Feq" class="def">LM_CMP_Feq</a></td><td class="doc"><p>Float equal </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Fne" class="def">LM_CMP_Fne</a></td><td class="doc"><p>Float not equal </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Fgt" class="def">LM_CMP_Fgt</a></td><td class="doc"><p>Float greater than </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Fge" class="def">LM_CMP_Fge</a></td><td class="doc"><p>Float greater than or equal </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Flt" class="def">LM_CMP_Flt</a></td><td class="doc"><p>Float less than </p></td></tr><tr><td class="src"><a name="v:LM_CMP_Fle" class="def">LM_CMP_Fle</a></td><td class="doc"><p>Float less than or equal </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmCmpOp" class="caption collapser" onclick="toggleSection('i:LlvmCmpOp')">Instances</p><div id="section.i:LlvmCmpOp" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmCmpOp">LlvmCmpOp</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmCmpOp">LlvmCmpOp</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LlvmCastOp" class="def">LlvmCastOp</a> </p><div class="doc"><p>Llvm cast operations. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LM_Trunc" class="def">LM_Trunc</a></td><td class="doc"><p>Integer truncate </p></td></tr><tr><td class="src"><a name="v:LM_Zext" class="def">LM_Zext</a></td><td class="doc"><p>Integer extend (zero fill) </p></td></tr><tr><td class="src"><a name="v:LM_Sext" class="def">LM_Sext</a></td><td class="doc"><p>Integer extend (sign fill) </p></td></tr><tr><td class="src"><a name="v:LM_Fptrunc" class="def">LM_Fptrunc</a></td><td class="doc"><p>Float truncate </p></td></tr><tr><td class="src"><a name="v:LM_Fpext" class="def">LM_Fpext</a></td><td class="doc"><p>Float extend </p></td></tr><tr><td class="src"><a name="v:LM_Fptoui" class="def">LM_Fptoui</a></td><td class="doc"><p>Float to unsigned Integer </p></td></tr><tr><td class="src"><a name="v:LM_Fptosi" class="def">LM_Fptosi</a></td><td class="doc"><p>Float to signed Integer </p></td></tr><tr><td class="src"><a name="v:LM_Uitofp" class="def">LM_Uitofp</a></td><td class="doc"><p>Unsigned Integer to Float </p></td></tr><tr><td class="src"><a name="v:LM_Sitofp" class="def">LM_Sitofp</a></td><td class="doc"><p>Signed Int to Float </p></td></tr><tr><td class="src"><a name="v:LM_Ptrtoint" class="def">LM_Ptrtoint</a></td><td class="doc"><p>Pointer to Integer </p></td></tr><tr><td class="src"><a name="v:LM_Inttoptr" class="def">LM_Inttoptr</a></td><td class="doc"><p>Integer to Pointer </p></td></tr><tr><td class="src"><a name="v:LM_Bitcast" class="def">LM_Bitcast</a></td><td class="doc"><p>Cast between types where no bit manipulation is needed </p></td></tr></table></div><div class="subs instances"><p id="control.i:LlvmCastOp" class="caption collapser" onclick="toggleSection('i:LlvmCastOp')">Instances</p><div id="section.i:LlvmCastOp" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Llvm-Types.html#t:LlvmCastOp">LlvmCastOp</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Llvm-Types.html#t:LlvmCastOp">LlvmCastOp</a></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:6">Floating point conversion </h1><div class="top"><p class="src"><a name="v:dToStr" class="def">dToStr</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Double">Double</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Convert a Haskell Double to an LLVM hex encoded floating point form. In Llvm float literals can be printed in a big-endian hexadecimal format, regardless of underlying architecture. </p></div></div><div class="top"><p class="src"><a name="v:fToStr" class="def">fToStr</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Float">Float</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Convert a Haskell Float to an LLVM hex encoded floating point form. LLVM uses the same encoding for both floats and doubles (16 digit hex string) but floats must have the last half all zeroes so it can fit into a float size type. </p></div></div><div class="top"><p class="src"><a name="v:fixEndian" class="def">fixEndian</a> :: [a] -> [a]</p><div class="doc"><p>Reverse or leave byte data alone to fix endianness on this target. </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>