This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Enhance Reuse Analysis of Long-stride Memory References in the Prefetcher
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: "Shobaki, Ghassan" <Ghassan dot Shobaki at amd dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "Pop, Sebastian" <Sebastian dot Pop at amd dot com>, Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- Date: Sat, 8 Aug 2009 01:07:44 +0000 (UTC)
- Subject: Re: PATCH: Enhance Reuse Analysis of Long-stride Memory References in the Prefetcher
- References: <D60441ACF713E84E9952ADA42F2E08B716728E@ssvlexmb2.amd.com> <912DA18E911D8B418824641EF1541F3C417E84@ssvlexmb2.amd.com> <20090603125414.GA16367@kam.mff.cuni.cz> <84fc9c000906030719n129b4816qee87cc50c0838ad3@mail.gmail.com> <912DA18E911D8B418824641EF1541F3C418387@ssvlexmb2.amd.com> <84fc9c000906041356v731ab35ct9a2b807c7920c01e@mail.gmail.com> <912DA18E911D8B418824641EF1541F3C41849D@ssvlexmb2.amd.com> <84fc9c000906050200u11ff9809u7fa2e62ad9918fb2@mail.gmail.com> <912DA18E911D8B418824641EF1541F3C418548@ssvlexmb2.amd.com> <84fc9c000906050801u71327776ge0d4f46d93f3f862@mail.gmail.com> <de8d50360906081116p5ef491d0m9a2c656d6b937bd5@mail.gmail.com> <912DA18E911D8B418824641EF1541F3C4AC399@ssvlexmb2.amd.com> <4A2DCA99.1080502@redhat.com> <534C8623EDA7174AA9FF7ADD752AD8E44C5929@ssvlexmb2.amd.com>
On Fri, 7 Aug 2009, Shobaki, Ghassan wrote:
> 2. Using floating point arithmetic for a more precise computation of the
> miss probability.
Can you prove that this cannot lead to results depending on the host
system (for example, being different depending on whether float arithmetic
has excess precision)?
> + miss_rate = (float) delta / (float) prefetch_block;
> + acceptable_miss_rate = (float) ACCEPTABLE_MISS_RATE / 1000.0;
Is there some reason you can't simply use appropriately scaled integer
arithmetic (miss_rate = 1000 * delta / prefetch_block)? (This supposes
that 1000 * delta can't overflow; I don't know if there are already checks
elsewhere in the code that avoid that possibility, but if not you'd need
to add them.)
> {
> if (prefetch_before < ref->prefetch_before)
> ref->prefetch_before = prefetch_before;
> -
> +
This appears to be a bogus whitespace change (adding trailing whitespace).
--
Joseph S. Myers
joseph@codesourcery.com