From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by sourceware.org (Postfix) with ESMTPS id 3DAEA3858422 for ; Wed, 29 Sep 2021 15:45:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3DAEA3858422 Received: by mail-vs1-xe2e.google.com with SMTP id l19so3526991vst.7 for ; Wed, 29 Sep 2021 08:45:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=6lb8XKfTz/Voj0W/SH1dwAWHd8usUdhFzTHzlfZgQYw=; b=1X8QnBFqAmp20IsQOYs26GY6SbLBuoDyHe40q+rRItHN+yVj+SJa3p58Gi+oCmZvOQ D8uZqK1ctiGO82ICoSdmQ7C0+lmg/RdNdFP57S6/6U3oWEitjhZiKp87ZKBkn+adUWbZ i2aaHD7wQ3lvQsKkMO3oDcIE9x0sHgqOMehd7uY6D+GJxcfTXdUnFj7sBmXncn8S6tND 6gC6dUIAVcLZtpeSyUaBLh6eRY2Jm9jq4qVe2Q32f4Jh4JQRvCofPlMAkfMrLrN6GSkT 18nG7gjYfCxl4w8o57+hE3TfFpduwquyxJAYsNqDrsnbyFaS1/qQT9kWmO0RWO/vYZ9x vzUA== X-Gm-Message-State: AOAM532ftgBmNM9/vbhJlw+RPFNpe4bfoDJMo9ICVzLKTD0jFPOi2Dj/ zqPl0/DZoPX88fTaCHJOzvqwKBq2rQY= X-Google-Smtp-Source: ABdhPJzwA7AOrPH6Md8EYm54xwhJXd5DCa6LRE6eHpTbmCJwGUj3jKwllK6JTYFPIdhJ4sademA1MQ== X-Received: by 2002:a67:5f03:: with SMTP id t3mr505658vsb.5.1632930309130; Wed, 29 Sep 2021 08:45:09 -0700 (PDT) Received: from [192.168.1.24] (65-130-91-168.slkc.qwest.net. [65.130.91.168]) by smtp.gmail.com with ESMTPSA id a11sm104603vsj.9.2021.09.29.08.45.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Sep 2021 08:45:08 -0700 (PDT) Subject: Re: [PATCH] Replace VRP threader with a hybrid forward threader. To: Bernhard Reutner-Fischer , Aldy Hernandez Cc: gcc-patches References: <20210924154653.1108992-1-aldyh@redhat.com> <20210925212544.4c599084@nbbrfq> <20210929112020.2ba6816f@nbbrfq> From: Jeff Law Message-ID: <9ecd10da-83ae-0930-cf8c-589acbf5e33a@gmail.com> Date: Wed, 29 Sep 2021 09:45:04 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20210929112020.2ba6816f@nbbrfq> Content-Language: en-US X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, NICE_REPLY_A, 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 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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, 29 Sep 2021 15:45:11 -0000 On 9/29/2021 3:20 AM, Bernhard Reutner-Fischer wrote: > On Wed, 29 Sep 2021 10:10:00 +0200 > Aldy Hernandez wrote: > >> Jeff has requested we slow down changes in the threading space while >> we chased down regressions. > Sure. Take your time. >> That being said, thank you for your suggestion. I am putting the >> attached patch in my queue for testing. > LGTM but cannot approve it. > > ~hybrid_threader wouldn't want to free_dominance_info() would it? > But you certainly looked for such leaks. > thanks, >> Aldy >> >> On Wed, Sep 29, 2021 at 7:43 AM Bernhard Reutner-Fischer >> wrote: >>> Aldy, ping? >>> >>> On 25 September 2021 21:25:44 CEST, Bernhard Reutner-Fischer wrote: >>>> On Fri, 24 Sep 2021 17:46:53 +0200 >>>> Aldy Hernandez via Gcc-patches wrote: >>>>> +static unsigned int >>>>> +execute_vrp_threader (function *fun) >>>>> +{ >>>>> + hybrid_threader threader; >>>>> + threader.thread_jumps (fun); >>>>> + threader.thread_through_all_blocks (); >>>>> + return 0; >>>>> +} >>>>> + >>>>> +namespace { >>>>> + >>>>> +const pass_data pass_data_vrp_threader = >>>>> +{ >>>>> + GIMPLE_PASS, /* type */ >>>>> + "vrp-thread", /* name */ >>>>> + OPTGROUP_NONE, /* optinfo_flags */ >>>>> + TV_TREE_VRP, /* tv_id */ >>>>> + PROP_ssa, /* properties_required */ >>>>> + 0, /* properties_provided */ >>>>> + 0, /* properties_destroyed */ >>>>> + 0, /* todo_flags_start */ >>>>> + ( TODO_cleanup_cfg | TODO_update_ssa ), /* todo_flags_finish */ >>>>> +}; >>>> So shouldn't non-jumpy or flat code avoid the cleanup_cfg or >>>> update_ssa iff neither the function nor anything else was threaded? >>>> >>>> thanks, > > 0001-Avoid-CFG-updates-in-VRP-threader-if-nothing-changed.patch > > From 34877c42f4442653bdc534d135f1f44f63175ce6 Mon Sep 17 00:00:00 2001 > From: Aldy Hernandez > Date: Wed, 29 Sep 2021 10:02:12 +0200 > Subject: [PATCH] Avoid CFG updates in VRP threader if nothing changed. > > There is no need to update the CFG or SSAs if nothing has changed in VRP > threading. > > gcc/ChangeLog: > > * tree-vrp.c (thread_through_all_blocks): Return bool. > (execute_vrp_threader): Return TODO_* flags. > (pass_data_vrp_threader): Set todo_flags_finish to 0. OK jeff