[commit: ghc] master: Switch to LLVM version 3.8 (672314c)

git at git.haskell.org git at git.haskell.org
Wed Jul 6 19:36:32 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/672314cbeb8ac386a58f17dc4650dbdf4c55d8b5/ghc

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

commit 672314cbeb8ac386a58f17dc4650dbdf4c55d8b5
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date:   Thu Jul 7 05:38:14 2016 +1000

    Switch to LLVM version 3.8
    
    LLVM 3.8 was released a couple of months ago.
    
    Test Plan: Build and test on x86_64/linux (perf-llvm) and armhf/linux.
    
    Reviewers: austin, hvr, rwbarton, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2382


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

672314cbeb8ac386a58f17dc4650dbdf4c55d8b5
 compiler/llvmGen/Llvm/PpLlvm.hs | 2 +-
 compiler/llvmGen/Llvm/Types.hs  | 8 ++++++++
 configure.ac                    | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/compiler/llvmGen/Llvm/PpLlvm.hs b/compiler/llvmGen/Llvm/PpLlvm.hs
index 47e26ab..c9c1f95 100644
--- a/compiler/llvmGen/Llvm/PpLlvm.hs
+++ b/compiler/llvmGen/Llvm/PpLlvm.hs
@@ -73,7 +73,7 @@ ppLlvmGlobal (LMGlobal var@(LMGlobalVar _ _ link x a c) dat) =
             Nothing -> empty
 
         rhs = case dat of
-            Just stat -> ppr stat
+            Just stat -> pprSpecialStatic stat
             Nothing   -> ppr (pLower $ getVarType var)
 
         -- Position of linkage is different for aliases.
diff --git a/compiler/llvmGen/Llvm/Types.hs b/compiler/llvmGen/Llvm/Types.hs
index 5c2ce5e..d2cab44 100644
--- a/compiler/llvmGen/Llvm/Types.hs
+++ b/compiler/llvmGen/Llvm/Types.hs
@@ -175,6 +175,14 @@ instance Outputable LlvmStatic where
   ppr (LMSub s1 s2)
       = pprStaticArith s1 s2 (sLit "sub") (sLit "fsub") "LMSub"
 
+
+pprSpecialStatic :: LlvmStatic -> SDoc
+pprSpecialStatic (LMBitc v t) =
+    ppr (pLower t) <> text ", bitcast (" <> ppr v <> text " to " <> ppr t
+        <> char ')'
+pprSpecialStatic stat = ppr stat
+
+
 pprStaticArith :: LlvmStatic -> LlvmStatic -> LitString -> LitString -> String -> SDoc
 pprStaticArith s1 s2 int_op float_op op_name =
   let ty1 = getStatType s1
diff --git a/configure.ac b/configure.ac
index 664deb4..f4b839e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -521,7 +521,7 @@ esac
 # tools we are looking for. In the past, GHC supported a number of
 # versions of LLVM simultaneously, but that stopped working around
 # 3.5/3.6 release of LLVM.
-LlvmVersion=3.7
+LlvmVersion=3.8
 AC_SUBST([LlvmVersion])
 sUPPORTED_LLVM_VERSION=$(echo \($LlvmVersion\) | sed 's/\./,/')
 AC_DEFINE_UNQUOTED([sUPPORTED_LLVM_VERSION], ${sUPPORTED_LLVM_VERSION}, [The supported LLVM version number])



More information about the ghc-commits mailing list