X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgMonad.lhs;h=b96db8022eda052492fc12d9da2e2753920fe438;hb=5f00461a637a25a6facecda2d9b0a2c0a44e9008;hp=e3c8a77d58dffa66f159ef853854bb43154249b7;hpb=f96e9aa0444de0e673b3c4055c6e43299639bc5b;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgMonad.lhs b/compiler/codeGen/CgMonad.lhs index e3c8a77..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 lbl [] blks } + ; emitProc (CmmInfo Nothing Nothing CmmNonInfoTable) lbl [] blks } getCmm :: Code -> FCode Cmm -- Get all the CmmTops (there should be no stmts)