From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DC3843858C35; Mon, 27 Nov 2023 07:27:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC3843858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701070045; bh=OnUzans/oOUvH/aIKJ0/fPjTTnqhynZVQzM8Xle76Vc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VjgZ/j3TI4mnN1opq2qJebv1uwvhP5wo5oXWUFrVKZ7q1kAGGHEQ0Ysbqkd/vbIIX wwTTuQNNQhodB4tRzVwgFxLhzhni17KQyDos25KR5l8HaxUMAJhhKJMZ8JOZ3IvzEo O0b4CaxJg/VVK6n/eLDchDE10PeTBfzWX/rNbNjs= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/112653] PTA should handle correctly escape information of values returned by a function Date: Mon, 27 Nov 2023 07:27:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: unknown X-Bugzilla-Keywords: alias, missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D112653 --- Comment #9 from rguenther at suse dot de --- On Fri, 24 Nov 2023, hubicka at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112653 >=20 > --- Comment #8 from Jan Hubicka --- > On ARM32 and other targets methods returns this pointer. Togher with mak= ing > return value escape this probably completely disables any chance for IPA > tracking of C++ data types... Note that all call and global var escapes would also go to "return escape", so the only extra bit you get is the reverse, what escapes the explicit return doesn't escape through calls. We'd have RETURN_ESCAPE =3D ESCAPED And handle return by adding to RETURN_ESCAPED but not ESCAPED. Then for example DSE needs to properly query whether sth escaped through function return (ptr_deref_may_alias_global_p & friends). The cost is an extra bitmap in struct function. I will have a look if it's reasonably easy to implement.=