> On 12/13/2013 05:58 AM, Jan Hubicka wrote: > >>+ if (callee->calls_comdat_local) > >>+ to->calls_comdat_local = true; > >>+ else if (to->calls_comdat_local && symtab_comdat_local_p (callee)) > >>+ { > >>+ struct cgraph_edge *se = to->callees; > >>+ for (; se; se = se->next_callee) > >>+ if (se->inline_failed && symtab_comdat_local_p (se->callee)) > >>+ break; > >>+ if (se == NULL) > >>+ to->calls_comdat_local = false; > >>+ } > > > >Actually this is still not quite right - when we have !inline_failed case, > >we need to check if callee calls comdat local. > > >Moreover when we turn comdat_local to false, we need to recompute also > >function it is inlined into. > > I don't see why. If function A calls function B, which calls > comdat-local function C, A can be inlined, so why do we need to > recompute anything for A after we inline C into B?
The situation is whre B is inlined into A and it calls comdat local C. In this case both B and A have the flag set. now we inline C into B and we need to clean up the flag for A, too. This can probably happen when you call the wrapper ctor from the ctor itself? Honza > > Jason