Question on build_int_cst

Nathan Sidwell nathan@codesourcery.com
Wed Aug 18 13:06:00 GMT 2004


Richard Kenner wrote:
>     it is supposed to be a drop in replacement for
>     	t = build_int_2 (x, y);
> 	TREE_TYPE (t) = z;
> 
> I didn't think we actually did that due to the risk of T being shared.
nope, we did it all over the place. T was never shared from build_int_2.

> I thought it was a replacement for
> 	convert (t, build_int_2 (x, y))
no, it is not. It *permits* removal of the convert, if it is known
that x & y are valid for t.


>     The idea of build_int_cst is to allow sharing of the int_csts so
>     generated.
> 
> Have you thought of checking for a sizetype and calling the corresponding
> function that does share in that case?
I indend to replace the sizetype cache with the mechanism I have implemented.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk




More information about the Gcc mailing list