[commit: ghc] wip/kavon-nosplit-llvm: time to create a Rewrite for the LLVM Mangler (ce2c66f)

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


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

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

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

commit ce2c66f16e3ac46f962b736cfef21e3c319962d4
Author: Kavon Farvardin <kavon at farvard.in>
Date:   Mon Jun 5 15:04:40 2017 +0100

    time to create a Rewrite for the LLVM Mangler


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

ce2c66f16e3ac46f962b736cfef21e3c319962d4
 compiler/llvmGen/LlvmMangler.hs | 6 ++++--
 compiler/main/DriverPipeline.hs | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/compiler/llvmGen/LlvmMangler.hs b/compiler/llvmGen/LlvmMangler.hs
index acf344f..0bdb688 100644
--- a/compiler/llvmGen/LlvmMangler.hs
+++ b/compiler/llvmGen/LlvmMangler.hs
@@ -19,10 +19,12 @@ import Outputable ( text )
 import Control.Exception
 import qualified Data.ByteString.Char8 as B
 import System.IO
+import Cmm
+import Compiler.Hoopl
 
 -- | Read in assembly file and process
-llvmFixupAsm :: DynFlags -> FilePath -> FilePath -> IO ()
-llvmFixupAsm dflags f1 f2 = {-# SCC "llvm_mangler" #-}
+llvmFixupAsm :: DynFlags -> LabelMap CmmStatics -> FilePath -> FilePath -> IO ()
+llvmFixupAsm dflags gcInfo f1 f2 = {-# SCC "llvm_mangler" #-}
     withTiming (pure dflags) (text "LLVM Mangler") id $
     withBinaryFile f1 ReadMode $ \r -> withBinaryFile f2 WriteMode $ \w -> do
         go r w
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 2a94105..d184418 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1551,7 +1551,7 @@ runPhase (RealPhaseWithInfo (Just info) LlvmMangle) input_fn dflags
   = do
       let next_phase = if gopt Opt_SplitObjs dflags then Splitter else As False
       output_fn <- phaseOutputFilename next_phase
-      liftIO $ llvmFixupAsm dflags input_fn output_fn
+      liftIO $ llvmFixupAsm dflags info input_fn output_fn
       return (RealPhase next_phase, output_fn)
       
 runPhase (RealPhaseWithInfo Nothing LlvmMangle) _ _ = panic "phase LlvmMangle needs info!"



More information about the ghc-commits mailing list