This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Speculative call support in the callgraph
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Andi Kleen <andi at firstfloor dot org>, gcc-patches at gcc dot gnu dot org, marxin dot liska at gmail dot com, mjambor at suse dot cz, davidxl at google dot com
- Date: Sat, 10 Aug 2013 11:54:27 +0200
- Subject: Re: Speculative call support in the callgraph
- References: <20130809121840 dot GA28721 at kam dot mff dot cuni dot cz> <87pptmo6n3 dot fsf at tassilo dot jf dot intel dot com> <20130809231511 dot GC12350 at kam dot mff dot cuni dot cz> <20130810002521 dot GH19750 at two dot firstfloor dot org> <20130810041914 dot GI19750 at two dot firstfloor dot org> <20130810093710 dot GA9171 at kam dot mff dot cuni dot cz>
> This is really strange. The speculative edges should not be created here at all.
> So perhaps some uninitialized memory access crept in :(
> It would help if you try to track how the ->speculative bit appears for you
> in the loop in cgraph_rebuild_references. I will try to reproduce your setup now.
OK, it reproduced for me on one of the testers. I think the bug is that
cgraph edges are not cleared upon allocation and I did not set the newly introduced
flag:
Index: cgraph.c
===================================================================
--- cgraph.c (revision 201640)
+++ cgraph.c (working copy)
@@ -873,6 +873,7 @@ cgraph_create_edge_1 (struct cgraph_node
edge->indirect_info = NULL;
edge->indirect_inlining_edge = 0;
+ edge->speculative = false;
return edge;
}
I will commit this as obvious shortly.
>
> Honza
> >
> > -Andi