PATCH: Share all CONST_INTs
Mark Mitchell
mark@codesourcery.com
Sat Apr 1 18:50:00 GMT 2000
>>>>> "Anthony" == Anthony Green <green@cygnus.com> writes:
Anthony> Hi Mark -
Anthony> This patch triggers a failure in jc1. It fails on x86
Anthony> Linux while building libgcj.
Shoot -- I had this hunk sitting on my machine for a couple of days
and forgot to check it in. I bet it will fix the problem.
As a side-note, we really don't want to maintain two different memory
allocation systems indefinitely. At this point, I'd argue strongly
against accepting a new front-end now that didn't use GC. I hope that
the Java team will make the conversion to GC soon; it's not really
that much work, and will provide a lot of long-term benefit.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
2000-04-01 Mark Mitchell <mark@codesourcery.com>
* emit-rtl.c (gen_rtx_CONST_INT): Create cached CONST_INTs on the
permanent obstack.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/emit-rtl.c,v
retrieving revision 1.121
diff -c -p -r1.121 emit-rtl.c
*** emit-rtl.c 2000/03/31 08:57:53 1.121
--- emit-rtl.c 2000/04/02 02:47:09
*************** gen_rtx_CONST_INT (mode, arg)
*** 253,259 ****
(hashval_t) arg,
/*insert=*/1);
if (!*slot)
! *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
return (rtx) *slot;
}
--- 253,268 ----
(hashval_t) arg,
/*insert=*/1);
if (!*slot)
! {
! if (!ggc_p)
! {
! push_obstacks_nochange ();
! end_temporary_allocation ();
! }
! *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
! if (!ggc_p)
! pop_obstacks ();
! }
return (rtx) *slot;
}
More information about the Gcc-patches
mailing list