This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/63970] gcc-4_9 inlines less funcs than gcc-4_8 because of used_as_abstract_origin flag


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63970

--- Comment #1 from wmi at google dot com ---
> I think we need to keep the functions but do not need to account for them in the unit size if we otherwise could remove them
>
> Richard.

But there is code in symbol_table::remove_unreachable_nodes:

          if (TREE_CODE (node->decl) == FUNCTION_DECL
              && DECL_ABSTRACT_ORIGIN (node->decl))
            {
              struct cgraph_node *origin_node
              = cgraph_node::get_create (DECL_ABSTRACT_ORIGIN (node->decl));
              origin_node->used_as_abstract_origin = true;
              enqueue_node (origin_node, &first, &reachable);
            }

If we remove the check in can_remove_node_now_p_1, the original node will be
removed or reused as clone node in ipa inline analysis, but it will be
recreated in symbol_table::remove_unreachable_nodes after ipa inline analysis
finishes, if only its clone nodes are reachable.

So can we just remove the original node in inline analysis and let
symbol_table::remove_unreachable_nodes to restore it after ipa inline analysis?

Thanks,
Wei.


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