From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C8FC393C878; Fri, 25 Sep 2020 09:20:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C8FC393C878 From: "ro at CeBiTec dot Uni-Bielefeld.DE" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/97119] Top level option to disable creation of IPA symbols such as .localalias is desired Date: Fri, 25 Sep 2020 09:20:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at CeBiTec dot Uni-Bielefeld.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 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 Sep 2020 09:20:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97119 --- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE --- > --- Comment #5 from Ali Bahrami --- > I added -flive-patching=3Dinline-only-static as suggested by Martin. It d= idn't > alter the results I'm seeing. There is still a lot of .localalias in the > resulting objects. Still, the optimizations it is documented as preventin= g all > seem like the sort of things we wouldn't want for the core OS objects, so= we > probably should add this. I've since compared the list of options disabled by -flive-patching=3Dinline-only-static with the call sites of noninterposable_alias and the options that controlled their use. I'd initially done this to come up with additional options to try on top of -fno-ipa-icf that Ali had been using. This identified two more to try: -fdevirtualize -fipa-profile However, Ali found that disabling those doesn't help either. Any additional suggestions what else to try here? > I'm at a disadvantage here, as I don't fully understand how clone functio= ns and > .localalias symbols are related. From the gcc manpage, I gather that clon= es are > copies made to do certain optimizations, such as elimination of constant > arguments. In contrast, foo, and foo.localalias seen to be references to a > single function, with the main different being that foo is global and > foo.localias is local. I'm not sure what the benefit of the local symbol = is, > but since it references the same address, as the global, it's not what I = would > call a clone. This is still an important issue, I believe: without fully understanding what those symbols are needed for and what the consequences would be of disabling their creation, it's hard to decide what to do. Going back to my initial hack (attached) of disabling .localalias* creation, what it does is exactly what happens on targets that don't define ASM_OUTPUT_DEF, i.e. don't support aliases. At least a testsuite run identified almost no impact (one failing test on Solaris/x86). Given that this is a supported configuration, I'd expect that this doesn't result in wrong code. Would a patch along those lines (properly controlled by an off-by-default option) be acceptable to move this forward?=