From: "Jørgen Kvalsvik" <jorgen.kvalsvik@woven-planet.global>
To: Michael Matz <matz@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 1/2] gcov: test switch/break line counts
Date: Tue, 11 Oct 2022 15:57:59 +0200 [thread overview]
Message-ID: <b4c8698e-0542-7a4c-40c5-e4d184c33910@woven-planet.global> (raw)
In-Reply-To: <alpine.LSU.2.20.2210111353560.9510@wotan.suse.de>
On 11/10/2022 15:55, Michael Matz wrote:
> 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.
Michael,
I apologise for the confusion. The diff there is not a part of the change itself
(note the indentation) but rather a way to reproduce, or at least understand,
the type of change that would trigger the new test error. If it is too confusing
I can re-write the commit message.
Thanks,
Jørgen
next prev parent reply other threads:[~2022-10-11 13:58 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 ` [PATCH 1/2] gcov: test switch/break line counts Michael Matz
2022-10-11 13:57 ` Jørgen Kvalsvik [this message]
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=b4c8698e-0542-7a4c-40c5-e4d184c33910@woven-planet.global \
--to=jorgen.kvalsvik@woven-planet.global \
--cc=gcc-patches@gcc.gnu.org \
--cc=matz@suse.de \
/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).