diff options
author | Nicolas Frisby <nicolas.frisby@gmail.com> | 2013-08-22 15:00:41 -0500 |
---|---|---|
committer | Nicolas Frisby <nicolas.frisby@gmail.com> | 2013-08-22 15:00:54 -0500 |
commit | 84f9927c1a04b8e35b97101771d8f6d625643d9b (patch) | |
tree | 050d7265a24fa1ff9aecc4081bb01bc444520587 /compiler/llvmGen/Llvm/AbsSyn.hs | |
parent | 2eaf46fb1bb8c661c03f3e5e80622207ef2509d9 (diff) | |
parent | c24be4b761df558d9edc9c0b1554bb558c261b14 (diff) | |
download | haskell-late-dmd.tar.gz |
merged master into late-dmdlate-dmd
Diffstat (limited to 'compiler/llvmGen/Llvm/AbsSyn.hs')
-rw-r--r-- | compiler/llvmGen/Llvm/AbsSyn.hs | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/compiler/llvmGen/Llvm/AbsSyn.hs b/compiler/llvmGen/Llvm/AbsSyn.hs index f5f5eacdee..f92bd89c5c 100644 --- a/compiler/llvmGen/Llvm/AbsSyn.hs +++ b/compiler/llvmGen/Llvm/AbsSyn.hs @@ -4,6 +4,7 @@ module Llvm.AbsSyn where +import Llvm.MetaData import Llvm.Types import Unique @@ -32,7 +33,7 @@ data LlvmModule = LlvmModule { modAliases :: [LlvmAlias], -- | LLVM meta data. - modMeta :: [LlvmMeta], + modMeta :: [MetaDecl], -- | Global variables to include in the module. modGlobals :: [LMGlobal], @@ -165,11 +166,9 @@ data LlvmStatement {- | A LLVM statement with metadata attached to it. -} - | MetaStmt [MetaData] LlvmStatement + | MetaStmt [MetaAnnot] LlvmStatement - deriving (Show, Eq) - -type MetaData = (LMString, LlvmMetaUnamed) + deriving (Eq) -- | Llvm Expressions @@ -253,6 +252,17 @@ data LlvmExpression | Call LlvmCallType LlvmVar [LlvmVar] [LlvmFuncAttr] {- | + Call a function as above but potentially taking metadata as arguments. + * tailJumps: CallType to signal if the function should be tail called + * fnptrval: An LLVM value containing a pointer to a function to be + invoked. Can be indirect. Should be LMFunction type. + * args: Arguments that may include metadata. + * attrs: A list of function attributes for the call. Only NoReturn, + NoUnwind, ReadOnly and ReadNone are valid here. + -} + | CallM LlvmCallType LlvmVar [MetaExpr] [LlvmFuncAttr] + + {- | 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 @@ -264,21 +274,21 @@ data LlvmExpression {- | Inline assembly expression. Syntax is very similar to the style used by GCC. - * assembly: Actual inline assembly code. - * contraints: Operand constraints. - * return ty: Return type of function. - * vars: Any variables involved in the assembly code. - * sideeffect: Does the expression have side effects not visible from the - constraints list. - * alignstack: Should the stack be conservatively aligned before this - expression is executed. + * assembly: Actual inline assembly code. + * constraints: Operand constraints. + * return ty: Return type of function. + * vars: Any variables involved in the assembly code. + * sideeffect: Does the expression have side effects not visible from the + constraints list. + * alignstack: Should the stack be conservatively aligned before this + expression is executed. -} | Asm LMString LMString LlvmType [LlvmVar] Bool Bool {- | A LLVM expression with metadata attached to it. -} - | MetaExpr [MetaData] LlvmExpression + | MExpr [MetaAnnot] LlvmExpression - deriving (Show, Eq) + deriving (Eq) |