[commit: ghc] wip/kavon-nosplit-llvm: setup (cf55006)
git at git.haskell.org
git at git.haskell.org
Tue Jun 27 09:16:11 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/kavon-nosplit-llvm
Link : http://ghc.haskell.org/trac/ghc/changeset/cf55006b50c0282740b81876dc105527875718fd/ghc
>---------------------------------------------------------------
commit cf55006b50c0282740b81876dc105527875718fd
Author: Kavon Farvardin <kavon at farvard.in>
Date: Mon Jun 5 15:09:43 2017 +0100
setup
>---------------------------------------------------------------
cf55006b50c0282740b81876dc105527875718fd
compiler/llvmGen/LlvmMangler.hs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/compiler/llvmGen/LlvmMangler.hs b/compiler/llvmGen/LlvmMangler.hs
index 0bdb688..cc8cf3b 100644
--- a/compiler/llvmGen/LlvmMangler.hs
+++ b/compiler/llvmGen/LlvmMangler.hs
@@ -35,17 +35,20 @@ llvmFixupAsm dflags gcInfo f1 f2 = {-# SCC "llvm_mangler" #-}
go :: Handle -> Handle -> IO ()
go r w = do
e_l <- try $ B.hGetLine r ::IO (Either IOError B.ByteString)
- let writeline a = B.hPutStrLn w (rewriteLine dflags rewrites a) >> go r w
+ let writeline a = B.hPutStrLn w (rewriteLine dflags (rewrites gcInfo) a) >> go r w
case e_l of
Right l -> writeline l
Left _ -> return ()
-- | These are the rewrites that the mangler will perform
-rewrites :: [Rewrite]
-rewrites = [rewriteSymType, rewriteAVX]
+rewrites :: LabelMap CmmStatics -> [Rewrite]
+rewrites info = [rewriteSymType, rewriteAVX, addInfoTable info]
type Rewrite = DynFlags -> B.ByteString -> Maybe B.ByteString
+addInfoTable :: LabelMap CmmStatics -> Rewrite
+addInfoTable info dflags line = Nothing -- TODO(kavon): fill this in
+
-- | Rewrite a line of assembly source with the given rewrites,
-- taking the first rewrite that applies.
rewriteLine :: DynFlags -> [Rewrite] -> B.ByteString -> B.ByteString
More information about the ghc-commits
mailing list