Implemented and fixed bugs in CmmInfo handling
[ghc-hetmet.git] / compiler / codeGen / CgBindery.lhs
index 66ac9bf..d5a2c69 100644 (file)
@@ -19,6 +19,7 @@ module CgBindery (
        nukeVolatileBinds,
        nukeDeadBindings,
        getLiveStackSlots,
+        getLiveStackBindings,
 
        bindArgsToStack,  rebindToStack,
        bindNewToNode, bindNewToReg, bindArgsToRegs,
@@ -494,3 +495,14 @@ getLiveStackSlots
                                   cg_rep = rep } <- varEnvElts binds, 
                        isFollowableArg rep] }
 \end{code}
+
+\begin{code}
+getLiveStackBindings :: FCode [(VirtualSpOffset, CgIdInfo)]
+getLiveStackBindings
+  = do { binds <- getBinds
+       ; return [(off, bind) |
+                 bind <- varEnvElts binds,
+                 CgIdInfo { cg_stb = VirStkLoc off,
+                            cg_rep = rep} <- [bind],
+                 isFollowableArg rep] }
+\end{code}