X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FZipCfg.hs;h=78eeaed3e6b0639c1d15ce3c8338a730f637780a;hb=25512ca39778bf6882a50db2ede21ffa74ea3ac9;hp=3285b5b0eddd0db752e9f10fbd48c091600c4699;hpb=0d80489c9b9f2421f65d8dd86c1e50c6bb429715;p=ghc-hetmet.git diff --git a/compiler/cmm/ZipCfg.hs b/compiler/cmm/ZipCfg.hs index 3285b5b..78eeaed 100644 --- a/compiler/cmm/ZipCfg.hs +++ b/compiler/cmm/ZipCfg.hs @@ -379,7 +379,7 @@ lastTail :: ZTail m l -> ZLast l lastTail (ZLast l) = l lastTail (ZTail _ t) = lastTail t -tailOfLast l = ZLast (LastOther l) -- ^ tedious to write in every client +tailOfLast l = ZLast (LastOther l) -- tedious to write in every client ------------------ simple graph manipulations @@ -405,7 +405,7 @@ splitp_blocks p blocks = lift $ foldUFM scan (Nothing, emptyBlockEnv) blocks lift (Nothing, _) = Nothing lift (Just b, bs) = Just (b, bs) --- | 'insertBlock' should not be used to *replace* an existing block +-- | 'insertBlock' should not be used to /replace/ an existing block -- but only to insert a new one insertBlock :: Block m l -> BlockEnv (Block m l) -> BlockEnv (Block m l) insertBlock b bs = @@ -443,9 +443,11 @@ single_exitg (Graph tail blocks) = foldUFM add (exit_count (lastTail tail)) bloc -- more mathematically elegant (but results in more complicated code). -- -- Here's an easy way to go wrong! Consider +-- @ -- A -> [B,C] -- B -> D -- C -> D +-- @ -- Then ordinary dfs would give [A,B,D,C] which has a back ref from C to D. -- Better to geot [A,B,C,D]