From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id C151138308D0 for ; Wed, 14 Dec 2022 11:30:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C151138308D0 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-ej1-x633.google.com with SMTP id n20so43803544ejh.0 for ; Wed, 14 Dec 2022 03:30:50 -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=kayOugfOhk+xD+oQt1/JRguG+HWL27d2yXra+HLWLHA=; b=mR4iJ8fE/nFu3G1eCh/Bv8+UQLanuy8zufTb9iMCikJNslZrVX8RiLgAUUX3mhH5jk axSerKeHKoKR5MVtpEqDA2hJeafrKXZF3IoaMZWnjgvzUckqvcWXm5YEiFCpspXxa3OL y+rjvufXYzm5PSKQt4GdinP8/UN8sxISpiP9/togcFzfW5QV3cn8Z/9GDCOsG/fG/owW xOVuiDT4qJAUrMIXyUsJqX9xLs42hVqEAImKSMFTS6RrOrACBlW3DBQb4en2O/oAVZve 08sYBzGDUpuNo/GpWASPkdBLzvunyww5G7eKe0aygYYfZCITk3k6UKKsV7Bn4yrQbe3j fRsg== 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=kayOugfOhk+xD+oQt1/JRguG+HWL27d2yXra+HLWLHA=; b=jlqYTzJbiq8gSj7rC9XVAL5pTi6RYNWOm/QYHH3BqLzpntcMYygavHqi9J20W1cwdl XOTMEgiRS7+3lkfVy8qQo1TDvlqSTcN3NrNEqQqcRXLJab7mJ/QqQBIBE8QidLPO5jZb cXJFDG5YUbOWY1lB8oZi8gYGv5k0nofR6f+4NM4YT59k1bgiM5jF/CQdLvSugvrdsZVQ 8A33Eij4i7A/j26ao0Aen+TJCH8ATffp6PE1CblxFGS6AP3K4R+ftJPApZXsQCwNh1B6 GxkhZlkLQKechcDkiVNbSwHZg/ABCQNkVxygF3Ora2jqgkaAltSNi6kGbTNz+wFvdzLh lL0w== X-Gm-Message-State: ANoB5pnLCnt/maXLoXUck6keqfSejrfbj7TuwLuIpvN+5yWltoBFkyNq L9kWV5+KZVTHdUsaOv02HTN89gsrCL//vONh4DM= X-Google-Smtp-Source: AA0mqf6wwGUQAZKcRtadcpCOx2Gmm2xC8sa7V6dAhgH+52ioDqe30A320oq3mkfiIsTMqKloQbXGcpk3baPkQq7gu/A= X-Received: by 2002:a17:906:2b81:b0:7c0:f716:e395 with SMTP id m1-20020a1709062b8100b007c0f716e395mr14997401ejg.160.1671017449550; Wed, 14 Dec 2022 03:30:49 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Claudiu Zissulescu Ianculescu Date: Wed, 14 Dec 2022 13:30:38 +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.9 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: Hi Richard, Sorry for my misunderstanding. I am calling the df_analyze() instead of df_analyze1() at the end. Shouldn't df_analyze take care and compute the correct postorder (df-core.cc:1273) ? Thank you, Claudiu On Wed, Dec 14, 2022 at 1:06 PM Richard Biener wrote: > > On Wed, Dec 14, 2022 at 11:37 AM Claudiu Zissulescu Ianculescu > wrote: > > > > 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); > > I think you want to adjust the local 'blocks' bitmap passed to df_set_blocks. > There's also the issue that the computed postorder doesn't include the new > blocks and thus the computation will likely be invalid? > > > + > > + 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