X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCmmContFlowOpt.hs;h=6909250efb10f9b71314d2dc7397a3846f306750;hb=649d5ed52989f429d10283940793a06111aa8468;hp=3ab479314cfba99acd4bfe6f0630ebb36bb2829a;hpb=25628e2771424cae1b3366322e8ce6f8a85440f9;p=ghc-hetmet.git diff --git a/compiler/cmm/CmmContFlowOpt.hs b/compiler/cmm/CmmContFlowOpt.hs index 3ab4793..6909250 100644 --- a/compiler/cmm/CmmContFlowOpt.hs +++ b/compiler/cmm/CmmContFlowOpt.hs @@ -6,10 +6,10 @@ module CmmContFlowOpt ) where +import BlockId import Cmm import CmmTx import qualified ZipCfg as G -import StackSlot import ZipCfgCmmRep import Maybes @@ -58,7 +58,7 @@ branchChainElim (ListGraph blocks) isLoneBranch :: CmmBasicBlock -> Either (BlockId, BlockId) CmmBasicBlock isLoneBranch (BasicBlock id [CmmBranch target]) | id /= target = Left (id, target) isLoneBranch other_block = Right other_block - -- ^ An infinite loop is not a link in a branch chain! + -- An infinite loop is not a link in a branch chain! replaceLabels :: BlockEnv BlockId -> CmmBasicBlock -> CmmBasicBlock replaceLabels env (BasicBlock id stmts) @@ -95,7 +95,7 @@ isLoneBranchZ :: CmmBlock -> Either (BlockId, BlockId) CmmBlock isLoneBranchZ (G.Block id (G.ZLast (G.LastOther (LastBranch target)))) | id /= target = Left (id,target) isLoneBranchZ other = Right other - -- ^ An infinite loop is not a link in a branch chain! + -- An infinite loop is not a link in a branch chain! replaceLabelsZ :: BlockEnv BlockId -> CmmGraph -> CmmGraph replaceLabelsZ env = replace_eid . G.map_nodes id id last