From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26008 invoked by alias); 1 Sep 2010 09:33:47 -0000 Received: (qmail 25998 invoked by uid 22791); 1 Sep 2010 09:33:47 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Sep 2010 09:33:42 +0000 Received: by iwn2 with SMTP id 2so6839349iwn.20 for ; Wed, 01 Sep 2010 02:33:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.162.2 with SMTP id t2mr8373112ibx.57.1283333621241; Wed, 01 Sep 2010 02:33:41 -0700 (PDT) Received: by 10.231.13.77 with HTTP; Wed, 1 Sep 2010 02:33:41 -0700 (PDT) In-Reply-To: References: <201009010034.18924.paul@codesourcery.com> Date: Wed, 01 Sep 2010 09:33:00 -0000 Message-ID: Subject: Re: Clustering switch cases From: Richard Guenther To: "Paulo J. Matos" Cc: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg00005.txt.bz2 On Wed, Sep 1, 2010 at 11:11 AM, Paulo J. Matos wrote: > Richard Guenther writes: > >>> >>> I'd kinda hope that doing the optimization at the tree level means expa= nd_case >>> doesn't have to handle both types. =A0The tree code converts sparse cas= e ranges >>> to explicit conditionals (or a switch on a compact perfect hash), so an= ything >>> left to RTL expansion must be a jump table. >> > > You are right, I haven't thought about it but it does make sense. If I > want to provide a patch for this, would it be ok if its a patch against > gcc 4.4.4, or would it be better if its against the latest 4.5.1? Is > there any policy regarding this? Patches should be submitted against SVN trunk head as this is a new feature and thus will not go on the 4.4 or 4.5 branches. Richard.