summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/cmm/CmmOpt.hs1
-rw-r--r--compiler/codeGen/CgPrimOp.hs3
-rw-r--r--compiler/ghci/ByteCodeAsm.lhs6
-rw-r--r--compiler/nativeGen/AsmCodeGen.lhs1
-rw-r--r--compiler/nativeGen/MachCodeGen.hs1
-rw-r--r--compiler/nativeGen/RegisterAlloc.hs13
-rw-r--r--compiler/ndpFlatten/Flattening.hs4
-rw-r--r--compiler/utils/StringBuffer.lhs1
8 files changed, 5 insertions, 25 deletions
diff --git a/compiler/cmm/CmmOpt.hs b/compiler/cmm/CmmOpt.hs
index 4b2a488897..0a6c193546 100644
--- a/compiler/cmm/CmmOpt.hs
+++ b/compiler/cmm/CmmOpt.hs
@@ -18,7 +18,6 @@ import Cmm
import CmmUtils
import CLabel
import MachOp
-import SMRep
import StaticFlags
import UniqFM
diff --git a/compiler/codeGen/CgPrimOp.hs b/compiler/codeGen/CgPrimOp.hs
index 01279b453d..d26d9c6901 100644
--- a/compiler/codeGen/CgPrimOp.hs
+++ b/compiler/codeGen/CgPrimOp.hs
@@ -20,16 +20,13 @@ import CgBindery
import CgMonad
import CgInfoTbls
import CgUtils
-import ForeignCall
import Cmm
import CLabel
import CmmUtils
import MachOp
-import SMRep
import PrimOp
import SMRep
import Constants
-import StaticFlags
import Outputable
-- ---------------------------------------------------------------------------
diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs
index 31cbd251cb..9060138488 100644
--- a/compiler/ghci/ByteCodeAsm.lhs
+++ b/compiler/ghci/ByteCodeAsm.lhs
@@ -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
- 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
diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs
index a04c5c7527..1cbdb7b98a 100644
--- a/compiler/nativeGen/AsmCodeGen.lhs
+++ b/compiler/nativeGen/AsmCodeGen.lhs
@@ -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)
- final_us = natm_us final_st
final_delta = natm_delta final_st
final_imports = natm_imports final_st
; if final_delta == 0
diff --git a/compiler/nativeGen/MachCodeGen.hs b/compiler/nativeGen/MachCodeGen.hs
index a940566331..557278c16b 100644
--- a/compiler/nativeGen/MachCodeGen.hs
+++ b/compiler/nativeGen/MachCodeGen.hs
@@ -42,7 +42,6 @@ import FastTypes ( isFastTrue )
import Constants ( wORD_SIZE )
#ifdef DEBUG
-import Outputable ( assertPanic )
import Debug.Trace ( trace )
#endif
diff --git a/compiler/nativeGen/RegisterAlloc.hs b/compiler/nativeGen/RegisterAlloc.hs
index 0a732fbfd9..20f7b61284 100644
--- a/compiler/nativeGen/RegisterAlloc.hs
+++ b/compiler/nativeGen/RegisterAlloc.hs
@@ -102,7 +102,6 @@ import Outputable
#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
@@ -453,7 +452,7 @@ linearRegAlloc block_live sccs = linearRA_SCCs emptyBlockMap emptyStackMap sccs
(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
@@ -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
-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
@@ -987,14 +986,6 @@ setAssigR :: RegMap Loc -> RegM ()
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 #)
diff --git a/compiler/ndpFlatten/Flattening.hs b/compiler/ndpFlatten/Flattening.hs
index 6072ad634f..1286f1f284 100644
--- a/compiler/ndpFlatten/Flattening.hs
+++ b/compiler/ndpFlatten/Flattening.hs
@@ -89,10 +89,6 @@ import BasicTypes (Boxity(..))
import Outputable
import FastString
-
--- FIXME: fro debugging - remove this
-import Debug.Trace (trace)
-
-- standard
import Monad (liftM, foldM)
diff --git a/compiler/utils/StringBuffer.lhs b/compiler/utils/StringBuffer.lhs
index 69caf0ee12..18359456be 100644
--- a/compiler/utils/StringBuffer.lhs
+++ b/compiler/utils/StringBuffer.lhs
@@ -45,7 +45,6 @@ import Foreign
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 )