[llvm-commits] [PATCH/RFC] Loop Data Software Prefetching

Hal Finkel hfinkel at anl.gov
Wed Jan 30 23:49:06 PST 2013


----- Original Message -----
> From: "Nadav Rotem" <nrotem at apple.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "Evan Cheng" <evan.cheng at apple.com>, "l >> Commit Messages and Patches for LLVM" <llvm-commits at cs.uiuc.edu>
> Sent: Thursday, January 31, 2013 1:25:35 AM
> Subject: Re: [llvm-commits] [PATCH/RFC] Loop Data Software Prefetching
> 
> > 
> > To be honest, I think that this is kind of silly. Some
> > target-provided parameters are fixed properties of the target, and
> > so no user-level customization needs to be provided. Other things,
> > however, like whether to use software prefetching, the prefetching
> > distance, etc. are just heuristic inputs, and we need to provide
> > the ability for the user to override them.
> 
> In that case it needs to be a command line flag of the prefetcher
> pass. Just like the loop-unrolling pass exposes the unrolling
> threshold.

You might be right that this is a non-problem, but it seems fairly cumbersome. For prefetching distance, unrolling threshold, etc. we could move the default value into NOTTI, make the default value of the command line parameter 0 (or -1 or something else invalid), and then use the TTI value only if the command-line value is invalid. But how will this work for boolean parameters? Maybe we could make it possible to determine if a command-line parameter was actually provided or if it has its default value.

> We don't want to override every property of the target
> machine using command line flags.
> 

Agreed.

Thanks again,
Hal



More information about the llvm-commits mailing list