From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6593 invoked by alias); 23 Jan 2002 20:14:52 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 6560 invoked from network); 23 Jan 2002 20:14:51 -0000 Received: from unknown (HELO ocean.lucon.org) (12.234.19.19) by sources.redhat.com with SMTP; 23 Jan 2002 20:14:51 -0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id 04F11125C0; Wed, 23 Jan 2002 12:14:50 -0800 (PST) Date: Wed, 23 Jan 2002 12:15:00 -0000 From: "H . J . Lu" To: John David Anglin Cc: gcc-patches@gcc.gnu.org Subject: Re: PATCH: Fix loop.c for targets without HAVE_prefetch Message-ID: <20020123121450.A8972@lucon.org> References: <200201230523.g0N5Njom016605@hiauly1.hia.nrc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200201230523.g0N5Njom016605@hiauly1.hia.nrc.ca>; from dave@hiauly1.hia.nrc.ca on Wed, Jan 23, 2002 at 12:23:45AM -0500 X-SW-Source: 2002-01/txt/msg01660.txt.bz2 On Wed, Jan 23, 2002 at 12:23:45AM -0500, John David Anglin wrote: > > > This patch > > > > > > http://gcc.gnu.org/ml/gcc-patches/2002-01/msg01393.html > > causes a new warning when PREFETCH_NOT_ALWAYS is 0: > > ../../gcc/gcc/loop.c:3573: warning: `check_store' defined but not used > Here is a new patch. H.J. ---- 2002-01-23 H.J. Lu (hjl@gnu.org) * loop.c (HAVE_prefetch): Don't define if not defined. (CODE_FOR_prefetch): Removed. (gen_prefetch): Removed. (check_store): Define only if HAVE_prefetch is defined. (emit_prefetch_instructions): Likewise. (rtx_equal_for_prefetch_p): Likewise. (remove_constant_addition): Likewise. --- gcc/loop.c.prefetch Wed Jan 23 09:00:37 2002 +++ gcc/loop.c Wed Jan 23 12:08:49 2002 @@ -63,11 +63,6 @@ Software Foundation, 59 Temple Place - S #ifndef PREFETCH_BLOCK #define PREFETCH_BLOCK 32 #endif -#ifndef HAVE_prefetch -#define HAVE_prefetch 0 -#define CODE_FOR_prefetch 0 -#define gen_prefetch(a,b,c) (abort(), NULL_RTX) -#endif /* Give up the prefetch optimizations once we exceed a given threshhold. It is unlikely that we would be able to optimize something in a loop @@ -352,7 +347,6 @@ static rtx loop_insn_sink_or_swim PARAMS static void loop_dump_aux PARAMS ((const struct loop *, FILE *, int)); static void loop_delete_insns PARAMS ((rtx, rtx)); -static HOST_WIDE_INT remove_constant_addition PARAMS ((rtx *)); void debug_ivs PARAMS ((const struct loop *)); void debug_iv_class PARAMS ((const struct iv_class *)); void debug_biv PARAMS ((const struct induction *)); @@ -3566,6 +3560,8 @@ struct check_store_data int mem_write; }; +#ifdef HAVE_prefetch +static HOST_WIDE_INT remove_constant_addition PARAMS ((rtx *)); static void check_store PARAMS ((rtx, rtx, void *)); static void emit_prefetch_instructions PARAMS ((struct loop *)); static int rtx_equal_for_prefetch_p PARAMS ((rtx, rtx)); @@ -4069,6 +4065,7 @@ emit_prefetch_instructions (loop) return; } +#endif /* A "basic induction variable" or biv is a pseudo reg that is set (within this loop) only by incrementing or decrementing it. */