This is the mail archive of the
mailing list for the GCC project.
Re: Speculative call support in the callgraph
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, 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:37:10 +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>
> On Sat, Aug 10, 2013 at 02:25:21AM +0200, Andi Kleen wrote:
> > On Sat, Aug 10, 2013 at 01:15:11AM +0200, Jan Hubicka wrote:
> > > > Jan Hubicka <email@example.com> writes:
> > > >
> > > > > Hi,
> > > > > this patch adds support for speculative calls into callgraph. The idea is that
> > > > > any IPA optimization that believes it knows likely target of an indirect call
> > > > > (currently I use it for cross-module indirect call profiling, but I expect
> > > > > Martin J. can easily add support for ipa-cp and I hope to add speculative
> > > > > devirtualization in foreseeable future since it should make difference for
> > > > > Firefox). Speculative call replaces indirect call
> > > >
> > > > Patch appears to break boot strap on x86_64-linux
> > > > (or maybe your other one)
> > >
> > > How do you bootstrap? This should not be used w/o lto+profiledbootstrap and
> > > that seems to work for me...
> > Neither LTO nor profiled
> My tree bootstraps again when I revert
> * cgraphbuild.c (cgraph_rebuild_references): Rebuild only
> * non-speculative
> * cgraph.c (cgraph_update_edge_in_call_site_hash): New
> * function.
> (and also the later patch)
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.