summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmNode.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-03-15 13:01:16 +0000
committerSimon Marlow <marlowsd@gmail.com>2012-03-15 13:25:16 +0000
commitbb7d711c4bb32096df938b30e1c455bc95420db5 (patch)
tree95683115f86d7811efd3de7ce5349e3e9f6e6c6d /compiler/cmm/CmmNode.hs
parent269b440beb4dc692eaeaea62543e430d0f516cff (diff)
downloadhaskell-bb7d711c4bb32096df938b30e1c455bc95420db5.tar.gz
remove dead code
Diffstat (limited to 'compiler/cmm/CmmNode.hs')
-rw-r--r--compiler/cmm/CmmNode.hs31
1 files changed, 0 insertions, 31 deletions
diff --git a/compiler/cmm/CmmNode.hs b/compiler/cmm/CmmNode.hs
index 2a491e9b6b..7b8ee55029 100644
--- a/compiler/cmm/CmmNode.hs
+++ b/compiler/cmm/CmmNode.hs
@@ -280,37 +280,6 @@ instance DefinerOfLocalRegs (CmmNode e x) where
fold f z n = foldRegsDefd f z n
-instance UserOfSlots (CmmNode e x) where
- foldSlotsUsed f z n = case n of
- CmmAssign _ expr -> fold f z expr
- CmmStore addr rval -> fold f (fold f z addr) rval
- CmmUnsafeForeignCall _ _ args -> fold f z args
- CmmCondBranch expr _ _ -> fold f z expr
- CmmSwitch expr _ -> fold f z expr
- CmmCall {cml_target=tgt} -> fold f z tgt
- CmmForeignCall {tgt=tgt, args=args} -> fold f (fold f z tgt) args
- _ -> z
- where fold :: forall a b.
- UserOfSlots a =>
- (b -> SubArea -> b) -> b -> a -> b
- fold f z n = foldSlotsUsed f z n
-
-instance UserOfSlots ForeignTarget where
- foldSlotsUsed f z (ForeignTarget e _) = foldSlotsUsed f z e
- foldSlotsUsed _f z (PrimTarget _) = z
-
-instance DefinerOfSlots (CmmNode e x) where
- foldSlotsDefd f z n = case n of
- CmmStore (CmmStackSlot a i) expr -> f z (a, i, widthInBytes $ typeWidth $ cmmExprType expr)
- -- CmmForeignCall {res=res} -> fold f z $ map foreign_call_slot res
- _ -> z
- where
- fold :: forall a b.
- DefinerOfSlots a =>
- (b -> SubArea -> b) -> b -> a -> b
- fold f z n = foldSlotsDefd f z n
- -- foreign_call_slot r = case widthInBytes $ typeWidth $ localRegType r of w -> (RegSlot r, w, w)
-
-----------------------------------
-- mapping Expr in CmmNode