[m-dev.] For review: computing costs more accurately in value numbering

Fergus Henderson fjh at cs.mu.oz.au
Sun Apr 27 23:06:40 AEST 1997


Zoltan Somogyi, you wrote:
> 
> vn_cost:
> 	Some unary and binary operators have the same cost as an assignment.
> 	Don't count this cost twice.

> +:- pred vn_cost__assign_cost_unop(unary_op).
> +:- mode vn_cost__assign_cost_unop(in) is semidet.
> +
> +vn_cost__assign_cost_unop(mktag).
> +vn_cost__assign_cost_unop(tag).
> +vn_cost__assign_cost_unop(unmktag).
> +vn_cost__assign_cost_unop(mkbody).
> +vn_cost__assign_cost_unop(body).
> +vn_cost__assign_cost_unop(unmkbody).
> +vn_cost__assign_cost_unop(bitwise_complement).
> +
> +:- pred vn_cost__assign_cost_binop(binary_op).
> +:- mode vn_cost__assign_cost_binop(in) is semidet.
> +
> +vn_cost__assign_cost_binop(+).
> +vn_cost__assign_cost_binop(-).
> +vn_cost__assign_cost_binop(*).
> +vn_cost__assign_cost_binop(/).
> +vn_cost__assign_cost_binop(mod).
> +vn_cost__assign_cost_binop(<<).
> +vn_cost__assign_cost_binop(>>).
> +vn_cost__assign_cost_binop(&).
> +vn_cost__assign_cost_binop('|').
> +vn_cost__assign_cost_binop(and).
> +vn_cost__assign_cost_binop(or).

Please document the intended meaning of these predicates.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list