Warning Police
authorMichael D. Adams <t-madams@microsoft.com>
Thu, 5 Jul 2007 14:29:36 +0000 (14:29 +0000)
committerMichael D. Adams <t-madams@microsoft.com>
Thu, 5 Jul 2007 14:29:36 +0000 (14:29 +0000)
compiler/cmm/CmmOpt.hs
compiler/codeGen/CgPrimOp.hs
compiler/ghci/ByteCodeAsm.lhs
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/MachCodeGen.hs
compiler/nativeGen/RegisterAlloc.hs
compiler/ndpFlatten/Flattening.hs
compiler/utils/StringBuffer.lhs

index 4b2a488..0a6c193 100644 (file)
@@ -18,7 +18,6 @@ import Cmm
 import CmmUtils
 import CLabel
 import MachOp
 import CmmUtils
 import CLabel
 import MachOp
-import SMRep
 import StaticFlags
 
 import UniqFM
 import StaticFlags
 
 import UniqFM
index 01279b4..d26d9c6 100644 (file)
@@ -20,16 +20,13 @@ import CgBindery
 import CgMonad
 import CgInfoTbls
 import CgUtils
 import CgMonad
 import CgInfoTbls
 import CgUtils
-import ForeignCall
 import Cmm
 import CLabel
 import CmmUtils
 import MachOp
 import Cmm
 import CLabel
 import CmmUtils
 import MachOp
-import SMRep
 import PrimOp
 import SMRep
 import Constants
 import PrimOp
 import SMRep
 import Constants
-import StaticFlags
 import Outputable
 
 -- ---------------------------------------------------------------------------
 import Outputable
 
 -- ---------------------------------------------------------------------------
index 31cbd25..9060138 100644 (file)
@@ -168,9 +168,9 @@ assembleBCO (ProtoBCO nm instrs bitmap bsize arity origin malloced)
          -- when (notNull malloced) (addFinalizer ul_bco (mapM_ zonk malloced))
 
          return ul_bco
          -- when (notNull malloced) (addFinalizer ul_bco (mapM_ zonk malloced))
 
          return ul_bco
-     where
-         zonk ptr = do -- putStrLn ("freeing malloc'd block at " ++ show (A# a#))
-                           free ptr
+     -- where
+     --     zonk ptr = do -- putStrLn ("freeing malloc'd block at " ++ show (A# a#))
+     --                      free ptr
 
 mkBitmapArray :: Int -> [StgWord] -> UArray Int StgWord
 mkBitmapArray bsize bitmap
 
 mkBitmapArray :: Int -> [StgWord] -> UArray Int StgWord
 mkBitmapArray bsize bitmap
index a04c5c7..1cbdb7b 100644 (file)
@@ -396,7 +396,6 @@ genMachCode cmm_top
   = do { initial_us <- getUs
        ; let initial_st           = mkNatM_State initial_us 0
              (new_tops, final_st) = initNat initial_st (cmmTopCodeGen cmm_top)
   = do { initial_us <- getUs
        ; let initial_st           = mkNatM_State initial_us 0
              (new_tops, final_st) = initNat initial_st (cmmTopCodeGen cmm_top)
-             final_us             = natm_us final_st
              final_delta          = natm_delta final_st
              final_imports        = natm_imports final_st
        ; if   final_delta == 0
              final_delta          = natm_delta final_st
              final_imports        = natm_imports final_st
        ; if   final_delta == 0
index a940566..557278c 100644 (file)
@@ -42,7 +42,6 @@ import FastTypes      ( isFastTrue )
 import Constants       ( wORD_SIZE )
 
 #ifdef DEBUG
 import Constants       ( wORD_SIZE )
 
 #ifdef DEBUG
-import Outputable      ( assertPanic )
 import Debug.Trace     ( trace )
 #endif
 
 import Debug.Trace     ( trace )
 #endif
 
index 0a732fb..20f7b61 100644 (file)
@@ -102,7 +102,6 @@ import Outputable
 #ifndef DEBUG
 import Data.Maybe      ( fromJust )
 #endif
 #ifndef DEBUG
 import Data.Maybe      ( fromJust )
 #endif
-import Data.Maybe      ( fromMaybe )
 import Data.List       ( nub, partition, mapAccumL, groupBy )
 import Control.Monad   ( when )
 import Data.Word
 import Data.List       ( nub, partition, mapAccumL, groupBy )
 import Control.Monad   ( when )
 import Data.Word
@@ -453,7 +452,7 @@ linearRegAlloc block_live sccs = linearRA_SCCs emptyBlockMap emptyStackMap sccs
        (CyclicSCC blocks : sccs) 
        = getUs `thenUs` \us ->
          let
        (CyclicSCC blocks : sccs) 
        = getUs `thenUs` \us ->
          let
-            ((block_assig', stack', us'), blocks') = mapAccumL processBlock
+            ((block_assig', stack', _), blocks') = mapAccumL processBlock
                                                        (block_assig, stack, us)
                                                        ({-reverse-} blocks)
           in
                                                        (block_assig, stack, us)
                                                        ({-reverse-} blocks)
           in
@@ -968,7 +967,7 @@ spillR reg temp = RegM $ \ s@RA_State{ra_delta=delta, ra_stack=stack} ->
   (# s{ra_stack=stack'}, (instr,slot) #)
 
 loadR :: Reg -> Int -> RegM Instr
   (# s{ra_stack=stack'}, (instr,slot) #)
 
 loadR :: Reg -> Int -> RegM Instr
-loadR reg slot = RegM $ \ s@RA_State{ra_delta=delta, ra_stack=stack} ->
+loadR reg slot = RegM $ \ s@RA_State{ra_delta=delta} ->
   (# s, mkLoadInstr reg delta slot #)
 
 getFreeRegsR :: RegM FreeRegs
   (# s, mkLoadInstr reg delta slot #)
 
 getFreeRegsR :: RegM FreeRegs
@@ -987,14 +986,6 @@ setAssigR :: RegMap Loc -> RegM ()
 setAssigR assig = RegM $ \ s ->
   (# s{ra_assig=assig}, () #)
 
 setAssigR assig = RegM $ \ s ->
   (# s{ra_assig=assig}, () #)
 
-getStackR :: RegM StackMap
-getStackR = RegM $ \ s@RA_State{ra_stack = stack} ->
-  (# s, stack #)
-
-setStackR :: StackMap -> RegM ()
-setStackR stack = RegM $ \ s ->
-  (# s{ra_stack=stack}, () #)
-
 getBlockAssigR :: RegM BlockAssignment
 getBlockAssigR = RegM $ \ s@RA_State{ra_blockassig = assig} ->
   (# s, assig #)
 getBlockAssigR :: RegM BlockAssignment
 getBlockAssigR = RegM $ \ s@RA_State{ra_blockassig = assig} ->
   (# s, assig #)
index 6072ad6..1286f1f 100644 (file)
@@ -89,10 +89,6 @@ import BasicTypes   (Boxity(..))
 import Outputable
 import FastString
 
 import Outputable
 import FastString
 
-
--- FIXME: fro debugging - remove this
-import Debug.Trace  (trace)
-
 -- standard
 import Monad        (liftM, foldM)
 
 -- standard
 import Monad        (liftM, foldM)
 
index 69caf0e..1835945 100644 (file)
@@ -45,7 +45,6 @@ import Foreign
 import System.IO               ( hGetBuf, hFileSize,IOMode(ReadMode), hClose
                                 , Handle, hTell )
 
 import System.IO               ( hGetBuf, hFileSize,IOMode(ReadMode), hClose
                                 , Handle, hTell )
 
-import GHC.Ptr                 ( Ptr(..) )
 import GHC.Exts
 import GHC.IOBase              ( IO(..) )
 import GHC.Base                        ( unsafeChr )
 import GHC.Exts
 import GHC.IOBase              ( IO(..) )
 import GHC.Base                        ( unsafeChr )