summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2016-07-07 05:38:14 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2016-07-07 05:40:11 +1000
commit672314cbeb8ac386a58f17dc4650dbdf4c55d8b5 (patch)
tree97ca8ebd806a2e9a981b1e74830687b87297a98a
parent56f47d4a4e418235285d8b8cfe23bde6473f17fc (diff)
downloadhaskell-672314cbeb8ac386a58f17dc4650dbdf4c55d8b5.tar.gz
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
-rw-r--r--compiler/llvmGen/Llvm/PpLlvm.hs2
-rw-r--r--compiler/llvmGen/Llvm/Types.hs8
-rw-r--r--configure.ac2
3 files changed, 10 insertions, 2 deletions
diff --git a/compiler/llvmGen/Llvm/PpLlvm.hs b/compiler/llvmGen/Llvm/PpLlvm.hs
index 47e26ab409..c9c1f95eac 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 5c2ce5e3ee..d2cab4430b 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 664deb4de6..f4b839e523 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])