PATCH: Fix loop.c for targets without HAVE_prefetch

H . J . Lu hjl@lucon.org
Wed Jan 23 09:23:00 GMT 2002


On Wed, Jan 23, 2002 at 09:22:07AM -0800, Janis Johnson wrote:
> On Tue, Jan 22, 2002 at 08:12:47PM -0800, H . J . Lu wrote:
> > This patch
> > 
> > http://gcc.gnu.org/ml/gcc-patches/2002-01/msg01393.html
> > 
> > breaks targets without HAVE_prefetch defined. On mips, I got
> > 
> > /home/hjl/work/gnu/src/gcc/gcc/gcc/loop.c:4026: `CODE_FOR_prefetch' undeclared
> > (first use in this function)
> > /home/hjl/work/gnu/src/gcc/gcc/gcc/loop.c:4026: (Each undeclared identifier is
> > reported only once
> > /home/hjl/work/gnu/src/gcc/gcc/gcc/loop.c:4026: for each function it appears
> > in.)
> > make[4]: *** [loop.o] Error 1
> > 
> > This patch seems to work for me.
> 
> Also see the one I just sent in:
> http://gcc.gnu.org/ml/gcc-patches/2002-01/msg01617.html.
> 

I guess it must have been asked before. Why do we want to include
those functions we know are not used? In loop.c, there is

#ifdef HAVE_prefetch
  if (flags & LOOP_PREFETCH)
    emit_prefetch_instructions (loop);
#endif

What is that for? HAVE_prefetch is always defined in the current loop.c
no matter what.


H.J.



More information about the Gcc-patches mailing list