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