This is the mail archive of the gcc@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: Serious performance regression -- some tree optimizer questions


On Wed, Dec 29, 2004 at 09:34:27PM +0100, Toon Moene wrote:
> [ Serious performance regression in SPEC2000's mgrid*.f* ]
> 
> >It is not always constant.
> >Consider say unsigned int i; on LP64 target and
> >char A[(long) UINT_MAX + 1];
> >&A[i+1] - &A[i] is (ptrdiff_t) 1 unless i == UINT_MAX, for which
> >it is - (ptrdiff_t) UINT_MAX.
> 
> Oh, sure, but we are talking Fortran here - you can't apply the 
> limitations of C to a discussion about optimizing Fortran code.  Fortran 
> knows of no UINT_MAX, or the intrincacies of C's ptrdiff_t.

I thought we were talking about middle-end and there is just one middle-end
used by both Fortran and C.
My point was just that extra care needs to be taken when handling
&A[i+1] - &A[i] folding in fold-const.  You can optimize most of these
even for C, but not all.

	Jakub


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