From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id 207DE3858437 for ; Tue, 19 Oct 2021 06:52:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 207DE3858437 Received: by mail-ed1-x532.google.com with SMTP id r4so2381438edi.5 for ; Mon, 18 Oct 2021 23:52:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jWc5YAAVe3gTN+WPC4Upl0WbEnOZCRGcDJVTuylTHh8=; b=RHuQOSR6WJf+AT9hVsa7LzXPhzay2bctCZWPthXlkIkt6WzR5feIJwRYlxCaVcuy+I /Iib9eOOU10vxob2YeEqm6nBqJPhfIMjZ1DQiiFqA1zf2VO0ukZsrkfLL3LiPBbWT71J EVqvWmJDkiHoRcJUactfBs91AKZf+gOo5n4KZoxL53i/DL9fa1s0GMMxB3KcfB10/z75 1g2zDXoQKEvkbHeG50lute51hxTqIuTiYq2RJzjPBrI4WIFCHq4e2H/Y5JeeGG9YTC+5 SDMsvaksk8NNBScmRpQOmMm8A7J70d+Jc6pxz7ikQMJinltwICVizG0653PO2KBJhcUG G7IQ== X-Gm-Message-State: AOAM531XZxWWtwnBIRvuP0IwnyHOXRCHtifKoQH61IerBO33s8O8sqfr FITJDET8GECjZqiamZkHIVCVRnUumnrUKhlA3i8= X-Google-Smtp-Source: ABdhPJzjiOl0w3nZ2rUVrhIe4kmPXuvEhYdvXMtg8s85EI0MAMfaUOiL2pq2/e/2/v+AeuDQLWANmP/ACRFtBEjCBjI= X-Received: by 2002:a17:907:3eaa:: with SMTP id hs42mr35684439ejc.429.1634626345214; Mon, 18 Oct 2021 23:52:25 -0700 (PDT) MIME-Version: 1.0 References: <20211018134117.410106-1-aldyh@redhat.com> <69d78e89-c086-d10c-901f-72f504aeb93f@redhat.com> In-Reply-To: <69d78e89-c086-d10c-901f-72f504aeb93f@redhat.com> From: Richard Biener Date: Tue, 19 Oct 2021 08:52:14 +0200 Message-ID: Subject: Re: [RFC] Remove VRP threader passes in exchange for better threading pre-VRP. To: Aldy Hernandez Cc: Jeff Law , GCC patches , Andrew MacLeod Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.3 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tue, 19 Oct 2021 06:52:27 -0000 On Mon, Oct 18, 2021 at 4:03 PM Aldy Hernandez wrote: > > > > On 10/18/21 3:41 PM, Aldy Hernandez wrote: > > > I've been experimenting with reducing the total number of threading > > passes, and I'd like to see if there's consensus/stomach for altering > > the pipeline. Note, that the goal is to remove forward threader clients, > > not the other way around. So, we should prefer to remove a VRP threader > > instance over a *.thread one immediately before VRP. > > > > After some playing, it looks like if we enable fully-resolving mode in > > the *.thread passes immediately preceeding VRP, we can remove the VRP > > threading passes altogether, thus removing 2 threading passes (and > > forward threading passes at that!). > > It occurs to me that we could also remove the threading before VRP > passes, and enable a fully-resolving backward threader after VRP. I > haven't played with this scenario, but it should be just as good. That > being said, I don't know the intricacies of why we had both pre and post > VRP threading passes, and if one is ideally better than the other. It was done because they were different threaders. Since the new threader uses built-in VRP it shouldn't really matter whether it's before or after VRP _for the threading_, but it might be that if threading runs before VRP then VRP itself can do a better job on cleaning up the IL. + /* ?? Is this still needed. ?? */ /* Threading can leave many const/copy propagations in the IL. Clean them up. Instead of just copy_prop, we use ccp to compute alignment and nonzero bits. */ Yes, it's still needed but not for the stated reason - the VRP substitution and folding stage should deal with copy/constant propagation but we replaced the former copy propagation with CCP to re-compute nonzero bits & alignment so I'd change the comment to /* Run CCP to compute alignment and nonzero bits. */ Richard. > Aldy >