This is the mail archive of the gcc-patches@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: [patch, commited] Improve # of iterations estimation and its usage


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


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