From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16830 invoked by alias); 1 Sep 2010 09:15:13 -0000 Received: (qmail 16817 invoked by uid 22791); 1 Sep 2010 09:15:12 -0000 X-SWARE-Spam-Status: No, hits=0.9 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Sep 2010 09:15:06 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OqjPL-00082Y-Ro for gcc@gcc.gnu.org; Wed, 01 Sep 2010 11:15:03 +0200 Received: from 193.128.72.68 ([193.128.72.68]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Sep 2010 11:15:03 +0200 Received: from pocmatos by 193.128.72.68 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Sep 2010 11:15:03 +0200 To: gcc@gcc.gnu.org From: pocmatos@gmail.com (Paulo J. Matos) Subject: Re: Clustering switch cases Date: Wed, 01 Sep 2010 09:15:00 -0000 Message-ID: References: <201009010034.18924.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) 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/msg00004.txt.bz2 Richard Guenther writes: >> >> I'd kinda hope that doing the optimization at the tree level means expand_case >> doesn't have to handle both types.  The tree code converts sparse case ranges >> to explicit conditionals (or a switch on a compact perfect hash), so anything >> 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? > Yes, that was my idea. > Good! I will get to work! Cheers, -- PMatos