PATCH: BPs & cleanups for ARRAY_SIZE

Greg McGary greg@mcgary.org
Wed Aug 23 12:21:00 GMT 2000


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.


More information about the Gcc-patches mailing list