From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2DFD23858C5F; Fri, 26 May 2023 20:25:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DFD23858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685132749; bh=ivnnlx4O3teBoMiDuZFULRXlzllDYhJ8P1walm+wknE=; h=From:To:Subject:Date:From; b=BVRrraZ+fmL1KJ2oWcLsRdfY9VgBfVbFXoloAuhI1/zL9yuYwhF8LcuBbAYjG4bKR nTFbzXHraKzD8uJ2y26LC3F/INRdr5nBtGbpca2gtQ6vjp/XjI/hIvxbn8Dx88N8fE Xy+suJaDggA88ioIqU+tK33kyObnRkblSMUUix1A= From: "nikolasklauser at berlin dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110000] New: GCC should implement exclude_from_explicit_instantiation Date: Fri, 26 May 2023 20:25:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nikolasklauser at berlin dot de 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D110000 Bug ID: 110000 Summary: GCC should implement exclude_from_explicit_instantiation Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nikolasklauser at berlin dot de Target Milestone: --- `exclude_from_explicit_instantiation` is an attribute implemented by clang.= It tells the compiler that a function should not be part of an explicit instantiation. This allows libraries to have greater control over which functions are part of their ABI and which aren't. It is used extensively in libc++ to keep the ABI surface as small as possible. Currently, libc++ uses always_inline if exclude_from_explicit_instantiation isn't available, resul= ting in almost every function in the library being declared as always_inline. Replacing always_inline with exclude_from_explicit_instantiation would approximately halve the time it takes to run the libc++ test suite with GCC. (removing always_inline brings the time down to about the same as clang tak= es)=