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]

Re: [RFA] Emit DWARF for template parameters (PR debug/30161)


On 08/23/2009 12:44 PM, Dodji Seketeli wrote:
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.

Yes, that's why we also check TREE_ASM_WRITTEN; after cgraph_expand_function, TREE_ASM_WRITTEN is set.


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.

That might work too, but I'd want Jan Hubicka to sign off on it.


+      if (!cgraph_get_node (*tp)
+	  || !TREE_ASM_WRITTEN (*tp))

|| is wrong here, even if just checking for a cgraph node is ok.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]