This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, commited] Improve # of iterations estimation and its usage
- From: Ian Lance Taylor <iant at google dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 15 Mar 2007 18:58:09 -0700
- Subject: Re: [patch, commited] Improve # of iterations estimation and its usage
- References: <20070316002430.GA27465@atrey.karlin.mff.cuni.cz>
Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> writes:
> we are currently performing prefetching, as we cannot estimate that the
> loop rolls only about 5 times -- the yyy array is at the end of the
> structure, and could extend beyond it (*). However, such usage is quite
> unlikely, and we should take this as a hint and do not prefetch the
> loop.
> (*) Is that actually true? I thought that section 6.5.6 of the c99
> standard draft (the part regarding the pointer arithmetics) can be
> interpreted this way, but I am no longer sure.
I agree: my reading of C99 is that this sort of access is prohibited.
Instead, C99 provides flexible arrays ( struct s { int a []; }; ) to
support this coding style.
But for our purposes that is irrelevant. People would be very annoyed
if we broke the traditional behaviour.
Ian