import CmmExpr
import Cmm ( GenCmm(..), GenCmmTop(..), CmmStatic, CmmInfo
- , CmmCallTarget(..), CmmActuals, CmmFormals
+ , CmmCallTarget(..), CmmActuals, CmmFormals, CmmHinted(..)
, CmmStmt(CmmSwitch) -- imported in order to call ppr
)
import PprCmm()
import FastString
import ForeignCall
import MachOp
-import qualified ZipDataflow as DF
+import qualified ZipDataflow0 as DF
import ZipCfg
import MkZipCfg
last (LastCondBranch e _ _) = foldRegsUsed f z e
last (LastSwitch e _tbl) = foldRegsUsed f z e
-instance UserOfLocalRegs (ZLast Last) where
- foldRegsUsed f z (LastOther l) = foldRegsUsed f z l
- foldRegsUsed _f z LastExit = z
-
----------------------------------------------------------------------
----- Instance declarations for prettyprinting (avoids recursive imports)
instance DF.DebugNodes Middle Last
-instance Outputable CmmGraph where
- ppr = pprLgraph
-
debugPpr :: Bool
debugPpr = debugIsOn
ppr_target fn' = parens (ppr fn')
-pprHinted :: Outputable a => (a, MachHint) -> SDoc
-pprHinted (a, NoHint) = ppr a
-pprHinted (a, PtrHint) = doubleQuotes (text "address") <+> ppr a
-pprHinted (a, SignedHint) = doubleQuotes (text "signed") <+> ppr a
-pprHinted (a, FloatHint) = doubleQuotes (text "float") <+> ppr a
+pprHinted :: Outputable a => CmmHinted a -> SDoc
+pprHinted (CmmHinted a NoHint) = ppr a
+pprHinted (CmmHinted a PtrHint) = doubleQuotes (text "address") <+> ppr a
+pprHinted (CmmHinted a SignedHint) = doubleQuotes (text "signed") <+> ppr a
+pprHinted (CmmHinted a FloatHint) = doubleQuotes (text "float") <+> ppr a
pprLast :: Last -> SDoc
pprLast stmt = (case stmt of