From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 8185E3858432 for ; Tue, 28 Sep 2021 13:53:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8185E3858432 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-460-Y9KSrTM8O_SleEXAqVEZFw-1; Tue, 28 Sep 2021 09:53:47 -0400 X-MC-Unique: Y9KSrTM8O_SleEXAqVEZFw-1 Received: by mail-wr1-f69.google.com with SMTP id k2-20020adfc702000000b0016006b2da9bso15128522wrg.1 for ; Tue, 28 Sep 2021 06:53:47 -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 :content-transfer-encoding; bh=//4Y26zZbyGrvBmo6GYNr7XFm91nCP3vTSkvqUtjeIs=; b=GRXrfAPuwsvqRNmKeLkDfLDK66p57HUbm2zqbWk3+zNwFh9bK0C7STYURrDDdVbM5T tKcY8MeeX5GA51fhYGipSLpX09JY35idvaz+txyF4SLmSl4IIAB+xDPGKfK1R16mLdiM noKV+46wcbUO1xZMWP4YyIN2+COmlmSgdiGlmgmw9KsmjkNOj2fUWjukR0g3luW5sNBZ v9Y36YT4tUNRw4+bClw5UdingaOZSbrGK7zKzpLq8yAFVOpnFuFB3tFVhufwuLF6W6Zt dukVwklUqrhJ9SRYsqBzx4yHcDBGV4MsHTt9GsQNKHy0zFD3jsPoH54ngnxCKDq48q6Q CLHg== X-Gm-Message-State: AOAM530lLp3zG5h8MM4jyVmsNRjeMm3irhYTjg3qf3VFOo8rUdDIwRsQ OQdk/Lx+XUcSX67vhItp+ptGp09Ait6Npng9ll2mOUfXn9rk1n0CEYSsdcZeNVZVeX1QoKk+Q12 lkQHP6F6ZfhN8qzO+5Q== X-Received: by 2002:a1c:2d6:: with SMTP id 205mr4845683wmc.48.1632837226157; Tue, 28 Sep 2021 06:53:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw19TpON2wFVygv1VcPahs5RbsoejraSfqXiCmHGZ7tafBzNX9wQWmPOSzCbpBcfK3T3gBInw== X-Received: by 2002:a1c:2d6:: with SMTP id 205mr4845674wmc.48.1632837225974; Tue, 28 Sep 2021 06:53:45 -0700 (PDT) Received: from abulafia.quesejoda.com ([139.47.33.227]) by smtp.gmail.com with ESMTPSA id n26sm2671290wmi.43.2021.09.28.06.53.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Sep 2021 06:53:45 -0700 (PDT) Subject: Re: [PATCH] Improve jump threading dump output. To: Jeff Law , GCC patches References: <20210928094545.889111-1-aldyh@redhat.com> <9f2db536-c182-426e-05d5-0242d9a109f1@gmail.com> From: Aldy Hernandez Message-ID: <25abc6f7-8006-5cf5-95bf-bd752a46e9ea@redhat.com> Date: Tue, 28 Sep 2021 15:53:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <9f2db536-c182-426e-05d5-0242d9a109f1@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, BODY_8BITS, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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:53:52 -0000 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. 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.) Send anything my way. Aldy