Commit 1c155370 authored by lewie's avatar lewie
Browse files

[project @ 1999-12-20 22:21:09 by lewie]

Remove *uses* of unused IntAbsOp (see recent log message in prelude/PrimOp).
parent 4f79c6ac
...@@ -375,7 +375,6 @@ primOpCosts IntMulOp = Cost (3, 1, 0, 0, 0) + umul_costs ...@@ -375,7 +375,6 @@ primOpCosts IntMulOp = Cost (3, 1, 0, 0, 0) + umul_costs
primOpCosts IntQuotOp = Cost (3, 1, 0, 0, 0) + div_costs primOpCosts IntQuotOp = Cost (3, 1, 0, 0, 0) + div_costs
primOpCosts IntRemOp = Cost (3, 1, 0, 0, 0) + rem_costs primOpCosts IntRemOp = Cost (3, 1, 0, 0, 0) + rem_costs
primOpCosts IntNegOp = Cost (1, 1, 0, 0, 0) -- translates into 1 sub primOpCosts IntNegOp = Cost (1, 1, 0, 0, 0) -- translates into 1 sub
primOpCosts IntAbsOp = Cost (0, 1, 0, 0, 0) -- abs closure already costed
primOpCosts FloatGtOp = Cost (2, 0, 0, 0, 2) -- expensive f-comp primOpCosts FloatGtOp = Cost (2, 0, 0, 0, 2) -- expensive f-comp
primOpCosts FloatGeOp = Cost (2, 0, 0, 0, 2) -- expensive f-comp primOpCosts FloatGeOp = Cost (2, 0, 0, 0, 2) -- expensive f-comp
...@@ -460,7 +459,7 @@ data PrimOp ...@@ -460,7 +459,7 @@ data PrimOp
-- but these take more than that; see special cases in primOpCosts -- but these take more than that; see special cases in primOpCosts
-- I counted the generated ass. instructions for these -> checked -- I counted the generated ass. instructions for these -> checked
| IntMulOp | IntQuotOp | IntMulOp | IntQuotOp
| IntRemOp | IntNegOp | IntAbsOp | IntRemOp | IntNegOp
-- Rest is unchecked so far -- HWL -- Rest is unchecked so far -- HWL
......
...@@ -209,7 +209,6 @@ primOpt ...@@ -209,7 +209,6 @@ primOpt
primOpt op arg@[StInt x] primOpt op arg@[StInt x]
= case op of = case op of
IntNegOp -> StInt (-x) IntNegOp -> StInt (-x)
IntAbsOp -> StInt (abs x)
_ -> StPrim op arg _ -> StPrim op arg
primOpt op args@[StInt x, StInt y] primOpt op args@[StInt x, StInt y]
......
...@@ -298,7 +298,6 @@ getRegister (StDouble d) ...@@ -298,7 +298,6 @@ getRegister (StDouble d)
getRegister (StPrim primop [x]) -- unary PrimOps getRegister (StPrim primop [x]) -- unary PrimOps
= case primop of = case primop of
IntNegOp -> trivialUCode (NEG Q False) x IntNegOp -> trivialUCode (NEG Q False) x
IntAbsOp -> trivialUCode (ABS Q) x
NotOp -> trivialUCode NOT x NotOp -> trivialUCode NOT x
...@@ -536,7 +535,6 @@ getRegister (StDouble d) ...@@ -536,7 +535,6 @@ getRegister (StDouble d)
getRegister (StPrim primop [x]) -- unary PrimOps getRegister (StPrim primop [x]) -- unary PrimOps
= case primop of = case primop of
IntNegOp -> trivialUCode (NEGI L) x IntNegOp -> trivialUCode (NEGI L) x
IntAbsOp -> absIntCode x
NotOp -> trivialUCode (NOT L) x NotOp -> trivialUCode (NOT L) x
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment