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] data prefetch support and __builtin_prefetch (take 2)


On Wed, Dec 05, 2001 at 01:04:56PM -0800, Richard Henderson wrote:
> On Wed, Dec 05, 2001 at 05:49:49PM +0000, Richard Earnshaw wrote:
> > It might also be possible to do some overloading (ie allow both 
> > __builtin_prefetch(addr) and __builtin_prefetch(addr, rw, loc) ), but I 
> > don't know if the compiler will allow that.
> 
> It will.  You prototype the function as prefetch(void *, ...) and 
> then check the subsequent argument in the builtin expander.
> 
> In fact, I think this is a useful thing anyway, since I doubt that
> most folks will know what to put for the temporal locality argument.

Great, I'll look into changing __builtin_prefetch to do that.  That will
also leave room for adding additional arguments in the future if there
turns out to be a need for them.

Janis


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