cgraphunit.c (cgraph_finalize_function): Set finalized.
* cgraphunit.c (cgraph_finalize_function): Set finalized. (cgraph_finalize_function): Do not examine inlinablility. (cgraph_finalize_compilation_unit): Do it here. * cgraph.h (cgraph_local_info): Add finalized field. From-SVN: r68803
This commit is contained in:
parent
d1c608553b
commit
f6981e16c3
@ -1,3 +1,10 @@
|
|||||||
|
Wed Jul 2 02:12:51 CEST 2003 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* cgraphunit.c (cgraph_finalize_function): Set finalized.
|
||||||
|
(cgraph_finalize_function): Do not examine inlinablility.
|
||||||
|
(cgraph_finalize_compilation_unit): Do it here.
|
||||||
|
* cgraph.h (cgraph_local_info): Add finalized field.
|
||||||
|
|
||||||
2003-07-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
2003-07-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
||||||
|
|
||||||
* ggc-common.c (gt_pch_save): Cast MAP_FAILED to void *.
|
* ggc-common.c (gt_pch_save): Cast MAP_FAILED to void *.
|
||||||
|
@ -35,6 +35,8 @@ struct cgraph_local_info GTY(())
|
|||||||
/* Set when function can be inlined once (false only for functions calling
|
/* Set when function can be inlined once (false only for functions calling
|
||||||
alloca, using varargs and so on). */
|
alloca, using varargs and so on). */
|
||||||
bool can_inline_once;
|
bool can_inline_once;
|
||||||
|
/* Set once it has been finalized so we consider it to be output. */
|
||||||
|
bool finalized;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Information about the function that needs to be computed globally
|
/* Information about the function that needs to be computed globally
|
||||||
|
@ -54,6 +54,7 @@ cgraph_finalize_function (decl, body)
|
|||||||
struct cgraph_node *node = cgraph_node (decl);
|
struct cgraph_node *node = cgraph_node (decl);
|
||||||
|
|
||||||
node->decl = decl;
|
node->decl = decl;
|
||||||
|
node->local.finalized = true;
|
||||||
|
|
||||||
if (/* Externally visible functions must be output. The exception are
|
if (/* Externally visible functions must be output. The exception are
|
||||||
COMDAT functions that must be output only when they are needed.
|
COMDAT functions that must be output only when they are needed.
|
||||||
@ -74,15 +75,6 @@ cgraph_finalize_function (decl, body)
|
|||||||
cgraph_mark_needed_node (node, 1);
|
cgraph_mark_needed_node (node, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!node->needed && !DECL_COMDAT (node->decl))
|
|
||||||
node->local.can_inline_once = tree_inlinable_function_p (decl, 1);
|
|
||||||
else
|
|
||||||
node->local.can_inline_once = 0;
|
|
||||||
if (flag_inline_trees)
|
|
||||||
node->local.inline_many = tree_inlinable_function_p (decl, 0);
|
|
||||||
else
|
|
||||||
node->local.inline_many = 0;
|
|
||||||
|
|
||||||
(*debug_hooks->deferred_inline_function) (decl);
|
(*debug_hooks->deferred_inline_function) (decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,6 +165,15 @@ cgraph_finalize_compilation_unit ()
|
|||||||
if (lang_hooks.callgraph.lower_function)
|
if (lang_hooks.callgraph.lower_function)
|
||||||
(*lang_hooks.callgraph.lower_function) (decl);
|
(*lang_hooks.callgraph.lower_function) (decl);
|
||||||
|
|
||||||
|
if (!node->needed && !DECL_COMDAT (node->decl))
|
||||||
|
node->local.can_inline_once = tree_inlinable_function_p (decl, 1);
|
||||||
|
else
|
||||||
|
node->local.can_inline_once = 0;
|
||||||
|
if (flag_inline_trees)
|
||||||
|
node->local.inline_many = tree_inlinable_function_p (decl, 0);
|
||||||
|
else
|
||||||
|
node->local.inline_many = 0;
|
||||||
|
|
||||||
/* At the moment frontend automatically emits all nested functions. */
|
/* At the moment frontend automatically emits all nested functions. */
|
||||||
if (node->nested)
|
if (node->nested)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user