From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 5345F38417DD for ; Wed, 14 Dec 2022 10:37:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5345F38417DD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x531.google.com with SMTP id c17so21835188edj.13 for ; Wed, 14 Dec 2022 02:37:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Oi66k53vPZBX18xJTeCuKgmc31YqLLG9jCIMGHhXM4c=; b=akLKse2Q+5sBRqafAuBlFF7BAYttlpaqivKowcGauSrDPPxKGVfAXqAd3VZRFDbUnN lxsy54KtjUcD4Q6Cszl/Ma/7AMto3cVPw9Dkk8ouVTXTCyvC2aJ6JpxOuCIDqXXag5rO Zi+sT3PwoDqW9UAkyQ1SmnMkMvC5NCu2UJNv3XAJAYV30vq2uiYyqMt6xlGDx9ncP9HC tB2Fnl0d354wqR+IPsrWcMiNxiKEZ2ms/rJj+MKeqh+LoO2gAv7WDQHv+UHDOEUF9L9I UQzZheadg/4eAjQH7hggTIFH3BCh82K469VqdSMUOSB4301WnkHevxWPnGE70nh9Vb+S hR/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Oi66k53vPZBX18xJTeCuKgmc31YqLLG9jCIMGHhXM4c=; b=Hc2dx4iXUEGmagMVqv1hCgVoudLRmw2yzH4NfRYMjBb1LedCXqVW+CqfSkmKkBWFq/ I/0NoiUtzRCjCc2nuVh2vU/RQdYZRoc4k0VOnSh755LGKzptBp0TGFxfdSZKfAjuTB+R DNclNaxPnhd03lNCgzOmmDO0tangk0NmKxU3RIu9haXUVMsTZyeFsGkPd1dDwp0FKEtI eeT5XEUPsqQkcZE3czgsAIs3XHMd+PRahFhbVgGIUhwrS0Y6xwdjxT0UJHHL9jL+qUx4 7gJ3f4idQjqvlcnFy1Twq41cXNoP16v6AX1V8CyE68jb60dLZRs80gId3f5PP3qzQ4ag Ajig== X-Gm-Message-State: ANoB5pkGYwEWhLfXGeDfiyDlNuTk3d42k+rHFe29b4AnW5JRi+yEL4K1 3m2VHVmUxGI8QOkhJSI0LknBNeEYU4K39l7IKH4= X-Google-Smtp-Source: AA0mqf6Xc4gt/DqK9mFut68vOnwbzsBoAckXgBdNzn/98rz648K/8cS/FYHTdqUjOwkUJj24SXeHehehf+5DQh5pQwc= X-Received: by 2002:a05:6402:1ccb:b0:46f:d026:6b44 with SMTP id ds11-20020a0564021ccb00b0046fd0266b44mr1443868edb.61.1671014259996; Wed, 14 Dec 2022 02:37:39 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Claudiu Zissulescu Ianculescu Date: Wed, 14 Dec 2022 12:37:28 +0200 Message-ID: Subject: Re: Possible regression in DF analysis To: Richard Biener Cc: Eric Botcazou , gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: I have update the fix to this one: diff --git a/gcc/df-core.cc b/gcc/df-core.cc index a901b84878f..cc6383990a1 100644 --- a/gcc/df-core.cc +++ b/gcc/df-core.cc @@ -1437,7 +1437,16 @@ df_analyze_loop (class loop *loop) df_set_blocks (blocks); BITMAP_FREE (blocks); - df_analyze_1 (); + /* Iterate over loop's exit edges and add theirs destinations BB + indexes. */ + struct loop_exit *exit; + for (exit = loop->exits->next; exit->e; exit = exit->next) + bitmap_set_bit (df->blocks_to_analyze, exit->e->dest->index); + + if (dump_file) + debug_bitmap_file (dump_file, df->blocks_to_analyze); + + df_analyze (); } I still need to validate it for x86 Best, Claudiu On Tue, Dec 13, 2022 at 7:38 PM Claudiu Zissulescu Ianculescu wrote: > > > > > Maybe you want to iterate over the loops exit edges and include their destination block instead? > > > > This is better approach, let me try it and I will be back to you. > > Thanks, > Claudiu