X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCmmLiveZ.hs;h=2b502d500c910aa8cade06baa9b7d64971d8f9f3;hb=855444fb5b955353a59e7062a3563f6a9324e676;hp=66cb3f1541531f076d9b3a69c3ed4155e0b3c4aa;hpb=7ed4f0716220b03fe5e04100ddbbc9e37d5323fe;p=ghc-hetmet.git diff --git a/compiler/cmm/CmmLiveZ.hs b/compiler/cmm/CmmLiveZ.hs index 66cb3f1..2b502d5 100644 --- a/compiler/cmm/CmmLiveZ.hs +++ b/compiler/cmm/CmmLiveZ.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -Wall -fno-warn-name-shadowing #-} + module CmmLiveZ ( CmmLive , cmmLivenessZ @@ -16,7 +16,7 @@ import PprCmm() import PprCmmZ() import UniqSet import ZipDataflow -import ZipCfgCmm +import ZipCfgCmmRep ----------------------------------------------------------------------------- -- Calculating what variables are live on entry to a basic block @@ -67,10 +67,10 @@ middleLiveness m = middle m lastLiveness :: Last -> (BlockId -> CmmLive) -> CmmLive lastLiveness l env = last l - where last (LastReturn ress) = gen ress emptyUniqSet - last (LastJump e args) = gen e $ gen args emptyUniqSet - last (LastBranch id args) = gen args $ env id - last (LastCall tgt args (Just k)) = gen tgt $ gen args $ env k - last (LastCall tgt args Nothing) = gen tgt $ gen args $ emptyUniqSet - last (LastCondBranch e t f) = gen e $ unionUniqSets (env t) (env f) + where last (LastReturn) = emptyUniqSet + last (LastJump e) = gen e $ emptyUniqSet + last (LastBranch id) = env id + last (LastCall tgt (Just k)) = gen tgt $ env k + last (LastCall tgt Nothing) = gen tgt $ emptyUniqSet + last (LastCondBranch e t f) = gen e $ unionUniqSets (env t) (env f) last (LastSwitch e tbl) = gen e $ unionManyUniqSets $ map env (catMaybes tbl)