X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FRegCoalesce.hs;h=e64dc09ebe074cb3bd801ccd508aeea5f19bc838;hb=97169c5dd31537b28f5f8ad08cd6cdf82c1ecefd;hp=56ffe4f1058b7f0bf824c1e92c0bff62aa118896;hpb=17b297d97d327620ed6bfab942f8992b2446f1bf;p=ghc-hetmet.git diff --git a/compiler/nativeGen/RegCoalesce.hs b/compiler/nativeGen/RegCoalesce.hs index 56ffe4f..e64dc09 100644 --- a/compiler/nativeGen/RegCoalesce.hs +++ b/compiler/nativeGen/RegCoalesce.hs @@ -1,14 +1,6 @@ - -- | Register coalescing. -- -{-# OPTIONS_GHC -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 --- for details - module RegCoalesce ( regCoalesce, slurpJoinMovs @@ -69,12 +61,12 @@ slurpJoinMovs :: LiveCmmTop -> Bag (Reg, Reg) slurpJoinMovs live = slurpCmm emptyBag live where - slurpCmm rs CmmData{} = rs - slurpCmm rs (CmmProc _ _ _ blocks) = foldl' slurpComp rs blocks - slurpComp rs (BasicBlock i blocks) = foldl' slurpBlock rs blocks - slurpBlock rs (BasicBlock i instrs) = foldl' slurpLI rs instrs - - slurpLI rs (Instr _ Nothing) = rs + slurpCmm rs CmmData{} = rs + slurpCmm rs (CmmProc _ _ _ (ListGraph blocks)) = foldl' slurpComp rs blocks + slurpComp rs (BasicBlock _ blocks) = foldl' slurpBlock rs blocks + slurpBlock rs (BasicBlock _ instrs) = foldl' slurpLI rs instrs + + slurpLI rs (Instr _ Nothing) = rs slurpLI rs (Instr instr (Just live)) | Just (r1, r2) <- isRegRegMove instr , elementOfUniqSet r1 $ liveDieRead live