X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fcmm%2FCmmCvt.hs;h=7f5de60f995681e35bc7eeae49b282ed383d2980;hp=886902785394ac63ae2bf47638a8ceadedc39664;hb=1e50fd4185479a62e02d987bdfcb1c62712859ca;hpb=e239aa2329416a2822fcc03c4ed486c7d28739e1 diff --git a/compiler/cmm/CmmCvt.hs b/compiler/cmm/CmmCvt.hs index 8869027..7f5de60 100644 --- a/compiler/cmm/CmmCvt.hs +++ b/compiler/cmm/CmmCvt.hs @@ -6,22 +6,17 @@ where import BlockId import Cmm -import CmmExpr import MkZipCfgCmm hiding (CmmGraph) -import ZipCfg -- imported for reverse conversion import ZipCfgCmmRep -- imported for reverse conversion import CmmZipUtil import PprCmm() import qualified ZipCfg as G import FastString -import Monad +import Control.Monad import Outputable -import Panic import UniqSupply -import Maybe - cmmToZgraph :: GenCmm d h (ListGraph CmmStmt) -> UniqSM (GenCmm d h (CmmStackInfo, CmmGraph)) cmmOfZgraph :: GenCmm d h (CmmStackInfo, CmmGraph) -> GenCmm d h (ListGraph CmmStmt) @@ -36,7 +31,7 @@ toZgraph _ _ (ListGraph []) = do g <- lgraphOfAGraph emptyAGraph return ((0, Nothing), g) toZgraph fun_name args g@(ListGraph (BasicBlock id ss : other_blocks)) = - let (offset, entry) = mkEntry id NativeCall args in + let (offset, entry) = mkEntry id NativeNodeCall args in do g <- labelAGraph id $ entry <*> mkStmts ss <*> foldr addBlock emptyAGraph other_blocks return ((offset, Nothing), g) @@ -48,7 +43,7 @@ toZgraph fun_name args g@(ListGraph (BasicBlock id ss : other_blocks)) = mkStmts (CmmAssign l r : ss) = mkAssign l r <*> mkStmts ss mkStmts (CmmStore l r : ss) = mkStore l r <*> mkStmts ss mkStmts (CmmCall (CmmCallee f conv) res args (CmmSafe _) CmmMayReturn : ss) = - mkCall f conv' (map hintlessCmm res) (map hintlessCmm args) updfr_sz + mkCall f (conv', conv') (map hintlessCmm res) (map hintlessCmm args) updfr_sz <*> mkStmts ss where conv' = Foreign (ForeignConvention conv [] []) -- JD: DUBIOUS mkStmts (CmmCall (CmmPrim {}) _ _ (CmmSafe _) _ : _) = @@ -94,7 +89,7 @@ get_hints (Foreign (ForeignConvention _ _ hints)) Results = hints get_hints _other_conv _vd = repeat NoHint get_conv :: MidCallTarget -> Convention -get_conv (PrimTarget _) = NativeCall +get_conv (PrimTarget _) = NativeNodeCall -- JD: SUSPICIOUS get_conv (ForeignTarget _ fc) = Foreign fc cmm_target :: MidCallTarget -> CmmCallTarget