This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I still think this should be
if (!node->process && !TREE_ASM_WRITTEN (*tp))
Once a function (marked to be emitted by cgraph_mark_functions_to_output and thus has its node->process set to 1) has been emitted by cgraph_expand_function, its node->process is then set back to 0 again. So I think testing !node->process might not be correct after cgraph_optimize has run. It catches used functions in my examples as if they were unused.
From what I think I understand from cgraph, there should not be any unused cgraph_node after cgraph_optimize has run. All the non used functions should have been removed from the call graph.
+ if (!cgraph_get_node (*tp) + || !TREE_ASM_WRITTEN (*tp))
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |