summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmExpr.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-02-03 15:03:06 +0000
committerSimon Marlow <marlowsd@gmail.com>2012-02-08 15:50:43 +0000
commit76999b605423f530ec17562d772eda1c1672db53 (patch)
tree3ca1208d02ca753ffe07e13fe1bdbc1388d7e9cf /compiler/cmm/CmmExpr.hs
parentcd38928495f9186646273432151259f3d654b7e2 (diff)
downloadhaskell-76999b605423f530ec17562d772eda1c1672db53.tar.gz
New stack layout algorithm
Also: - improvements to code generation: push slow-call continuations on the stack instead of generating explicit continuations - remove unused CmmInfo wrapper type (replace with CmmInfoTable) - squash Area and AreaId together, remove now-unused RegSlot - comment out old unused stack-allocation code that no longer compiles after removal of RegSlot
Diffstat (limited to 'compiler/cmm/CmmExpr.hs')
-rw-r--r--compiler/cmm/CmmExpr.hs20
1 files changed, 2 insertions, 18 deletions
diff --git a/compiler/cmm/CmmExpr.hs b/compiler/cmm/CmmExpr.hs
index 5abbed3522..c22f8d5b76 100644
--- a/compiler/cmm/CmmExpr.hs
+++ b/compiler/cmm/CmmExpr.hs
@@ -18,8 +18,8 @@ module CmmExpr
, RegSet, emptyRegSet, elemRegSet, extendRegSet, deleteFromRegSet, mkRegSet
, plusRegSet, minusRegSet, timesRegSet, sizeRegSet, nullRegSet
, regSetToList
- , regUsedIn, regSlot
- , Area(..), AreaId(..), SubArea, SubAreaSet, AreaMap, isStackSlotOf
+ , regUsedIn
+ , Area(..), SubArea, SubAreaSet, AreaMap
, module CmmMachOp
, module CmmType
)
@@ -71,11 +71,6 @@ data CmmReg
-- | A stack area is either the stack slot where a variable is spilled
-- or the stack space where function arguments and results are passed.
data Area
- = RegSlot LocalReg
- | CallArea AreaId
- deriving (Eq, Ord)
-
-data AreaId
= Old -- See Note [Old Area]
| Young BlockId -- Invariant: must be a continuation BlockId
-- See Note [Continuation BlockId] in CmmNode.
@@ -287,17 +282,6 @@ reg `regUsedIn` CmmMachOp _ es = any (reg `regUsedIn`) es
_ `regUsedIn` CmmStackSlot _ _ = False
-----------------------------------------------------------------------------
--- Stack slots
------------------------------------------------------------------------------
-
-isStackSlotOf :: CmmExpr -> LocalReg -> Bool
-isStackSlotOf (CmmStackSlot (RegSlot r) _) r' = r == r'
-isStackSlotOf _ _ = False
-
-regSlot :: LocalReg -> CmmExpr
-regSlot r = CmmStackSlot (RegSlot r) (widthInBytes $ typeWidth $ localRegType r)
-
------------------------------------------------------------------------------
-- Stack slot use information for expressions and other types [_$_]
-----------------------------------------------------------------------------