summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmExpr.hs
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@mit.edu>2011-06-14 18:21:50 +0100
committerEdward Z. Yang <ezyang@mit.edu>2011-06-14 18:21:50 +0100
commitffd3bd85a6febeec05c99d0da7dfdf34cad59caf (patch)
tree80e73a53b4b51b4f6b285c7a33288ba6ef02b732 /compiler/cmm/CmmExpr.hs
parent7ed114cd6980f62e8473932dee2fc22dca1d2118 (diff)
downloadhaskell-ffd3bd85a6febeec05c99d0da7dfdf34cad59caf.tar.gz
Implement regslot inlining, document soundness concerns.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Diffstat (limited to 'compiler/cmm/CmmExpr.hs')
-rw-r--r--compiler/cmm/CmmExpr.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/cmm/CmmExpr.hs b/compiler/cmm/CmmExpr.hs
index 869bc1b4ac..b8cd3280e8 100644
--- a/compiler/cmm/CmmExpr.hs
+++ b/compiler/cmm/CmmExpr.hs
@@ -10,7 +10,7 @@ module CmmExpr
, DefinerOfSlots, UserOfSlots, foldSlotsDefd, foldSlotsUsed
, RegSet, emptyRegSet, elemRegSet, extendRegSet, deleteFromRegSet, mkRegSet
, plusRegSet, minusRegSet, timesRegSet
- , regUsedIn
+ , regUsedIn, regSlot
, Area(..), AreaId(..), SubArea, SubAreaSet, AreaMap, isStackSlotOf
, module CmmMachOp
, module CmmType
@@ -267,6 +267,9 @@ 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 [_$_]
-----------------------------------------------------------------------------