diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-07-07 05:38:14 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-07-07 05:40:11 +1000 |
commit | 672314cbeb8ac386a58f17dc4650dbdf4c55d8b5 (patch) | |
tree | 97ca8ebd806a2e9a981b1e74830687b87297a98a /compiler | |
parent | 56f47d4a4e418235285d8b8cfe23bde6473f17fc (diff) | |
download | haskell-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
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/llvmGen/Llvm/PpLlvm.hs | 2 | ||||
-rw-r--r-- | compiler/llvmGen/Llvm/Types.hs | 8 |
2 files changed, 9 insertions, 1 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 |