public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/46507] std::tuple missed optimization Date: Tue, 16 Nov 2010 19:53:00 -0000 [thread overview] Message-ID: <bug-46507-4-0XLjDjj272@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-46507-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46507 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-16 19:27:48 UTC --- Paolo, your example *does* show a significant difference: the missed optimisation is in std::get() and not tuple itself, as shown by #include <tuple> #include <utility> struct A { virtual void f () const; }; void arg_tuple_test (const std::pair<A,A> &t) { std::get<0>(t).f (); } void arg_pair_test (const std::pair<A,A> &t) { t.first.f (); } The second function jumps directly to A::f
next prev parent reply other threads:[~2010-11-16 19:28 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-11-16 17:59 [Bug tree-optimization/46507] New: " miles at gnu dot org 2010-11-16 19:06 ` [Bug tree-optimization/46507] " paolo.carlini at oracle dot com 2010-11-16 19:11 ` miles at gnu dot org 2010-11-16 19:53 ` redi at gcc dot gnu.org [this message] 2013-09-14 21:35 ` glisse at gcc dot gnu.org 2013-10-12 20:13 ` [Bug tree-optimization/46507] std::get and devirtualization on non-automatic variables glisse at gcc dot gnu.org 2013-11-08 14:41 ` jamborm at gcc dot gnu.org 2014-01-16 6:10 ` hubicka at gcc dot gnu.org 2014-01-16 6:18 ` hubicka at gcc dot gnu.org 2014-01-16 8:51 ` rguenther at suse dot de 2014-01-16 18:02 ` 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-46507-4-0XLjDjj272@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).