X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FPprCmmZ.hs;h=1e5f52f45f6c82e9955eb2c5e7edbb5704899398;hb=3269b15da0e701820b765003eeb3b931560bf645;hp=e9b2d6c1fed056f79e18eb55e67bd906fd836733;hpb=569348e87434f2a8d9e18dccac8b4a563b4eb363;p=ghc-hetmet.git diff --git a/compiler/cmm/PprCmmZ.hs b/compiler/cmm/PprCmmZ.hs index e9b2d6c..1e5f52f 100644 --- a/compiler/cmm/PprCmmZ.hs +++ b/compiler/cmm/PprCmmZ.hs @@ -4,8 +4,7 @@ module PprCmmZ ) where -#include "HsVersions.h" - +import BlockId import Cmm import CmmExpr import ForeignCall @@ -83,7 +82,7 @@ pprCmmGraphLikeCmm g = vcat (swallow blocks) let call = CmmCall tgt' ress args (CmmSafe srt) CmmMayReturn tgt' = CmmCallee tgt (cconv_of_conv conv) delayed = - ptext SLIT("// delayed CopyIn follows previous call") + ptext (sLit "// delayed CopyIn follows previous call") in tail id (delayed : ppr call : prev') Nothing t bs | otherwise -> endblock $ with_out out l findCopyIn (Z.ZTail (G.CopyIn _ ress srt) _) = Just (ress, srt) @@ -95,31 +94,31 @@ pprCmmGraphLikeCmm g = vcat (swallow blocks) Just (conv, args) -> endblock (ppr (G.CopyOut conv args) $$ text "// ") preds = zipPreds g - entry_has_no_pred = case Z.lookupBlockEnv preds (Z.lg_entry g) of + entry_has_no_pred = case lookupBlockEnv preds (Z.lg_entry g) of Nothing -> True Just s -> isEmptyUniqSet s single_preds = let add b single = let id = Z.blockId b - in case Z.lookupBlockEnv preds id of + in case lookupBlockEnv preds id of Nothing -> single Just s -> if sizeUniqSet s == 1 then - Z.extendBlockSet single id + extendBlockSet single id else single - in Z.fold_blocks add Z.emptyBlockSet g - unique_pred id = Z.elemBlockSet id single_preds + in Z.fold_blocks add emptyBlockSet g + unique_pred id = elemBlockSet id single_preds cconv_of_conv (G.ConventionStandard conv _) = conv cconv_of_conv (G.ConventionPrivate {}) = CmmCallConv -- XXX totally bogus with_out :: Maybe (G.Convention, CmmActuals) -> G.Last -> SDoc -with_out Nothing l = ptext SLIT("??no-arguments??") <+> ppr l +with_out Nothing l = ptext (sLit "??no-arguments??") <+> ppr l with_out (Just (conv, args)) l = last l where last (G.LastCall e k) = - hcat [ptext SLIT("... = foreign "), + hcat [ptext (sLit "... = foreign "), doubleQuotes(ppr conv), space, ppr_target e, parens ( commafy $ map ppr args ), - ptext SLIT(" \"safe\""), - case k of Nothing -> ptext SLIT(" never returns") + ptext (sLit " \"safe\""), + case k of Nothing -> ptext (sLit " never returns") Just _ -> empty, semi ] last (G.LastReturn) = ppr (CmmReturn args)