This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: BPs & cleanups for ARRAY_SIZE
- To: law at cygnus dot com
- Subject: Re: PATCH: BPs & cleanups for ARRAY_SIZE
- From: Greg McGary <greg at mcgary dot org>
- Date: 23 Aug 2000 12:21:07 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <17127.967057109@upchuck>
Jeffrey A Law <law@cygnus.com> writes:
> ... Presumably becuase you want to do bounds checking on GCC itself?
Yes.
> Yes, but it's registering nodes that need to be scanned in the garbage
> collector, which is run a lot more often than init_emit_once :-) Maybe
> it isn't actually important -- I'm not all that familiar with the code.
There's a small space overhead of ten words, since you need to
allocate three gcc_root structs instead of one. There's a small
runtime overhead since you need to go 'round the loop in
ggc_mark_roots twice more and do 4 assignments per extra iteration.
However, the time in gcc_mark_roots is dominated by the calls to
ggc_mark_* (In this case, ggc_mark_rtx_ptr, which is quite
heavy-weight), which must occur for each element of
const_tiny_rtx[][], and that number of calls doesn't change with my
patch.