This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question on build_int_cst
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 18 Aug 2004 13:11:29 +0100
- Subject: Re: Question on build_int_cst
- Organization: Codesourcery LLC
- References: <10408181154.AA17182@vlsi1.ultra.nyu.edu>
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