X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FZipCfg.hs;h=228504ce7c577b7ea953d3b639492448d9fe293d;hb=c9aa9bb5a8a1c5d80b4ec4a186bea3a3f00142cc;hp=80017764ab2872cf56a83ed2db9e03dda792f8f6;hpb=cbdda5e08341edd14a8783200d611d9c8e606a23;p=ghc-hetmet.git diff --git a/compiler/cmm/ZipCfg.hs b/compiler/cmm/ZipCfg.hs index 8001776..228504c 100644 --- a/compiler/cmm/ZipCfg.hs +++ b/compiler/cmm/ZipCfg.hs @@ -1,6 +1,6 @@ module ZipCfg ( -- These data types and names are carefully thought out - BlockId(..) -- ToDo: BlockId should be abstract, but it isn't yet + BlockId(..), mkBlockId -- ToDo: BlockId should be abstract, but it isn't yet , BlockEnv, emptyBlockEnv, lookupBlockEnv, extendBlockEnv, insertBlock, mkBlockEnv , BlockSet, emptyBlockSet, elemBlockSet, extendBlockSet, mkBlockSet , Graph(..), LGraph(..), FGraph(..) @@ -21,7 +21,7 @@ module ZipCfg , pprLgraph, pprGraph - , entry -- exported for the convenience of ZipDataflow, at least for now + , entry -- exported for the convenience of ZipDataflow0, at least for now {- -- the following functions might one day be useful and can be found @@ -75,7 +75,7 @@ the data constructor 'LastExit'. A graph may contain at most one 'LastExit' node, and a graph representing a full procedure should not contain any 'LastExit' nodes. 'LastExit' nodes are used only to splice graphs together, either during graph construction (see module 'MkZipCfg') -or during optimization (see module 'ZipDataflow'). +or during optimization (see module 'ZipDataflow0'). A graph is parameterized over the types of middle and last nodes. Each of these types will typically be instantiated with a subset of C-- statements @@ -639,6 +639,9 @@ newtype BlockId = BlockId Unique instance Uniquable BlockId where getUnique (BlockId u) = u +mkBlockId :: Unique -> BlockId +mkBlockId uniq = BlockId uniq + instance Show BlockId where show (BlockId u) = show u