From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6795 invoked by alias); 5 Feb 2002 08:33:22 -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 6155 invoked from network); 5 Feb 2002 08:33:15 -0000 Received: from unknown (HELO potter.sfbay.redhat.com) (209.249.29.60) by sources.redhat.com with SMTP; 5 Feb 2002 08:33:15 -0000 Received: from dot.sfbay.redhat.com (dot.sfbay.redhat.com [205.180.230.224]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g155p6b09925; Mon, 4 Feb 2002 21:51:06 -0800 Received: (from rth@localhost) by dot.sfbay.redhat.com (8.11.6/8.11.6) id g155tIp19378; Mon, 4 Feb 2002 21:55:18 -0800 X-Authentication-Warning: dot.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Tue, 05 Feb 2002 00:33:00 -0000 From: Richard Henderson To: law@redhat.com Cc: John David Anglin , gcc-bugs@gcc.gnu.org, jh@suse.cz, gcc-patches@gcc.gnu.org Subject: Re: PATCH: Re: ICE in 920624-1.c with -O3 -funroll-loops on vax-dec-ultrix4.3 Message-ID: <20020204215518.A19374@redhat.com> Mail-Followup-To: Richard Henderson , law@redhat.com, John David Anglin , gcc-bugs@gcc.gnu.org, jh@suse.cz, gcc-patches@gcc.gnu.org References: <20020204164731.A19099@redhat.com> <13368.1012879798@porcupine.cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <13368.1012879798@porcupine.cygnus.com>; from law@redhat.com on Mon, Feb 04, 2002 at 08:29:58PM -0700 X-SW-Source: 2002-02/txt/msg00353.txt.bz2 On Mon, Feb 04, 2002 at 08:29:58PM -0700, law@redhat.com wrote: > What we could do in the short term is to delete the jump table when we > optimize the jump, but leave the CODE_LABEL alone. That deals with the > immediate problem of needing to get unused jump tables out of the insn > stream. By leaving the CODE_LABEL in the stream we avoid dangling > references in normal insns which used that label for computations. If we're going to dream, I think using CODE_LABEL at all for this is incorrect. Except for a couple of oddballs it isn't a label to code at all -- it's a label to .rodata. And for those Harvard ports that have different representations for code and data pointers, having both use a LABEL_REF causes problems. So we should have a TABLEJUMP_REF that references the jump table, and if for some reason the jump table gets optimized away without optimizing out the references, we can emit a zero instead. Or simply have a pass just before final that removes such refs. > I think we'd want to largely treat the s390 like the other ports; with the > caveat that we dump the table into the constant pool relatively late in > the compilation process. ie, I'd like to present the optimizers with > a common model for dealing with tablejumps. It doesn't seem unreasonable to treat the entire table jump as a unit during early optimization. You'd want to lower early enough to move address computation out of loops when possible, but otherwise there's little that can actually be simplified wrt other code. r~