This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to Avoid Bad Prefetching
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: "Shobaki, Ghassan" <Ghassan dot Shobaki at amd dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 15 Apr 2009 17:52:39 +0200
- Subject: Re: Patch to Avoid Bad Prefetching
- References: <84fc9c000904150216h170269b7v70f5ae2a10110296@mail.gmail.com> <D60441ACF713E84E9952ADA42F2E08B716728E@ssvlexmb2.amd.com>
Hi,
> > I think it would be better to use expected_loop_iterations if the
> > estimate is not available, rather than introducing a new param
> > (while it is likely not more precise, we have way too many params
> > as it is).
>
> > I agree. IMHO for prefetching we should recommend profile-feedback.
>
> The point is that in the prefetching profitability analysis, we must
> have a very conservative estimate for unknown trip counts or we may
> get a big performance degradation as shown in the benchmark numbers I
> included. By conservative, I mean something like 3 or 4 iterations
> only. In other words, if we don't know the trip count, we should
> assume the worse in this particular analysis to avoid seriously
> degradaing performance. I wonder how the estimate of
> expected_loop_iterations is computed and whether it gives us the
> conservative estimate that we need here?
in the absence of any other hints obtained from the program, the
loops are predicted to iterate 10 times,
Zdenek