Replacing copyins and copyouts with data-movement instructions
[ghc-hetmet.git] / compiler / cmm / CmmCPS.hs
index 25f30a8..025c127 100644 (file)
@@ -13,6 +13,7 @@ module CmmCPS (
 
 #include "HsVersions.h"
 
+import BlockId
 import Cmm
 import CmmLint
 import PprCmm
@@ -359,14 +360,14 @@ continuationMaxStack formats (Continuation _ label _ False blocks) =
                    map stmt_arg_size (brokenBlockStmts block))
 
       final_arg_size (FinalReturn args) =
-          argumentsSize (cmmExprRep . fst) args
+          argumentsSize (cmmExprRep . kindlessCmm) args
       final_arg_size (FinalJump _ args) =
-          argumentsSize (cmmExprRep . fst) args
+          argumentsSize (cmmExprRep . kindlessCmm) args
       final_arg_size (FinalCall next _ _ args _ _ True) = 0
       final_arg_size (FinalCall next _ _ args _ _ False) =
           -- We have to account for the stack used when we build a frame
           -- for the *next* continuation from *this* continuation
-          argumentsSize (cmmExprRep . fst) args +
+          argumentsSize (cmmExprRep . kindlessCmm) args +
           continuation_frame_size next_format
           where 
             next_format = maybe unknown_format id $ lookup next' formats
@@ -375,7 +376,7 @@ continuationMaxStack formats (Continuation _ label _ False blocks) =
       final_arg_size _ = 0
 
       stmt_arg_size (CmmJump _ args) =
-          argumentsSize (cmmExprRep . fst) args
+          argumentsSize (cmmExprRep . kindlessCmm) args
       stmt_arg_size (CmmCall _ _ _ (CmmSafe _) _) =
           panic "Safe call in processFormats"
       stmt_arg_size (CmmReturn _) =