public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/56718] New: Early inlining prevents type based devirtualization @ 2013-03-25 10:26 jamborm at gcc dot gnu.org 2013-03-25 10:27 ` [Bug tree-optimization/56718] " jamborm at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: jamborm at gcc dot gnu.org @ 2013-03-25 10:26 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56718 Bug #: 56718 Summary: Early inlining prevents type based devirtualization Classification: Unclassified Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: jamborm@gcc.gnu.org Created attachment 29718 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29718 Testcase The attached testcase runs 2.5 times faster (on my x86_64 desktop at -O3) when early inlining is disabled. The reason is that while inlining and IPA-CP can work out the type of the object in checkGetElement and checkSetElement, early inlining cannot and after it puts the virtual call into the same function with the definition of the object, there is subsequently no mechanism to do the devirtualization in such intraprocedural setting. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/56718] Early inlining prevents type based devirtualization 2013-03-25 10:26 [Bug tree-optimization/56718] New: Early inlining prevents type based devirtualization jamborm at gcc dot gnu.org @ 2013-03-25 10:27 ` jamborm at gcc dot gnu.org 2013-04-17 16:03 ` jamborm at gcc dot gnu.org 2013-04-19 12:04 ` jamborm at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: jamborm at gcc dot gnu.org @ 2013-03-25 10:27 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56718 Martin Jambor <jamborm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2013-03-25 AssignedTo|unassigned at gcc dot |jamborm at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/56718] Early inlining prevents type based devirtualization 2013-03-25 10:26 [Bug tree-optimization/56718] New: Early inlining prevents type based devirtualization jamborm at gcc dot gnu.org 2013-03-25 10:27 ` [Bug tree-optimization/56718] " jamborm at gcc dot gnu.org @ 2013-04-17 16:03 ` jamborm at gcc dot gnu.org 2013-04-19 12:04 ` jamborm at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: jamborm at gcc dot gnu.org @ 2013-04-17 16:03 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56718 Martin Jambor <jamborm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |http://gcc.gnu.org/ml/gcc-p | |atches/2013-04/msg01034.htm | |l --- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> 2013-04-17 16:03:01 UTC --- I have submitted a patch to address this issue: http://gcc.gnu.org/ml/gcc-patches/2013-04/msg01034.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/56718] Early inlining prevents type based devirtualization 2013-03-25 10:26 [Bug tree-optimization/56718] New: Early inlining prevents type based devirtualization jamborm at gcc dot gnu.org 2013-03-25 10:27 ` [Bug tree-optimization/56718] " jamborm at gcc dot gnu.org 2013-04-17 16:03 ` jamborm at gcc dot gnu.org @ 2013-04-19 12:04 ` jamborm at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: jamborm at gcc dot gnu.org @ 2013-04-19 12:04 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56718 Martin Jambor <jamborm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> 2013-04-19 12:04:45 UTC --- Author: jamborm Date: Fri Apr 19 12:00:27 2013 New Revision: 198088 URL: http://gcc.gnu.org/viewcvs?rev=198088&root=gcc&view=rev Log: 2013-04-19 Martin Jambor <mjambor@suse.cz> PR tree-optimization/56718 * ipa-cp.c (ipa_value_from_known_type_jfunc): Moved... * ipa-prop.c (ipa_binfo_from_known_type_jfunc): ...here, renamed and made public. Adjusted all callers. (ipa_intraprocedural_devirtualization): New function. * ipa-prop.h (ipa_binfo_from_known_type_jfunc): Declare. (ipa_intraprocedural_devirtualization): Likewise. * Makefile.in (tree-ssa-pre.o): Add ipa-prop.h to dependencies. testsuite/ * g++.dg/ipa/imm-devirt-1.C: New test. * g++.dg/ipa/imm-devirt-2.C: Likewise. Added: trunk/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C trunk/gcc/testsuite/g++.dg/ipa/imm-devirt-2.C Modified: trunk/gcc/ChangeLog trunk/gcc/Makefile.in trunk/gcc/ipa-cp.c trunk/gcc/ipa-prop.c trunk/gcc/ipa-prop.h trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-pre.c ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-19 12:04 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-03-25 10:26 [Bug tree-optimization/56718] New: Early inlining prevents type based devirtualization jamborm at gcc dot gnu.org 2013-03-25 10:27 ` [Bug tree-optimization/56718] " jamborm at gcc dot gnu.org 2013-04-17 16:03 ` jamborm at gcc dot gnu.org 2013-04-19 12:04 ` jamborm at gcc dot gnu.org
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).