From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by sourceware.org (Postfix) with ESMTPS id 590D93858408 for ; Tue, 28 Sep 2021 13:56:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 590D93858408 Received: by mail-qk1-x72b.google.com with SMTP id f130so40609030qke.6 for ; Tue, 28 Sep 2021 06:56: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=yYErj/vilmVfn/Pg4Q06mC3COY/kFiu4T4q7ky9H6wE=; b=8ANJH7iSwYae0bkD/bQ6TotSoO9U9KQkXUJlJbTlJCfJbAve9v05+uNZIUAVT5ZYYS MPC6xLoaJ4/Zym/wRcV6wm5/1P1Rr2/TjfUl0mmGzdENw2QuhuM5dQbdgWVtAg0Pwt50 NSLpIPCtL8fytt7G4HsRQkvXC78vsNk6NzsM7xbx6T3fmrQ8JLsUIYLPovp5glHmvQFd 4NinykClgySrai43Brt2TeNFFIWHFrshkbkOA4p7F+mhKMwv5LJBK/0NuJrtP8vA/MT0 m+HPOr+/4gjmxbApcH7nIs4X/r3RdPRRxrYhKiYlaEMveqs10lb0RxTkDwrM2PM6/1q6 T0mg== X-Gm-Message-State: AOAM530YbLRd3KZwGEas5v8jkhy6FeiCIdkTFv5x/S+zPz2l0PGSe6dF 9NnCgI53Tv5KjIELq7gdUjc= X-Google-Smtp-Source: ABdhPJynv1WmkSzAG993EhXwmS10X90kCBKIgjVE4xKhcT/zQdtOjLEGJhDVo3m4DCngJLC1vr3EUA== X-Received: by 2002:a37:2d05:: with SMTP id t5mr118043qkh.360.1632837391835; Tue, 28 Sep 2021 06:56: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 x125sm15160534qkd.8.2021.09.28.06.56.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Sep 2021 06:56: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: Date: Tue, 28 Sep 2021 07:56:28 -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=-2.3 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: Tue, 28 Sep 2021 13:56:33 -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. Yup.  I suspect it's just one or two issues that are showing up on a variety of targets.  And as I've said before, that's why we've got a tester :-) > > I just fixed a P1 that was causing undefined behavior.  Other than > that, I don't have any known regressions apart from the loop crossing > restrictions which you and me haven't agreed upon yet. (Well...there > are some archs that need testsuite tweaking, but they're not bugs per > se.) These could end up being testsuite issues.  I've only debugged as far as "there's a sea of red failures" on the dashboard. > > Send anything my way. Got a docker instance of the first one spinning right now for debugging purposes.  I'll look at it after I finish playing chauffeur for my daughter. jeff