This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question on build_int_cst


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]