preliminary patch for data prefetch support

Janis Johnson janis187@us.ibm.com
Tue Nov 13 15:03:00 GMT 2001


On Wed, Nov 07, 2001 at 12:12:42AM -0800, Richard Henderson wrote:
> On Tue, Nov 06, 2001 at 03:35:40PM -0800, Janis Johnson wrote:
> > +/* Memory prefetch, with attributes supported on some machines.
> > +   Operand 1 is the address of the memory to fetch.
> > +   Operand 2 is 1 for a write access, 0 otherwise.
> > +   Operand 3 is the level of temporal locality; 0 means there is no
> > +   temporal locality and 1, 2, and 3 are for increasing levels of temporal
> > +   locality.
> > +
> > +   The attributes specified by operands 2 and 3 are ignored for targets
> > +   whose prefetch instructions do not support them.  */
> > +
> > +DEF_RTL_EXPR(PREFETCH, "prefetch", "eee", 'x')
> 
> If op2 and op3 must be constants, and not particularly manipulatable
> by normal rtl jiggery pokery, why not make the format "eii"?

I want to be able to call gen_prefetch with variables determined in an
optimization pass and couldn't figure out how to get the values of those
variables into rtl as ints.  If there's a way to do that I'd like to try
it.

> Are you considering the semi-related operation of allocating a dirty
> cache line?  I.e. clobber the entire cache line, avoiding the read
> fetch?

I hadn't, but I'll look into it.

Janis



More information about the Gcc-patches mailing list