From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by sourceware.org (Postfix) with ESMTPS id A79F03858400 for ; Tue, 28 Sep 2021 01:46:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A79F03858400 Received: by mail-qv1-xf33.google.com with SMTP id x9so6293593qvn.12 for ; Mon, 27 Sep 2021 18:46:17 -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-transfer-encoding :content-language; bh=ih2k4XMxlr/Izm5AFk4P3MJ6NZdHOjvYiOWCQpC3EfA=; b=z/zIUgsrA9zkvDN+/s0ZVMRPHZZPDFG7jjS/U3ww6y9vzGXa4dC0qshgUxkBbE8h0G WIxNt+y2BRuFwlroKrbhk9Wo+41y4/ZBokQlXqGvMIPjMi9mQqkG5wzlXNKWa3WKTN5l yMq5uw9lYsClIbu0w+kniKPEs2av5qKlf03pd11qR5Fgv0wbtXIzay7Ns3P7B0rq8k59 Hmpz3yKTbuAXV5+wg87L50K8RVwnj9fW0PfzZbvsAE0FSM+EZsnB/2+GyEmpdPR75WF0 4Vat9nTeZL9m+DNwgTbUu1XVbZXSCyA9p6uAuZ2zTL7xCwINcpwyy8OYhztQjp/nkAAH UiAQ== X-Gm-Message-State: AOAM532k6F1z9cAFLLIJyXO+PZIAPXivcEcLkf3beL4mKuDe5dzPPzKD LjB6+WBxq/ZA+2f1ao9aoH9Lr5gpCCo= X-Google-Smtp-Source: ABdhPJxhxuzqKtqZRzV7BCJ9x0CDn6a9MokqsI09L7/2V9ocD0M1VLTQeZNKVQ30mWDZj/UHFwAyqQ== X-Received: by 2002:a05:6214:12ac:: with SMTP id w12mr3016420qvu.44.1632793577079; Mon, 27 Sep 2021 18:46:17 -0700 (PDT) Received: from [172.31.0.175] (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id f10sm14008092qkp.50.2021.09.27.18.46.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Sep 2021 18:46:16 -0700 (PDT) Subject: Re: [PATCH] Control all jump threading passes with -fjump-threads. To: Aldy Hernandez , GCC patches References: <20210927150003.796951-1-aldyh@redhat.com> From: Jeff Law Message-ID: <7ea0e648-1456-8c9f-1d26-83cd149fc2d3@gmail.com> Date: Mon, 27 Sep 2021 19:46:13 -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: <20210927150003.796951-1-aldyh@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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 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, 28 Sep 2021 01:46:19 -0000 On 9/27/2021 9:00 AM, Aldy Hernandez wrote: > Last year I mentioned that -fthread-jumps was being ignored by the > majority of our jump threading passes, and Jeff said he'd be in favor > of fixing this. > > This patch remedies the situation, but it does change existing behavior. > Currently -fthread-jumps is only enabled for -O2, -O3, and -Os. This > means that even if we restricted all jump threading passes with > -fthread-jumps, DOM jump threading would still seep through since it > runs at -O1. > > I propose this patch, but it does mean that DOM jump threading would > have to be explicitly enabled with -O1 -fthread-jumps. An > alternative would be to also offer a specific -fno-dom-threading, but > that seems icky. > > OK pending tests? > > gcc/ChangeLog: > > * tree-ssa-threadbackward.c (pass_thread_jumps::gate): Check > flag_thread_jumps. > (pass_early_thread_jumps::gate): Same. > * tree-ssa-threadedge.c (jump_threader::thread_outgoing_edges): > Return if !flag_thread_jumps. > * tree-ssa-threadupdate.c > (jt_path_registry::register_jump_thread): Assert that > flag_thread_jumps is true. OK.  Clearly this is going to be even better once we disentangle threading from DOM. jeff