Commit 92957808 authored by Simon Marlow's avatar Simon Marlow

Fix warnings

parent d92bd17f
......@@ -16,7 +16,6 @@ module CmmOpt (
import CmmUtils
import Cmm
import DynFlags
import CLabel
import FastTypes
import Outputable
......
......@@ -168,6 +168,7 @@ pprStmt :: CmmNode e x -> SDoc
pprStmt stmt =
sdocWithDynFlags $ \dflags ->
case stmt of
CmmEntry _ -> empty
CmmComment _ -> empty -- (hang (ptext (sLit "/*")) 3 (ftext s)) $$ ptext (sLit "*/")
-- XXX if the string contains "*/", we need to fix it
-- XXX we probably want to emit these comments when
......@@ -255,6 +256,8 @@ pprStmt stmt =
CmmSwitch arg ids -> sdocWithDynFlags $ \dflags ->
pprSwitch dflags arg ids
_other -> pprPanic "PprC.pprStmt" (ppr stmt)
type Hinted a = (a, ForeignHint)
pprForeignCall :: SDoc -> CCallConv -> [Hinted CmmFormal] -> [Hinted CmmActual]
......
......@@ -42,7 +42,7 @@ llvmCodeGen dflags h us cmms
(cdata,env) = {-# SCC "llvm_split" #-}
foldr split ([], initLlvmEnv dflags) cmm
split (CmmData s d' ) (d,e) = ((s,d'):d,e)
split p@(CmmProc h l live g) (d,e) =
split (CmmProc h l live g) (d,e) =
let lbl = strCLabel_llvm env $
case mapLookup (g_entry g) h of
Nothing -> l
......
......@@ -40,8 +40,8 @@ type LlvmStatements = OrdList LlvmStatement
-- | Top-level of the LLVM proc Code generator
--
genLlvmProc :: LlvmEnv -> RawCmmDecl -> UniqSM (LlvmEnv, [LlvmCmmDecl])
genLlvmProc env proc0@(CmmProc infos lbl live graph) = do
let blocks = toBlockList graph
genLlvmProc env (CmmProc infos lbl live graph) = do
let blocks = toBlockListEntryFirst graph
(env', lmblocks, lmdata) <- basicBlocksCodeGen env live blocks ([], [])
let info = mapLookup (g_entry graph) infos
proc = CmmProc info lbl live (ListGraph lmblocks)
......@@ -274,6 +274,7 @@ genCall env target res args = do
_ -> CC_Ccc
CCallConv -> CC_Ccc
CApiConv -> CC_Ccc
PrimCallConv -> panic "LlvmCodeGen.CodeGen.genCall: PrimCallConv"
PrimTarget _ -> CC_Ccc
......
......@@ -953,7 +953,6 @@ cmmStmtConFold stmt
CmmCondBranch test true false
-> do test' <- cmmExprConFold DataReference test
dflags <- getDynFlags
return $ case test' of
CmmLit (CmmInt 0 _) -> CmmBranch false
CmmLit (CmmInt _ _) -> CmmBranch true
......
......@@ -19,7 +19,6 @@ import BlockId
import DynFlags
import Cmm hiding (topInfoTable)
import Platform
import Outputable
-- | Holds a list of source and destination registers used by a
-- particular instruction.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment