From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 25B58385B535; Mon, 20 Mar 2023 10:25:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25B58385B535 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679307941; bh=8q1fSMkuqM6xR1TsZr5DwuPf2RAat0sj/9yYwD1OYds=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hSKJPY+0AKgMY8o4/nyb3iCEJULg2ITZ2gwnNawVsEHej9r4N6JH3NqcwX2+8GIVw uZh6xT9cDVDgN/Re+26xuJyY1c9FKRaFXnelWbbHELe9odCGHaT+Utj6fYQfg/R9kl vELhy3SArbTCaOqgIpzPfHlA8LBL1j22AG3iOf/E= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109192] [13 Regression] timeout with -O3 since r13-5579 Date: Mon, 20 Mar 2023 10:25:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: compile-time-hog, needs-reduction X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on short_desc priority Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109192 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2023-03-20 Summary|[13 Regression] timeout |[13 Regression] timeout |with -O3 -fno-var-tracking |with -O3 since r13-5579 |since r13-5579 | Priority|P3 |P1 --- Comment #5 from Richard Biener --- Confirmed - this has nothing to do with -fno-var-tracking btw but reproduces with just -O3 vs -O2. An interrupted (after a minute) perf profile shows + 55.46% 0.66% 1769 cc1 cc1 [.] operator_cast::op1_range # + 48.68% 0.05% 141 cc1 cc1 [.] operator_cast::fold_range # + 48.63% 3.06% 8238 cc1 cc1 [.] operator_cast::fold_range # + 27.27% 1.18% 3160 cc1 cc1 [.] irange::set_nonzero_bits # + 25.39% 1.68% 4512 cc1 cc1 [.] irange::set_range_from_nonzero_bits # + 21.08% 0.74% 1998 cc1 cc1 [.] irange::get_nonzero_bits # + 20.34% 14.24% 38289 cc1 cc1 [.] irange::get_nonzero_bits_from_range=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 and we're in the 'thread'(200) pass NEXT_PASS (pass_fre, false /* may_iterate */); /* After late FRE we rewrite no longer addressed locals into SSA form if possible. */ NEXT_PASS (pass_thread_jumps, /*first=3D*/false); NEXT_PASS (pass_dominator, false /* may_peel_loop_headers_p */); NEXT_PASS (pass_strlen); interrupting gives a backtrace like #2 0x000000000196ec95 in gori_compute::compute_operand_range ( this=3Dthis@entry=3D0x47bd5e0, r=3D..., stmt=3D,=20 lhs=3D..., name=3Dname@entry=3D, src=3D...= ,=20 rel=3D) at /space/rguenther/src/gcc/gcc/gimple-range-gori.cc:700 ... #211 0x000000000196f37b in gori_compute::compute_operand_range ( this=3Dthis@entry=3D0x47bd5e0, r=3D...,=20 stmt=3Dstmt@entry=3D, lhs=3D...,=20 name=3Dname@entry=3D, src=3D...,=20 rel=3D) at /space/rguenther/src/gcc/gcc/gimple-range-gori.cc:702 #212 0x0000000001970ec9 in gori_compute::outgoing_edge_range_p ( this=3Dthis@entry=3D0x47bd5e0, r=3D...,=20 e=3De@entry=3D 126)>,=20 name=3Dname@entry=3D, q=3D...) at /space/rguenther/src/gcc/gcc/gimple-range-gori.cc:1358 #213 0x0000000000e4aa79 in path_range_query::compute_ranges_in_block ( this=3Dthis@entry=3D0x7fff9c936a40,=20 bb=3Dbb@entry=3D) at /space/rguenther/src/gcc/gcc/gimple-range-path.cc:454 so 200 frames worth of recursion (just luck from some random gdb attach). There are just 201 BBs in the function (func_36.constprop) and 1525 SSA names, so this seems to be quadraticness / missed caching.=