From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id D03733857C61 for ; Wed, 18 Nov 2020 12:25:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D03733857C61 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DF27CAC2E; Wed, 18 Nov 2020 12:25:43 +0000 (UTC) Subject: Re: [PATCH v2] Add if-chain to switch conversion pass. To: Richard Biener Cc: David Malcolm , Jakub Jelinek , GCC Patches , Jan Hubicka References: <2c3db526-cac6-4eeb-4afb-12024f8d5af2@suse.cz> <6169f91a-4884-55f5-c76f-ea1dae11d996@suse.cz> <35eb0279-77d8-36f8-3ab7-afb9ae97fdb3@suse.cz> <42c91f11-c1a6-3ae4-08da-0a0b77f63b80@suse.cz> <72541e13d26f92577637b8f0e23d82435f35ddea.camel@redhat.com> <46e9e574-80f8-3cce-3fcf-dbc8205e74ae@suse.cz> <0f418e79-d46b-5577-ebdf-dbc29eed8057@suse.cz> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <1f725789-559f-e91f-dec3-352ab42e92d8@suse.cz> Date: Wed, 18 Nov 2020 13:25:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2020 12:25:46 -0000 On 11/16/20 1:21 PM, Richard Biener wrote: > but the most trivial thing would be to feed the pass the > balanced-tree generated by switch expansion where I > would expect us to be able to detect it as the original switch again. Well, if we want to support such matching, then please deffer it to a phase 2. I don't see it a common pattern that people write such a code in wild. Right now, we have some local analysis and one can eventually build a more advanced algorithm on top of it. Can we please make a progress for GCC 11 with the current approach that will cover quite some interesting if-chains? Thanks, Martin