From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) by sourceware.org (Postfix) with ESMTPS id 9EE893858C2C for ; Thu, 30 Sep 2021 18:26:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9EE893858C2C Received: by mail-ua1-x936.google.com with SMTP id u5so1982442uao.13 for ; Thu, 30 Sep 2021 11:26:32 -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=BztnsNYUhfz/lvTiI+2q2cpg28cVtxTJfuru/1Iv6zQ=; b=m7YEXrpRh2rDKgOnpzxijKL++P1taSDfOA4c72vK1WS+eOtYUh42SkOdDqcUdj0FZb 78QtnrPNQgqmVzvqH4OZmvTplL9+2euW713MFMjtTcDjg1+ErCtk3QfC3KJAQi+FKJ5U 8PT8zgHvxC7OrTbh3ym7bPNJvGzs7bKNYHSO6+QEjUSewD113ODNCvjeqc8OVw7K0KJV MsIF58YHKnyfONluEt1wkECwTQRTB+w6IpwhumVVZPvc+RazBAs/0mrQS5RkIVuSZH5P PJwTRKihM3gFbYqQnKWwwU8Af7eslGT7ktHZtNtzkkb93gR3nDN5MEX3ZRN+JU5yffkv yYPg== X-Gm-Message-State: AOAM533z5u/tVYAlomUnfKJMbIpl6MfBJ+pn3mKzuokvDnCXWdmiKvEU dOqNFn6shumN0J3nKe4RRqrB1Le7kY8= X-Google-Smtp-Source: ABdhPJw/d1N+64OBgRbSwPLmWAsQLwplU7iyL8zVLAjonpheu8lWYqg7m64z53X26LSfqX4WrLCaHw== X-Received: by 2002:ab0:4acc:: with SMTP id t12mr7552293uae.110.1633026391990; Thu, 30 Sep 2021 11:26:31 -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 r3sm2076424vsi.23.2021.09.30.11.26.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Sep 2021 11:26:31 -0700 (PDT) Subject: Re: [PATCH] Improve jump threading dump output. To: Aldy Hernandez , GCC patches References: <20210928094545.889111-1-aldyh@redhat.com> <9f2db536-c182-426e-05d5-0242d9a109f1@gmail.com> <25abc6f7-8006-5cf5-95bf-bd752a46e9ea@redhat.com> From: Jeff Law Message-ID: <958ea75d-b67d-1064-0c32-f788003c758c@gmail.com> Date: Thu, 30 Sep 2021 12:26:27 -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: <25abc6f7-8006-5cf5-95bf-bd752a46e9ea@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, BODY_8BITS, 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: Thu, 30 Sep 2021 18:26:34 -0000 On 9/28/2021 7:53 AM, Aldy Hernandez wrote: > > > On 9/28/21 3:47 PM, Jeff Law wrote: >> >> >> On 9/28/2021 3:45 AM, Aldy Hernandez wrote: >>> In analyzing PR102511, it has become abundantly clear that we need >>> better debugging aids for the jump threader solver.  Currently >>> debugging these issues is a nightmare if you're not intimately >>> familiar with the code.  This patch attempts to improve this. >>> >>> First, I'm enabling path solver dumps with TDF_THREADING. None of the >>> available TDF_* flags are a good match, and using TDF_DETAILS would >>> blow >>> up the dump file, since both threaders continually call the solver to >>> try out candidates.  This will allow dumping path solver details >>> without >>> having to resort to hacking the source. >>> >>> I am also dumping the current registered_jump_thread dbg counter used >>> by the registry, in the solver.  That way narrowing down a problematic >>> thread can then be examined by -fdump-*-threading and looking at the >>> solver details surrounding the appropriate counter (which the dbgcnt >>> also dumps to the dump file). >>> >>> You still need knowledge of the solver to debug these issues, but at >>> least now it's not entirely opaque. >>> >>> OK? >>> >>> gcc/ChangeLog: >>> >>>     * dbgcnt.c (dbg_cnt_counter): New. >>>     * dbgcnt.h (dbg_cnt_counter): New. >>>     * dumpfile.c (dump_options): Add entry for TDF_THREADING. >>>     * dumpfile.h (enum dump_flag): Add TDF_THREADING. >>>     * gimple-range-path.cc (DEBUG_SOLVER): Use TDF_THREADING. >>>     * tree-ssa-threadupdate.c (dump_jump_thread_path): Dump out >>>     debug counter. >> OK. >> >> Note we've got massive failures in the tester starting sometime >> yesterday and I suspect all the threader work.    So I'm going to >> slow down on reviews of that code as we stabilize stuff. > > Fair enough.  Let's knock those out then. So I'm really wondering if these were caused by that patch you'd sent me privately for the visium issue.  Right now we're regressing in a few places, but it's not bad. visium & bfin are the only embedded targets failing. visium fails: Tests that now fail, but worked before (9 tests): visium-sim: gcc.c-torture/execute/960218-1.c   -Os  (test for excess errors) visium-sim: gcc.c-torture/execute/961125-1.c   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess errors) visium-sim: gcc.c-torture/execute/961125-1.c   -O3 -g  (test for excess errors) visium-sim: gcc.c-torture/execute/pending-4.c   -O1  (test for excess errors) visium-sim: gcc.c-torture/execute/pr58209.c   -O2  (test for excess errors) visium-sim: gcc.c-torture/execute/pr58209.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors) visium-sim: gcc.c-torture/execute/pr58209.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors) visium-sim: gcc.c-torture/execute/pr58209.c   -O3 -g  (test for excess errors) visium-sim: gcc.c-torture/execute/pr68911.c   -O1  (test for excess errors) We've already discussed 960218-1 a bit.  I wouldn't be surprised if they're all the same problem in the end.  These started with: commit 4a960d548b7d7d942f316c5295f6d849b74214f5 (HEAD, refs/bisect/bad) Author: Aldy Hernandez Date:   Thu Sep 23 10:59:24 2021 +0200     Avoid invalid loop transformations in jump threading registry.