Fix a build error on powerpc/Linux; spotted by Jeroen Pulles
[ghc-hetmet.git] / compiler / nativeGen / RegLiveness.hs
index 6f21db8..96a264a 100644 (file)
@@ -30,8 +30,7 @@ module RegLiveness (
 
   ) where
 
-#include "HsVersions.h"
-
+import BlockId
 import MachRegs
 import MachInstrs
 import PprMach
@@ -42,10 +41,11 @@ import Digraph
 import Outputable
 import Unique
 import UniqSet
-import LazyUniqFM
+import UniqFM
 import UniqSupply
 import Bag
 import State
+import FastString
 
 import Data.List
 import Data.Maybe
@@ -112,9 +112,9 @@ instance Outputable LiveInstr where
         =  ppr instr
                $$ (nest 8
                        $ vcat
-                       [ pprRegs (ptext SLIT("# born:    ")) (liveBorn live)
-                       , pprRegs (ptext SLIT("# r_dying: ")) (liveDieRead live)
-                       , pprRegs (ptext SLIT("# w_dying: ")) (liveDieWrite live) ]
+                       [ pprRegs (ptext (sLit "# born:    ")) (liveBorn live)
+                       , pprRegs (ptext (sLit "# r_dying: ")) (liveDieRead live)
+                       , pprRegs (ptext (sLit "# w_dying: ")) (liveDieWrite live) ]
                    $+$ space)
 
         where  pprRegs :: SDoc -> RegSet -> SDoc
@@ -205,7 +205,7 @@ slurpConflicts live
                = (consBag rsLiveEntry conflicts, moves)
 
                | otherwise
-               = error "RegLiveness.slurpBlock: bad block"
+               = panic "RegLiveness.slurpBlock: bad block"
 
        slurpLIs rsLive (conflicts, moves) []
                = (consBag rsLive conflicts, moves)
@@ -244,14 +244,14 @@ slurpConflicts live
                                        , moves) lis
 
 
--- | For spill/reloads
+-- | For spill\/reloads
 --
 --     SPILL  v1, slot1
 --     ...
 --     RELOAD slot1, v2
 --
 --     If we can arrange that v1 and v2 are allocated to the same hreg it's more likely
---     the spill/reload instrs can be cleaned and replaced by a nop reg-reg move.
+--     the spill\/reload instrs can be cleaned and replaced by a nop reg-reg move.
 --
 --
 slurpReloadCoalesce :: LiveCmmTop -> Bag (Reg, Reg)
@@ -558,7 +558,7 @@ livenessSCCs blockmap done
                  concatMap tail $
                  groupBy (\(a1, _) (a2, _) -> eq a1 a2) $
                  iterate (\(a, _) -> f a b) $
-                 (a, error "RegisterAlloc.livenessSCCs")
+                 (a, panic "RegLiveness.livenessSCCs")
 
 
             linearLiveness :: BlockMap RegSet -> [NatBasicBlock]