From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EC571385780D; Wed, 13 Mar 2024 17:38:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC571385780D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710351481; bh=tfNos8qlp94BukqG6v9NbFucBtqCoSad/Viq/UKcL0I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KHzAuZUwr+YlJpEyc+wwekKf6AciWaTqgNvHLrAj1ejdtaFEeZL1ITsk0WpIcFPKw pEnxPfT5vPOlWIguVW2IC7bbFi2iG/J6YJ/yhP148oMtglTCbGtBF4a7b7KEEJRvjq zFGRNa8Ebw0SEl/WAqe299ZoTllMT/I8P8cAmTyE= From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114151] [14 Regression] weird and inefficient codegen and addressing modes since r14-9193 Date: Wed, 13 Mar 2024 17:37:57 +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: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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=3D114151 --- Comment #23 from Andrew Macleod --- Created attachment 57686 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57686&action=3Dedit another patch (In reply to Richard Biener from comment #22) > (In reply to Andrew Macleod from comment #21) > >=20 > > And have that all work with general trees expressions.. That would solve > > much of this for you? >=20 > Yes, I wouldn't mind if range_on_{entry,exit} handle general tree > expressions, > there's enough APIs to be confused with already ;) >=20 > >=20 I promoted range_on_exit and range_on_entry to be part of the API in this patch. This brings valeu_query in line with rangers basic 5 routine API. = It also tweaks rangers versions to handle tree expressions. It bootstraps and shows no regressions, with the caveat that I haven't actually tested the us= age of range_on_entry and exit with arbitrary trees. As you can see, I didnt change much... so it should work OK. > >=20 > >=20 > > >=20 > > > Interestingly enough we somehow still need the > > >=20 > >=20 > > >=20 > > > hunk of Andrews patch to do it :/ > > >=20 > >=20 > > That probably means there is another call somewhere in the chain with no > > context. However, I will say that functionality is more important than = it > > seems. Should have been there from the start :-P. >=20 > Possibly yes. It might be we fill rangers cache with VARYING and when > we re-do the query as a dependent one but with context we don't recompute > it? I also only patched up a single place in SCEV with the context so > I possibly missed some others that end up with a range query, for example > through niter analysis that might be triggered. My guess is the latter. Without a context and with that change, ranger evaluates the definition with the context at the location of the def, then simply uses that value. If anything it is dependent on later changes, the temporal cache should indicate it's out of date and trigger a new fold using current values.=