https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110528
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed|2023-07-03 00:00:00 |2024-02-19
Ever confirmed|0 |1
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed with -O2 -gstatement-frontiers -fselective-scheduling2 (but oddly not
-O2 -g -fselective-scheduling2).
Samples: 4K of event 'cycles:u', Event count (approx.): 5647511948
Overhead Samples Command Shared Object Symbol
20.82% 901 cc1 cc1 [.] moveup_expr_cached
10.45% 446 cc1 cc1 [.]
schedule_expr_on_boundary
7.60% 328 cc1 cc1 [.] is_ineligible_successor
7.56% 327 cc1 cc1 [.] bitmap_bit_p
7.30% 315 cc1 cc1 [.] sel_bb_head
possibly because of
/* Same as moveup_expr, but first looks up the result of
transformation in caches. */
static enum MOVEUP_EXPR_CODE
moveup_expr_cached (expr_t expr, insn_t insn, bool inside_insn_group)
{
...
if (DEBUG_INSN_P (EXPR_INSN_RTX (expr))
&& BLOCK_FOR_INSN (EXPR_INSN_RTX (expr))
&& (sel_bb_head (BLOCK_FOR_INSN (EXPR_INSN_RTX (expr)))
== EXPR_INSN_RTX (expr)))
/* Don't use cached information for debug insns that are heads of
basic blocks. */;
and likely -gstatement-frontiers puts debug insns right there.
It reads like a band-aid fix for a compare-debug issue that was then traded
for this compile-time one ...