http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54776
--- Comment #4 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-10-04 15:57:19 UTC --- > I will take a look how LTO can help us. I believe part of the problem should > be fixed by dropping the COMDAT hack for V1 API that is on my TODO list for > this week. The reported numbers above were taken with the COMDAT hack dropped already. I always use this patch: diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index afe4951..71b9d57 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -1308,7 +1308,7 @@ produce_symtab (struct output_block *ob) if (DECL_EXTERNAL (node->symbol.decl)) continue; if (DECL_COMDAT (node->symbol.decl) - && cgraph_comdat_can_be_unshared_p (node)) + && cgraph_comdat_can_be_unshared_p (node) && 0) continue; if ((node->alias && !node->thunk.alias) || node->global.inlined_to) continue; @@ -1327,7 +1327,7 @@ produce_symtab (struct output_block *ob) if (!node->symbol.address_taken && !node->callers) continue; if (DECL_COMDAT (node->symbol.decl) - && cgraph_comdat_can_be_unshared_p (node)) + && cgraph_comdat_can_be_unshared_p (node) && 0) continue; if ((node->alias && !node->thunk.alias) || node->global.inlined_to) continue; @@ -1348,7 +1348,7 @@ produce_symtab (struct output_block *ob) if (DECL_COMDAT (vnode->symbol.decl) && !vnode->symbol.force_output && vnode->finalized - && DECL_VIRTUAL_P (vnode->symbol.decl)) + && DECL_VIRTUAL_P (vnode->symbol.decl) && 0) continue; if (vnode->alias && !vnode->alias_of) continue; @@ -1364,7 +1364,7 @@ produce_symtab (struct output_block *ob) if (DECL_COMDAT (vnode->symbol.decl) && !vnode->symbol.force_output && vnode->finalized - && DECL_VIRTUAL_P (vnode->symbol.decl)) + && DECL_VIRTUAL_P (vnode->symbol.decl) && 0) continue; if (vnode->alias && !vnode->alias_of) continue;