projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
default ppr method for CmmGraph now tells more about the representation
[ghc-hetmet.git]
/
compiler
/
cmm
/
PprCmmZ.hs
diff --git
a/compiler/cmm/PprCmmZ.hs
b/compiler/cmm/PprCmmZ.hs
index
390bca6
..
c6eb4ae
100644
(file)
--- a/
compiler/cmm/PprCmmZ.hs
+++ b/
compiler/cmm/PprCmmZ.hs
@@
-1,7
+1,6
@@
-{-# OPTIONS -Wall -fno-warn-name-shadowing -fno-warn-orphans #-}
-module PprCmmZ
- ( pprCmmGraph
+module PprCmmZ
+ ( pprCmmGraphLikeCmm
)
where
)
where
@@
-13,21
+12,14
@@
import PprCmm()
import Outputable
import qualified ZipCfgCmm as G
import qualified ZipCfg as Z
import Outputable
import qualified ZipCfgCmm as G
import qualified ZipCfg as Z
-import qualified ZipDataflow as DF
import CmmZipUtil
import UniqSet
import FastString
----------------------------------------------------------------
import CmmZipUtil
import UniqSet
import FastString
----------------------------------------------------------------
-instance DF.DebugNodes G.Middle G.Last
-
-
-instance Outputable G.CmmGraph where
- ppr = pprCmmGraph
-
-pprCmmGraph :: G.CmmGraph -> SDoc
-pprCmmGraph g = vcat (swallow blocks)
+pprCmmGraphLikeCmm :: G.CmmGraph -> SDoc
+pprCmmGraphLikeCmm g = vcat (swallow blocks)
where blocks = Z.postorder_dfs g
swallow :: [G.CmmBlock] -> [SDoc]
swallow [] = []
where blocks = Z.postorder_dfs g
swallow :: [G.CmmBlock] -> [SDoc]
swallow [] = []
@@
-110,3
+102,4
@@
pprCmmGraph g = vcat (swallow blocks)
in Z.fold_blocks add Z.emptyBlockSet g
unique_pred id = Z.elemBlockSet id single_preds
in Z.fold_blocks add Z.emptyBlockSet g
unique_pred id = Z.elemBlockSet id single_preds
+