public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: "Jørgen Kvalsvik" <jorgen.kvalsvik@woven-planet.global>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 1/2] gcov: test switch/break line counts
Date: Tue, 11 Oct 2022 13:55:26 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LSU.2.20.2210111353560.9510@wotan.suse.de> (raw)
In-Reply-To: <20221011124303.99673-1-jorgen.kvalsvik@woven-planet.global>

[-- Attachment #1: Type: text/plain, Size: 1535 bytes --]

Hello,

On Tue, 11 Oct 2022, Jørgen Kvalsvik via Gcc-patches wrote:

> The coverage support will under some conditions decide to split edges to
> accurately report coverage. By running the test suite with/without this
> edge splitting a small diff shows up, addressed by this patch, which
> should catch future regressions.
> 
> Removing the edge splitting:
> 
>     $ diff --git a/gcc/profile.cc b/gcc/profile.cc
>     --- a/gcc/profile.cc
>     +++ b/gcc/profile.cc
>     @@ -1244,19 +1244,7 @@ branch_prob (bool thunk)
>                     Don't do that when the locuses match, so
>                     if (blah) goto something;
>                     is not computed twice.  */
>     -             if (last
>     -                 && gimple_has_location (last)
>     -                 && !RESERVED_LOCATION_P (e->goto_locus)
>     -                 && !single_succ_p (bb)
>     -                 && (LOCATION_FILE (e->goto_locus)
>     -                     != LOCATION_FILE (gimple_location (last))
>     -                     || (LOCATION_LINE (e->goto_locus)
>     -                         != LOCATION_LINE (gimple_location (last)))))
>     -               {
>     -                 basic_block new_bb = split_edge (e);
>     -                 edge ne = single_succ_edge (new_bb);
>     -                 ne->goto_locus = e->goto_locus;
>     -               }
>     +

Assuming this is correct (I really can't say) then the comment needs 
adjustments.  It specifically talks about this very code you remove.


Ciao,
Michael.

  parent reply	other threads:[~2022-10-11 13:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 12:43 Jørgen Kvalsvik
2022-10-11 12:43 ` [PATCH 2/2] gcov: test line count for label in then/else block Jørgen Kvalsvik
2022-10-13 11:40   ` Richard Biener
2022-10-11 13:55 ` Michael Matz [this message]
2022-10-11 13:57   ` [PATCH 1/2] gcov: test switch/break line counts Jørgen Kvalsvik
2022-10-11 14:00     ` Michael Matz
2022-10-13 11:39 ` Richard Biener
2022-10-14 10:09   ` Jørgen Kvalsvik
  -- strict thread matches above, loose matches on Subject: below --
2022-10-05 12:04 [PATCH 0/2] gcov: Split when edge locus differ from dest bb Jørgen Kvalsvik
2022-10-05 12:04 ` [PATCH 1/2] gcov: test switch/break line counts Jørgen Kvalsvik
2022-10-05 12:27   ` Martin Liška

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.20.2210111353560.9510@wotan.suse.de \
    --to=matz@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jorgen.kvalsvik@woven-planet.global \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).