From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by sourceware.org (Postfix) with ESMTPS id 167AA3851C31 for ; Thu, 19 Nov 2020 14:47:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 167AA3851C31 Received: by mail-ej1-x641.google.com with SMTP id s25so8264621ejy.6 for ; Thu, 19 Nov 2020 06:47:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ITF+/fv4qakp/cw9vPE4m9UsDbAGhNZMEVk0nfChAvc=; b=Qkt0hhNCv25HFHeAygfCEBphwXaSThdo0lAqRVuBofuukKkqFryIQIkaRBqHYUYTPp C/edv/+fg57hapLao61/v0Lhq3dGadME8VFfiBv82Zed9uO3WGWcLBm0ddK3XxG3P72g zhFrFZrRBN7RLSzEKIvQQIoHDs0doezSubcPBJ4iUi1N4inDPw4w7aKO7TyVKM8dY2vH 1TX4OkuPAS/9qHtOox1PI//6OmdpNmApeo6RgsxxcrigyqdHIiEfd1Nitu/63GvOa7WP xx+igWfM+JqBW+lL8W9g2Fn6/8IEGMBQmIhKtcwKKf/DWlbrfee4+xs7421XwAy/FOKA aLdw== X-Gm-Message-State: AOAM530Fvrm4HmnsX5nBADM0Q1jFdxd6rxm2jYIjxMvYcmJNRQEc0LwW Bol3NracY4EAS9s95CB3yqNMdzfJph/a05XOyBE= X-Google-Smtp-Source: ABdhPJxBOjkyy4S5uXV1YegBNi00yJUWqZLUSmQJW2YMw/JZdC4YIEBxmVcUeD073Ug9lMXJyJE4o2h5JEri3u3/5Co= X-Received: by 2002:a17:906:3617:: with SMTP id q23mr29362148ejb.371.1605797230023; Thu, 19 Nov 2020 06:47:10 -0800 (PST) MIME-Version: 1.0 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> <1f725789-559f-e91f-dec3-352ab42e92d8@suse.cz> In-Reply-To: <1f725789-559f-e91f-dec3-352ab42e92d8@suse.cz> From: Richard Biener Date: Thu, 19 Nov 2020 15:46:58 +0100 Message-ID: Subject: Re: [PATCH v2] Add if-chain to switch conversion pass. To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: David Malcolm , Jakub Jelinek , GCC Patches , Jan Hubicka Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, 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: Thu, 19 Nov 2020 14:47:12 -0000 On Wed, Nov 18, 2020 at 1:25 PM Martin Li=C5=A1ka wrote: > > 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 pha= se 2. > I don't see it a common pattern that people write such a code in wild. I didn't expect do actually support the matching just have the code structured in a way to make it easier. I guess it's close enough to go forward with the current scheme though. > Right now, we have some local analysis and one can eventually build a mor= e 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? OK, so can you send an updated patch? Thanks, Richard. > Thanks, > Martin