X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgMonad.lhs;h=b96db8022eda052492fc12d9da2e2753920fe438;hb=f83010b119096699d1efef2f7bb45460719c48f9;hp=d40c5113271d3c6c5309e3d83b22a75538bb01c7;hpb=1f46671fe24c7155ee64091b71b77dd66909e7a0;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgMonad.lhs b/compiler/codeGen/CgMonad.lhs index d40c511..b96db80 100644 --- a/compiler/codeGen/CgMonad.lhs +++ b/compiler/codeGen/CgMonad.lhs @@ -79,6 +79,7 @@ import FastString import Outputable import Control.Monad +import Data.List infixr 9 `thenC` -- Right-associative! infixr 9 `thenFC` @@ -246,6 +247,7 @@ flattenCgStmts id stmts = isJump (CmmJump _ _) = True isJump (CmmBranch _) = True isJump (CmmSwitch _ _) = True +isJump (CmmReturn _) = True isJump _ = False isOrdinaryStmt (CgStmt _) = True @@ -745,7 +747,7 @@ emitSimpleProc :: CLabel -> Code -> Code emitSimpleProc lbl code = do { stmts <- getCgStmts code ; blks <- cgStmtsToBlocks stmts - ; emitProc (CmmNonInfo Nothing) lbl [] blks } + ; emitProc (CmmInfo Nothing Nothing CmmNonInfoTable) lbl [] blks } getCmm :: Code -> FCode Cmm -- Get all the CmmTops (there should be no stmts)