From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7CE2F3858414; Fri, 25 Feb 2022 13:00:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CE2F3858414 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104686] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with -march=skylake Date: Fri, 25 Feb 2022 13:00:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: compile-time-hog, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2022 13:00:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104686 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at gcc dot gnu.org --- Comment #9 from Richard Biener --- (In reply to Martin Li=C5=A1ka from comment #8) > (In reply to Martin Li=C5=A1ka from comment #7) > > (In reply to Richard Biener from comment #6) > > > Both revisions affect vectorizer cost modeling only. With > > > -fno-vect-cost-model it compiles faster for me but still a slow 30s a= nd 91% > > > in RA. > >=20 > > There are numbers with -fno-vect-cost-model: > >=20 > > Bisecting latest revisions > > a9e2ebe839d56416(24 Feb 2022 22:16)(oliva@adacore.com): [took: 36.06 = s] > > result: OK > > 250f234988b62316(20 Apr 2021 09:51)(stefansf@linux.ibm.com): [took: 1= 8.35 > > s] result: OK > >=20 > > I'm going to find out where the change happensed. >=20 > Which started with r12-2463-ga6291d88d5b6c17d. I think you want to keep r12-7293 in the tree - the above introduced a huge regression that was already fixed. So this testcase was probably always slow to compile and spending all time in RA? When using callgrind on the reduced testcase and a -O0 compiler I see most time spent in ira_object_conflict_iter_cond, in particular the loop /* Skip bits that are zero. */ for (; (word & 1) =3D=3D 0; word >>=3D 1) bit_num++; and the load obj =3D ira_object_id_map[bit_num + i->base_conflict_id]; maybe we can use ctz_hwi here (hopefully we optimize this loop with -O2). This function is most called from allocnos_conflict_p which is called from update_conflict_hard_regno_costs. In particular we have 677544 calls to get_next_upate_cost () and 1824339 calls to allocnos_conflict () there from just 34480 calls to update_conflict_hard_regno_costs. queue_update_cost is called 1365947 times. Maybe we can improve things or at least cut things off with decreasing precision somehow? Vlad?=