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: Enhance Reuse Analysis of Long-stride Memory References in the Prefetcher


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


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