This is the mail archive of the gcc@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]

Re: prefetch revisited


> On Tue, Oct 30, 2001 at 06:41:53PM +0100, Jan Hubicka wrote:
> > 
> > Just to be more specific, the code actually works and is about 2 weeks old.
> > I just didn't get around to benchmark it and prepare for review.  Also some
> > of my fixes to df.c are still pending as the bitmap issue and few other
> > larger patches I would like to see in with higher priority.
> > 
> > Probably some tweaking of the decision heuristics will be needed and I am
> > not quite sure how much benefit it will bring as the paper itself don't mention
> > too much.
> 
> I'd like to help examine and benchmark various decision heuristics; I've
> got access to IA-64 and Pentium III machines and can probably also find
> a PowerPC platform to use.

Currently my heuristics is simple - the at least one of usages of load
has to have at least 1/2 of frequency of the load instruction and
they must not occur in same basic block (as prefetch is not going to bring
much then).

We can probably tweak this in presence of write prefetches and such.

Also currently I have no generic interface for expanding prefetch instructions
so I do use the i386.md prefetch pattern that has magic integer argument,
so we need to clean this up for IA-64/PPC testing.
> > 
> > In case you want to concerntrate on the prefetch instruction representation and
> > how to describe those tons of various features various I guess our work don't
> > conflict and I would really like to see it in.  In case you want to implement
> > the greedy prefetching, we probably should work together.
> 
> Yes, I'd like to work together on this.  I'll start by gathering
> information about the capabilities of prefetch support on various
> kinds of hardware and which ones might be worth exploiting in GCC, and
> define the RTL pattern from that, along with the instruction definitions
> for ia64 and i386 variants.  This will let me learn a lot about how
> these things work in GCC.  I'll also keep track of the suggestions that
> come up in this thread, like the one from Joseph Myers about [static
> expr] parameter array declarators in C99.

Great.
I will try to dig out and cleanup my code and send it to the list.

(note that another places where it is effective to add prefetches are memsets
and memory allocation routines.
I've made little experiment with adding it to few places in gcc's garbage
collector and I was about to cuts it's running time to 1/8th of original).

Honza
> 
> Janis


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