[commit: ghc] wip/kavon-nosplit-llvm: paused to work on paper (aac8ad9)

git at git.haskell.org git at git.haskell.org
Tue Jun 27 09:15:42 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/kavon-nosplit-llvm
Link       : http://ghc.haskell.org/trac/ghc/changeset/aac8ad95bf1e60dade358a272ca942c8af7f4bcd/ghc

>---------------------------------------------------------------

commit aac8ad95bf1e60dade358a272ca942c8af7f4bcd
Author: Kavon Farvardin <kavon at farvard.in>
Date:   Wed May 31 18:48:23 2017 +0100

    paused to work on paper


>---------------------------------------------------------------

aac8ad95bf1e60dade358a272ca942c8af7f4bcd
 compiler/llvmGen/Llvm/PpLlvm.hs | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/compiler/llvmGen/Llvm/PpLlvm.hs b/compiler/llvmGen/Llvm/PpLlvm.hs
index c1dd9fd..2253d7d 100644
--- a/compiler/llvmGen/Llvm/PpLlvm.hs
+++ b/compiler/llvmGen/Llvm/PpLlvm.hs
@@ -269,16 +269,22 @@ ppCall ct fptr args attrs = let
                         ++ " called with either global var of function type or "
                         ++ "local var of pointer function type."
                         
-        ppRegularCall tailMarker (LlvmFunctionDecl _ _ cc ret argTy params _) =
-            let ppValues = hsep $ punctuate comma $ map ppCallMetaExpr args
-                ppArgTy  = (ppCommaJoin $ map fst params) <>
-                           (case argTy of
-                               VarArgs   -> text ", ..."
-                               FixedArgs -> empty)
-                fnty = space <> lparen <> ppArgTy <> rparen
+        ppRegularCall tailmrk (LlvmFunctionDecl _ _ cc ret argTy params _) = let
+                ppRet = ppr ret
+                ppFnName = ppName fptr
+                ppArgs = hsep $ punctuate comma $ map ppCallMetaExpr args
+                ppArgTys  = (ppCommaJoin $ map fst params) <>
+                               (case argTy of
+                                   VarArgs   -> text ", ..."
+                                   FixedArgs -> empty)
+            in
+                ppCallWith tailmrk cc ppRet ppFnName ppArgTys ppArgs
+            
+        ppCallWith tailmrk cc ppRet ppFnName ppArgTys ppArgs =
+            let fnty = space <> lparen <> ppArgTys <> rparen
                 attrDoc = ppSpaceJoin attrs
-            in  tailMarker <> text "call" <+> ppr cc <+> ppr ret
-                    <> fnty <+> ppName fptr <> lparen <+> ppValues
+            in  tailmrk <> text "call" <+> ppr cc <+> ppRet
+                    <> fnty <+> ppFnName <> lparen <+> ppArgs
                     <+> rparen <+> attrDoc
 
         -- Metadata needs to be marked as having the `metadata` type when used



More information about the ghc-commits mailing list