[project @ 2000-11-21 14:31:58 by simonmar]
[ghc-hetmet.git] / ghc / compiler / absCSyn / Costs.lhs
index e94ee6e..063fe13 100644 (file)
@@ -1,7 +1,7 @@
 %
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
-% $Id: Costs.lhs,v 1.23 2000/05/25 12:49:34 panne Exp $
+% $Id: Costs.lhs,v 1.27 2000/10/24 07:35:00 simonpj Exp $
 %
 % Only needed in a GranSim setup -- HWL
 % ---------------------------------------------------------------------------
@@ -71,9 +71,6 @@ data CostRes = Cost (Int, Int, Int, Int, Int)
 
 nullCosts    = Cost (0, 0, 0, 0, 0) :: CostRes
 initHdrCosts = Cost (2, 0, 0, 1, 0) :: CostRes
-errorCosts   = Cost (-1, -1, -1, -1, -1)  -- just for debugging
-
-oneArithm = Cost (1, 0, 0, 0, 0) :: CostRes
 
 instance Eq CostRes where
  (==) t1 t2 = i && b && l && s && f
@@ -289,10 +286,6 @@ addrModeCosts addr_mode side =
     CLit    _     -> if lhs then nullCosts            -- should never occur
                             else Cost (1, 0, 0, 0, 0) -- typ.: mov lit,%reg
 
-    CLitLit _  _   -> if lhs then nullCosts
-                            else Cost (1, 0, 0, 0, 0)
-                     -- same es CLit
-
     CJoinPoint _         -> if lhs then Cost (0, 0, 0, 1, 0)
                                    else Cost (0, 0, 1, 0, 0)
 
@@ -319,10 +312,6 @@ exprMacroCosts side macro mode_list =
 stmtMacroCosts :: CStmtMacro -> [CAddrMode] -> CostRes
 
 stmtMacroCosts macro modes =
-  let
-    arg_costs =          foldl (+) nullCosts
-                       [addrModeCosts mode Rhs | mode <- modes]
-  in
   case macro of
     ARGS_CHK_LOAD_NODE  ->  Cost (2, 1, 0, 0, 0)        {- StgMacros.lh  -}
                -- p=probability of PAP (instead of AP): + p*(3,1,0,0,0)
@@ -372,13 +361,9 @@ gmpOps     =
     , IntegerQuotRemOp , IntegerDivModOp , IntegerNegOp
     , IntegerCmpOp
     , Integer2IntOp  , Int2IntegerOp
-    , Addr2IntegerOp
   ]
 
 
-abs_costs = nullCosts   -- NB:  This is normal STG code with costs already 
-                       --      included; no need to add costs again.
-
 umul_costs = Cost (21,4,0,0,0)    -- due to spy counts
 rem_costs =  Cost (30,15,0,0,0)           -- due to spy counts
 div_costs =  Cost (30,15,0,0,0)           -- due to spy counts