warning police
[ghc-hetmet.git] / compiler / nativeGen / AsmCodeGen.lhs
index ebff1f0..8fdd31a 100644 (file)
@@ -7,11 +7,11 @@
 -- -----------------------------------------------------------------------------
 
 \begin{code}
-{-# OPTIONS_GHC -w #-}
+{-# OPTIONS -w #-}
 -- The above warning supression flag is a temporary kludge.
 -- While working on this module you are encouraged to remove it and fix
 -- any warnings in the module. See
---     http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings
+--     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
 -- for details
 
 module AsmCodeGen ( nativeCodeGen ) where
@@ -197,9 +197,10 @@ cmmNativeGens dflags h us (cmm : cmms) impAcc profAcc
                        else []
 
        -- force evaulation of imports and lsPprNative to avoid space leak
-       seqString (showSDoc $ vcat $ map ppr imports)
-        `seq`  lsPprNative
-        `seq`  cmmNativeGens dflags h us' cmms
+       seqString (showSDoc $ vcat $ map ppr imports) `seq` return ()
+       lsPprNative `seq` return ()
+
+       cmmNativeGens dflags h us' cmms
                        (imports : impAcc)
                        ((lsPprNative, colorStats, linearStats) : profAcc)
 
@@ -267,15 +268,6 @@ cmmNativeGen dflags us cmm
                                emptyUFM
                        $ map RealReg allocatableRegs
 
-               -- aggressively coalesce moves between virtual regs
-               let (coalesced, usCoalesce)
-                       = {-# SCC "regCoalesce" #-}
-                         initUs usLive $ regCoalesce withLiveness
-
-               dumpIfSet_dyn dflags
-                       Opt_D_dump_asm_coalesce "Reg-Reg moves coalesced"
-                       (vcat $ map ppr coalesced)
-
                -- if any of these dump flags are turned on we want to hang on to
                --      intermediate structures in the allocator - otherwise tell the
                --      allocator to ditch them early so we don't end up creating space leaks.
@@ -287,12 +279,12 @@ cmmNativeGen dflags us cmm
                -- graph coloring register allocation
                let ((alloced, regAllocStats), usAlloc)
                        = {-# SCC "regAlloc(color)" #-}
-                         initUs usCoalesce
+                         initUs usLive
                          $ Color.regAlloc
                                generateRegAllocStats
                                alloc_regs
                                (mkUniqSet [0..maxSpillSlots])
-                               coalesced
+                               withLiveness
 
                -- dump out what happened during register allocation
                dumpIfSet_dyn dflags
@@ -311,10 +303,11 @@ cmmNativeGen dflags us cmm
                         then Just regAllocStats else Nothing
 
                -- force evaluation of the Maybe to avoid space leak
-               mPprStats
-                `seq`  return  ( alloced, usAlloc
-                               , mPprStats
-                               , Nothing)
+               mPprStats `seq` return ()
+
+               return  ( alloced, usAlloc
+                       , mPprStats
+                       , Nothing)
 
          else do
                -- do linear register allocation
@@ -333,10 +326,11 @@ cmmNativeGen dflags us cmm
                         then Just (catMaybes regAllocStats) else Nothing
 
                -- force evaluation of the Maybe to avoid space leak
-               mPprStats
-                `seq`  return  ( alloced, usAlloc
-                               , Nothing
-                               , mPprStats)
+               mPprStats `seq` return ()
+
+               return  ( alloced, usAlloc
+                       , Nothing
+                       , mPprStats)
 
        ---- shortcut branches
        let shorted     =