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: Pat Haugen <pthaugen at us dot ibm dot com>
- To: "Shobaki, Ghassan" <Ghassan dot Shobaki at amd dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "Zdenek Dvorak" <rakdver at kam dot mff dot cuni dot cz>, "Richard Guenther" <richard dot guenther at gmail dot com>
- Date: Thu, 18 Jun 2009 13:40:33 -0500
- Subject: RE: Patch to Avoid Bad Prefetching
- References: <84fc9c000904150216h170269b7v70f5ae2a10110296@mail.gmail.com> <D60441ACF713E84E9952ADA42F2E08B716728E@ssvlexmb2.amd.com> <20090415155239.GA20198@kam.mff.cuni.cz> <D60441ACF713E84E9952ADA42F2E08B70149981A@ssvlexmb2.amd.com> <20090416010249.GB21250@kam.mff.cuni.cz> <D60441ACF713E84E9952ADA42F2E08B70149988B@ssvlexmb2.amd.com> <20090416052522.GB3021@kam.mff.cuni.cz> <D60441ACF713E84E9952ADA42F2E08B701499986@ssvlexmb2.amd.com> <20090416172534.GB19702@kam.mff.cuni.cz> <84fc9c000904240451g28482e85mcd202d894f29b3f@mail.gmail.com> <912DA18E911D8B418824641EF1541F3C417E84@ssvlexmb2.amd.com>
> FP2006:
> No prefetching: 15.3
> Current prefetching: 14.0 (-8.5%)
> Patched prefetching: 15.2 (-0.5%)
> So, the patch gives an improvement of 8.7% relative to the existing code.
>
> INT2006:
> No prefetching: 14.6
> Current prefetching: 14.3 (-2.3%)
> Patched prefetching: 14.8 (1.22%)
> So, the patch gives an improvement of 3.6% relative to the existing code.
>
I tried the patch on PowerPC and also saw improvements over the existing
prefetching, although in general looks like prefetching needs to be tuned
for PowerPC since the clear winner is no prefetching.
FP2006:
Current prefetching relative to no prefetching: -9.9%
Patched prefetching relative to no prefetching: -5.2%
The patched prefetching gives a 5.2% improvement relative to existing code.
INT2006:
Current prefetching relative to no prefetching: -3.2%
Patched prefetching relative to no prefetching: -2.1%
The patched prefetching gives a 1.2% improvement relative to existing code.
433.milc was the only benchmark where prefetching gave a measurable
improvement over no prefetching, 5.5%. And even with the patched
prefetching, there were still 5 benchmarks that degraded double-digit
percentage with prefetching enabled (libquantum, zeusmp, cactusADM,
leslie3d, calculix). There were two benchmarks that failed to build with
prefetching enabled, both existing/patched versions, which I'll open
bugzillas for (h264ref and xalancbmk).
-Pat