This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/35545] virtual call specialization not happening with FDO
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Sep 2014 21:29:37 +0000
- Subject: [Bug middle-end/35545] virtual call specialization not happening with FDO
- Auto-submitted: auto-generated
- References: <bug-35545-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35545
--- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
We still fail to fold here. After tracer we get:
# ap_2 = PHI <ap_8(4)>
# prephitmp_14 = PHI <&MEM[(void *)&_ZTV1A + 16B](4)>
_19 = *prephitmp_14;
PROF_24 = [obj_type_ref] OBJ_TYPE_REF(_19;(struct A)ap_2->0);
if (PROF_24 == foo)
goto <bb 9>;
else
goto <bb 8>;
and the necessary forward propagation & folding to realize that:
_19 = foo;
PROF_24 = [obj_type_ref] OBJ_TYPE_REF(_19;(struct A)ap_8->0);
if (PROF_24 == foo)
happens only in .optimized dump.
I would go with patch from comment 5 moving tracer earlier - the tail
duplication intends to make code more optimizable and it is stupid to run it
only after all optimizations are done.