From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5EF69385840E; Wed, 24 May 2023 05:46:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5EF69385840E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684907203; bh=IxP7AWCBnPkAavA7BitE94ncKscjgPSDC+bsxJ3GCQY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PS9nWHs02x0BdlUQHiDu5pGVfqDDfZlxchs0wjdnyAld68X9erI94Eog9Xf48K9Fo xEjXeKG7gcOmdz5mXKqgToZm4VT5/kaxH+0dlOBwxvFwRxaFDWM9R/OCaMCVyp6KHk f5CQXxmGdZUdJ3MNWlT2Kb2QARhDyb7EmHNeXFRg= From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109695] [14 Regression] crash in gimple_ranger::range_of_expr since r14-377-gc92b8be9b52b7e Date: Wed, 24 May 2023 05:46: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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: aldyh at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D109695 --- Comment #38 from Aldy Hernandez --- (In reply to Andrew Macleod from comment #37) > (In reply to CVS Commits from comment #36) >=20 > > For the curious, a particular hot spot for IPA in this area was: > >=20=20=20=20=20 > > ipcp_vr_lattice::meet_with_1 (const value_range *other_vr) > > { > > ... > > ... > > value_range save (m_vr); > > m_vr.union_ (*other_vr); > > return m_vr !=3D save; > > } > >=20=20=20=20=20 > > The problem isn't the resizing (since we do that at most once) but = the > > fact that for some functions with lots of callers we end up a huge > > range that gets copied and compared for every meet operation. Maybe > > the IPA algorithm could be adjusted somehow??. >=20 > isn't the the same thing as=20 >=20 > return m_vr.union_ (*other_vr); >=20 > which should be much faster without all the copying... ? Indeed. That is in the committed version of the patch. I just forgot to update the message. The reason I didn't originally do as you suggested was that there was a bug= in the union code that returned TRUE for a union that hadn't changed anything.= =20 That has also been fixed in trunk.=