From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id D3CB63857C47 for ; Thu, 14 Oct 2021 12:47:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D3CB63857C47 Received: by mail-ed1-x52d.google.com with SMTP id d9so23729755edh.5 for ; Thu, 14 Oct 2021 05:47:54 -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=Sqr7n7ekqnLQNASDGwYFEiAmXIa9HZvmrGHjheImboA=; b=efHu+5JvLXq+fWq3Go3rv1b9dMFJGoyv+n4LYa8brQcswGjldSNSAgGikwdHC7qoxw 5NTexllwKl9hd0XBJSB37svlI+nMK0lBEXn36IzDJ7HVsJcFXpyVsmLJlyD3xKtsacH5 6zKcOfKs+2l3IY6dZ1l74Gv6ZA8GLTR/S8pF8JQGGoc16Myn0dOZPWkJUH3h3Z3EqkMZ B6m92XxDQ3YewgTk8PVFMdN4m+UbLx9dfAdP6zheMPKAbcVm7dLycEJ1YWcYCHLLcNZv PTnEg14YJFQYJHuuYMDuxu/AhmDfPe+1+a6a6sSpeukFIyOK+EObjLi0gLCwRRug4oqQ SK9g== X-Gm-Message-State: AOAM533v2hEolZZ+C4S4r6i/onGhrOTlyCIw0VmEoD+3+surSCrI40gX p0RHAX+whmZLu7AR1usGRz7Eaipwt2FmrUws0aY= X-Google-Smtp-Source: ABdhPJyvV2OANSVE5PuaEX6XOj/1UcOo0sDop5r0Cj9mRj+7UrETbhwk57ScmsU4HbvKujwftzY2SEit26nZcIFSJnk= X-Received: by 2002:a05:6402:35cb:: with SMTP id z11mr8916483edc.342.1634215671061; Thu, 14 Oct 2021 05:47:51 -0700 (PDT) MIME-Version: 1.0 References: <20210924154653.1108992-1-aldyh@redhat.com> <5cd175c7-5dbb-e160-9dd2-85dcfe438059@gmail.com> <0dc3521b-8d91-6e55-5d7d-7ee513c17c0f@redhat.com> <6437723b-2379-6712-a8d6-e9a2d3672671@redhat.com> <81E8D8CE-8F63-471F-BAF1-B072B6F40C44@gmail.com> In-Reply-To: From: Richard Biener Date: Thu, 14 Oct 2021 14:47:40 +0200 Message-ID: Subject: Re: [PATCH] Replace VRP threader with a hybrid forward threader. To: Aldy Hernandez Cc: Aldy Hernandez via Gcc-patches , Jeff Law Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.5 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: Thu, 14 Oct 2021 12:47:56 -0000 On Thu, Oct 14, 2021 at 2:29 PM Aldy Hernandez wrote: > > On Mon, Sep 27, 2021 at 7:29 PM Richard Biener > wrote: > > > > On September 27, 2021 6:07:40 PM GMT+02:00, Aldy Hernandez via Gcc-patches wrote: > > > > > > > > >On 9/27/21 5:27 PM, Aldy Hernandez wrote: > > >> > > >> > > >> On 9/27/21 5:01 PM, Jeff Law wrote: > > >>> > > >>> > > >>> On 9/24/2021 9:46 AM, Aldy Hernandez wrote: > > > > > >>> And the big question, is the pass running after VRP2 doing anything > > >>> particularly useful? Do we want to try and kill it now, or later? > > >> > > >> Interesting question. Perhaps if we convert DOM threading to a hybrid > > >> model, it will render the post-VRP threader completely useless. Huhh... > > >> That could kill 2 birds with one stone... we get rid of a threading > > >> pass, and we don't need to worry about as much about the super-fast ranger. > > > > > >These are just a few of the threading passes at -O2: > > > > > >a.c.192t.thread3 <-- bck threader > > >a.c.193t.dom3 <-- fwd threader > > >a.c.194t.strlen1 > > >a.c.195t.thread4 <-- bck threader > > >a.c.196t.vrp2 > > >a.c.197t.vrp-thread2 <-- fwd threader > > > > > >That's almost 4 back to back threaders! > > > > > >*pause for effect* > > > > We've always known we have too many of these once Jeff triplicated all the backwards threading ones. I do hope we manage to reduce the number for GCC 12. Esp. If the new ones are slower because they no longer use simple lattices. > > By the way, what is the blessed way of knowing which of the N passes > we are in? For instance, there are 4 back threading passes (well 5 > with ethread). I'd like to know how to know if I'm in the 4th one, > which is the one that runs before VRP2 threading. I know there's > gimple_opt_pass::set_pass_param, but that seems to only take a bool. There's no blessed way other than to make distinct passes (but you could add multiple params emulating a binary encoding of a sequence number, eh). But then I'd really just try removing either the threader before dom or the one before vrp (I suppose removing the one before VRP makes most sense). Richard. > > Thanks. > Aldy >