summaryrefslogtreecommitdiff
path: root/compiler/llvmGen
diff options
context:
space:
mode:
authorDavid Terei <davidterei@gmail.com>2011-11-22 12:30:32 -0800
committerDavid Terei <davidterei@gmail.com>2011-11-22 13:12:37 -0800
commitc21ddffb76e4e0191641a6e8df490125fdbfb982 (patch)
tree01e284e42dc836775b7594f024b3170bb61d2692 /compiler/llvmGen
parentaa55fdc580e1b224c500728877975b70caccea8d (diff)
downloadhaskell-c21ddffb76e4e0191641a6e8df490125fdbfb982.tar.gz
Show LLVM mangler and code gen passes at v2
Diffstat (limited to 'compiler/llvmGen')
-rw-r--r--compiler/llvmGen/LlvmCodeGen.hs1
-rw-r--r--compiler/llvmGen/LlvmMangler.hs7
2 files changed, 6 insertions, 2 deletions
diff --git a/compiler/llvmGen/LlvmCodeGen.hs b/compiler/llvmGen/LlvmCodeGen.hs
index 53b859103c..b29c215ad2 100644
--- a/compiler/llvmGen/LlvmCodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen.hs
@@ -45,6 +45,7 @@ llvmCodeGen dflags h us cmms
env' = funInsert lbl llvmFunTy e
in (d,env')
in do
+ showPass dflags "LlVM CodeGen"
bufh <- newBufHandle h
Prt.bufLeftRender bufh $ pprLlvmHeader
ver <- (fromMaybe defaultLlvmVersion) `fmap` figureLlvmVersion dflags
diff --git a/compiler/llvmGen/LlvmMangler.hs b/compiler/llvmGen/LlvmMangler.hs
index d5624e5625..ff1dfa207c 100644
--- a/compiler/llvmGen/LlvmMangler.hs
+++ b/compiler/llvmGen/LlvmMangler.hs
@@ -14,6 +14,8 @@ module LlvmMangler ( llvmFixupAsm ) where
#include "HsVersions.h"
+import DynFlags ( DynFlags )
+import ErrUtils ( showPass )
import LlvmCodeGen.Ppr ( infoSection )
import Control.Exception
@@ -54,8 +56,9 @@ dollarPred = ((==) '$')
commaPred = ((==) ',')
-- | Read in assembly file and process
-llvmFixupAsm :: FilePath -> FilePath -> IO ()
-llvmFixupAsm f1 f2 = do
+llvmFixupAsm :: DynFlags -> FilePath -> FilePath -> IO ()
+llvmFixupAsm dflags f1 f2 = do
+ showPass dflags "LlVM Mangler"
r <- openBinaryFile f1 ReadMode
w <- openBinaryFile f2 WriteMode
ss <- readSections r w