public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/59948] Optimize std::function Date: Thu, 26 Feb 2015 00:09:00 -0000 [thread overview] Message-ID: <bug-59948-4-XJSA8AqhlK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-59948-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59948 --- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> --- There has been huge progress in gcc-5: int m() () { struct function h; <bb 2>: MEM[(int (*<T5c6a>) (int) *)&h] = f; h._M_invoker = _M_invoke; h.D.27699._M_manager = _M_manager; std::_Function_base::_Base_manager<int (*)(int)>::_M_manager (&MEM[(struct _Function_base *)&h]._M_functor, &MEM[(struct _Function_base *)&h]._M_functor, 3); h ={v} {CLOBBER}; return 0; } Apparently we managed to inline f! For this simple testcase, all that is missing is inlining _M_manager to realize that when the last argument is 3 it does nothing. Then we can go back to more complicated examples like the one linked at the end of comment #0.
next prev parent reply other threads:[~2015-02-25 22:27 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-01-26 11:31 [Bug ipa/59948] New: " glisse at gcc dot gnu.org 2014-01-26 13:24 ` [Bug ipa/59948] " glisse at gcc dot gnu.org 2014-01-29 13:27 ` rguenth at gcc dot gnu.org 2014-02-04 2:35 ` hubicka at gcc dot gnu.org 2014-02-04 3:00 ` hubicka at gcc dot gnu.org 2014-05-02 14:06 ` glisse at gcc dot gnu.org 2014-09-26 16:54 ` hubicka at gcc dot gnu.org 2015-02-26 0:09 ` glisse at gcc dot gnu.org [this message] 2023-09-25 9:04 ` hubicka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-59948-4-XJSA8AqhlK@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).