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?
Jason