summaryrefslogtreecommitdiff
path: root/compiler/llvmGen/LlvmCodeGen.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-08-23 09:14:46 +0100
committerSimon Marlow <marlowsd@gmail.com>2011-08-25 11:12:31 +0100
commit4efb0abc5b1b3d33036b640f36ed1efcb10e6cd4 (patch)
tree8c49fcc5c8cfe88d76a7f4074d8dc78e3304d5a3 /compiler/llvmGen/LlvmCodeGen.hs
parent190d8e13165bc21411a3357cc685a734a0f36370 (diff)
downloadhaskell-4efb0abc5b1b3d33036b640f36ed1efcb10e6cd4.tar.gz
Renaming only
CmmTop -> CmmDecl CmmPgm -> CmmGroup
Diffstat (limited to 'compiler/llvmGen/LlvmCodeGen.hs')
-rw-r--r--compiler/llvmGen/LlvmCodeGen.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/llvmGen/LlvmCodeGen.hs b/compiler/llvmGen/LlvmCodeGen.hs
index e9c50b25ef..5622221713 100644
--- a/compiler/llvmGen/LlvmCodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen.hs
@@ -33,7 +33,7 @@ import System.IO
-- -----------------------------------------------------------------------------
-- | Top-level of the LLVM Code generator
--
-llvmCodeGen :: DynFlags -> Handle -> UniqSupply -> [RawCmmPgm] -> IO ()
+llvmCodeGen :: DynFlags -> Handle -> UniqSupply -> [RawCmmGroup] -> IO ()
llvmCodeGen dflags h us cmms
= let cmm = concat cmms
(cdata,env) = foldr split ([],initLlvmEnv) cmm
@@ -77,7 +77,7 @@ cmmDataLlvmGens dflags h env (cmm:cmms) lmdata
-- -----------------------------------------------------------------------------
-- | Do LLVM code generation on all these Cmms procs.
--
-cmmProcLlvmGens :: DynFlags -> BufHandle -> UniqSupply -> LlvmEnv -> [RawCmmTop]
+cmmProcLlvmGens :: DynFlags -> BufHandle -> UniqSupply -> LlvmEnv -> [RawCmmDecl]
-> Int -- ^ count, used for generating unique subsections
-> [[LlvmVar]] -- ^ info tables that need to be marked as 'used'
-> IO ()
@@ -102,26 +102,26 @@ cmmProcLlvmGens dflags h us env ((CmmProc _ _ (ListGraph [])) : cmms) count ivar
cmmProcLlvmGens dflags h us env (cmm : cmms) count ivars = do
(us', env', llvm) <- cmmLlvmGen dflags us (clearVars env) cmm
- let (docs, ivar) = mapAndUnzip (pprLlvmCmmTop env' count) llvm
+ let (docs, ivar) = mapAndUnzip (pprLlvmCmmDecl env' count) llvm
Prt.bufLeftRender h $ Prt.vcat docs
cmmProcLlvmGens dflags h us' env' cmms (count + 2) (ivar ++ ivars)
-- | Complete LLVM code generation phase for a single top-level chunk of Cmm.
-cmmLlvmGen :: DynFlags -> UniqSupply -> LlvmEnv -> RawCmmTop
- -> IO ( UniqSupply, LlvmEnv, [LlvmCmmTop] )
+cmmLlvmGen :: DynFlags -> UniqSupply -> LlvmEnv -> RawCmmDecl
+ -> IO ( UniqSupply, LlvmEnv, [LlvmCmmDecl] )
cmmLlvmGen dflags us env cmm = do
-- rewrite assignments to global regs
let fixed_cmm = fixStgRegisters cmm
dumpIfSet_dyn dflags Opt_D_dump_opt_cmm "Optimised Cmm"
- (pprCmmPgm (targetPlatform dflags) [fixed_cmm])
+ (pprCmmGroup (targetPlatform dflags) [fixed_cmm])
-- generate llvm code from cmm
let ((env', llvmBC), usGen) = initUs us $ genLlvmProc env fixed_cmm
dumpIfSet_dyn dflags Opt_D_dump_llvm "LLVM Code"
- (vcat $ map (docToSDoc . fst . pprLlvmCmmTop env' 0) llvmBC)
+ (vcat $ map (docToSDoc . fst . pprLlvmCmmDecl env' 0) llvmBC)
return (usGen, env', llvmBC)