From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F076B3858C78; Tue, 1 Mar 2022 19:12:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F076B3858C78 From: "vittorio.romeo at outlook dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96780] debuginfo for std::move and std::forward isn't useful Date: Tue, 01 Mar 2022 19:12:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vittorio.romeo at outlook dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka 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: Tue, 01 Mar 2022 19:12:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96780 --- Comment #7 from Vittorio Romeo --- > As discussed on IRC, we might not want to do this folding at -O0 (althoug= h I'd personally be happy with it unconditionally). I think you should reconsider this as discussed in these places: - https://github.com/llvm/llvm-project/issues/53689 - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104719 Compiling in `-O0` is a valid choice when trying to maximize compilation sp= eed and debuggability, yet pretty much everyone seems to agree that they'd like= to never see `std::move`/`std::forward` in their debugger nor have them introd= uce any performance overhead, even in `-O0`. I would also suggest, as an extension, to consider a more general approach = for other standard library functions. As an example, there are good gains to be made in terms of debug performance for things like `std::unique_ptr` (see https://github.com/llvm/llvm-project/issues/53689#issuecomment-1055669228) = or `std::vector::iterator`.=