X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FllvmGen%2FLlvm%2FAbsSyn.hs;h=08d27d75f85374968da69544ff1e40ac9d3e7f66;hb=e94570ba7c84444f034b8d552c05f8594532b329;hp=05a0f08cfd802a34fc04bd7e54ce5c928c2db827;hpb=3aadff5e31bf6b665cf7ae7606c94cdab85624d2;p=ghc-hetmet.git diff --git a/compiler/llvmGen/Llvm/AbsSyn.hs b/compiler/llvmGen/Llvm/AbsSyn.hs index 05a0f08..08d27d7 100644 --- a/compiler/llvmGen/Llvm/AbsSyn.hs +++ b/compiler/llvmGen/Llvm/AbsSyn.hs @@ -23,11 +23,14 @@ data LlvmBlock = LlvmBlock { type LlvmBlocks = [LlvmBlock] --- | An LLVM Module. This is a top level contianer in LLVM. +-- | An LLVM Module. This is a top level container in LLVM. data LlvmModule = LlvmModule { -- | Comments to include at the start of the module. modComments :: [LMString], + -- | LLVM Alias type definitions. + modAliases :: [LlvmAlias], + -- | Global variables to include in the module. modGlobals :: [LMGlobal], @@ -43,6 +46,9 @@ data LlvmFunction = LlvmFunction { -- | The signature of this declared function. funcDecl :: LlvmFunctionDecl, + -- | The functions arguments + funcArgs :: [LMString], + -- | The function attributes. funcAttrs :: [LlvmFuncAttr], @@ -122,7 +128,7 @@ data LlvmStatement {- | Raise an expression to a statement (if don't want result or want to use - Llvm unamed values. + Llvm unnamed values. -} | Expr LlvmExpression @@ -168,12 +174,11 @@ data LlvmExpression {- | Navigate in an structure, selecting elements + * inbound: Is the pointer inbounds? (computed pointer doesn't overflow) * ptr: Location of the structure - * indexes: A list of indexes to select the correct value. For example - the first element of the third element of the structure ptr - is selected with [3,1] (zero indexed) + * indexes: A list of indexes to select the correct value. -} - | GetElemPtr LlvmVar [Int] + | GetElemPtr Bool LlvmVar [LlvmVar] {- | Cast the variable from to the to type. This is an abstraction of three @@ -199,7 +204,7 @@ data LlvmExpression Merge variables from different basic blocks which are predecessors of this basic block in a new variable of type tp. * tp: type of the merged variable, must match the types of the - precessors variables. + predecessor variables. * precessors: A list of variables and the basic block that they originate from. -}