Commit b3c3af2f by Steven Bosscher

tree.h (DID_INLINE_FUNC): Remove macro.

2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>

	* tree.h (DID_INLINE_FUNC): Remove macro.
	(DECL_DECLARED_INLINE_P): Move from c-tree.h and cp/cp-tree.h,
	add tree check for FUNCTION_DECL.
	(DECL_ESTIMATED_INSNS): Move from c-common.h and java/java-tree.h.
	(struct tree_decl): Rename inlined_function_flag to
	declared_inline_flag.
	* c-common.h (c_lang_decl): Remove.
	(DECL_ESTIMATED_INSNS): Remove.
	* c-tree.h (struct lang_decl): Don't include c_lang_decl.
	(DECL_DECLARED_INLINE_P): Remove.
	* c-decl.c (grokdeclarator): Update comment.  With -finline-functions,
	do not reset DECL_DECLARED_INLINE_P.  Don't use DID_INLINE_FUNC.
	(finish_function): Make uninlinable a bool.  Fixup call to
	tree_inlinable_function_p() and fix some code style issues.
	* cgraph.h (disgread_inline_limits): Fix spelling: `disregard'.
	* cgraph.c (dump_cgraph): Likewise.
	* cgraphunit.c (cgraph_decide_inlining): Likewise
	(cgraph_finalize_compilation_unit): Likewise.
	Also update call to tree_inlinable_function_p().
	(cgraph_default_inline_p): Don't use DID_INLINE_FUNC.  Instead
	look at DECL_DECLARED_INLINE and reverse logic.
	* print-tree.c (print_node): Likewise.
	* toplev.c (rest_of_handle_inlining): Don't use DID_INLINE_FUNC.
	* tree-inline.h (tree_inlinable_function_p): Make a bool.  Update
	prototype.
	* tree-inline.c (inlinable_function_p): Split up in this function to
	check for basic inlining inhibiting conditions, and new
	limits_allow_inlining() function.  Warn if inlining is impossible
	because the inline candidate calls alloca or uses sjlj exceptions.
	(limits_allow_inlining): this new function to check if the inlining
	limits are satisfied.  Throttle from currfn_max_inline_insns, not from
	MAX_INLINE_INSNS_SINGLE.  The latter only makes sense if
	MAX_INLINE_INSNS_AUTO and MAX_INLINE_INSNS_SINGLE are equal.
	Update prototypes.
	(tree_inlinable_function_p): Make a bool.  Update call to
	inlinable_function_p
	(expand_call_inline): Use limits_allow_inlining() when not in
	unit-at-a-time mode to decide on inlining.  Don't use DID_INLINE_FUNC,
	instead see if the function was declared `inline'.

cp/
	* cp-tree.h (struct lang_decl): Don't include c_lang_decl.
	(DECL_DECLARED_INLINE_P): Remove.
	* decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
	if decl is a FUNCTION_DECL.  This never made sense, but now it is
	required to avoid a tree check failure.
	* decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
	* optimize.c (maybe_clone_body): Likewise.

java/
	* java-tree.h (DECL_ESTIMATED_INSNS): Remove.

From-SVN: r70174
parent 158aa0f7
2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
* tree.h (DID_INLINE_FUNC): Remove macro.
(DECL_DECLARED_INLINE_P): Move from c-tree.h and cp/cp-tree.h,
add tree check for FUNCTION_DECL.
(DECL_ESTIMATED_INSNS): Move from c-common.h and java/java-tree.h.
(struct tree_decl): Rename inlined_function_flag to
declared_inline_flag.
* c-common.h (c_lang_decl): Remove.
(DECL_ESTIMATED_INSNS): Remove.
* c-tree.h (struct lang_decl): Don't include c_lang_decl.
(DECL_DECLARED_INLINE_P): Remove.
* c-decl.c (grokdeclarator): Update comment. With -finline-functions,
do not reset DECL_DECLARED_INLINE_P. Don't use DID_INLINE_FUNC.
(finish_function): Make uninlinable a bool. Fixup call to
tree_inlinable_function_p() and fix some code style issues.
* cgraph.h (disgread_inline_limits): Fix spelling: `disregard'.
* cgraph.c (dump_cgraph): Likewise.
* cgraphunit.c (cgraph_decide_inlining): Likewise
(cgraph_finalize_compilation_unit): Likewise.
Also update call to tree_inlinable_function_p().
(cgraph_default_inline_p): Don't use DID_INLINE_FUNC. Instead
look at DECL_DECLARED_INLINE and reverse logic.
* print-tree.c (print_node): Likewise.
* toplev.c (rest_of_handle_inlining): Don't use DID_INLINE_FUNC.
* tree-inline.h (tree_inlinable_function_p): Make a bool. Update
prototype.
* tree-inline.c (inlinable_function_p): Split up in this function to
check for basic inlining inhibiting conditions, and new
limits_allow_inlining() function. Warn if inlining is impossible
because the inline candidate calls alloca or uses sjlj exceptions.
(limits_allow_inlining): this new function to check if the inlining
limits are satisfied. Throttle from currfn_max_inline_insns, not from
MAX_INLINE_INSNS_SINGLE. The latter only makes sense if
MAX_INLINE_INSNS_AUTO and MAX_INLINE_INSNS_SINGLE are equal.
Update prototypes.
(tree_inlinable_function_p): Make a bool. Update call to
inlinable_function_p
(expand_call_inline): Use limits_allow_inlining() when not in
unit-at-a-time mode to decide on inlining. Don't use DID_INLINE_FUNC,
instead see if the function was declared `inline'.
2003-08-05 Josef Zlomek <zlomekj@suse.cz> 2003-08-05 Josef Zlomek <zlomekj@suse.cz>
* gcse.c (try_replace_reg): Fix updating of note. * gcse.c (try_replace_reg): Fix updating of note.
......
...@@ -346,22 +346,6 @@ extern void shadow_warning (enum sw_kind, const char *, tree); ...@@ -346,22 +346,6 @@ extern void shadow_warning (enum sw_kind, const char *, tree);
extern int field_decl_cmp (const void *, const void *); extern int field_decl_cmp (const void *, const void *);
extern void resort_sorted_fields (void *, void *, gt_pointer_operator, extern void resort_sorted_fields (void *, void *, gt_pointer_operator,
void *); void *);
/* Extra information associated with a DECL. Other C dialects extend
this structure in various ways. The C front-end only uses this
structure for FUNCTION_DECLs; all other DECLs have a NULL
DECL_LANG_SPECIFIC field. */
struct c_lang_decl GTY(()) {
unsigned declared_inline : 1;
};
/* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this is
the approximate number of statements in this function. There is
no need for this number to be exact; it is only used in various
heuristics regarding optimization. */
#define DECL_ESTIMATED_INSNS(NODE) \
(FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
/* Switches common to the C front ends. */ /* Switches common to the C front ends. */
......
...@@ -4319,7 +4319,7 @@ grokdeclarator (tree declarator, tree declspecs, ...@@ -4319,7 +4319,7 @@ grokdeclarator (tree declarator, tree declspecs,
} }
else if (inlinep) else if (inlinep)
{ {
/* Assume that otherwise the function can be inlined. */ /* Record that the function is declared `inline'. */
DECL_DECLARED_INLINE_P (decl) = 1; DECL_DECLARED_INLINE_P (decl) = 1;
/* Do not mark bare declarations as DECL_INLINE. Doing so /* Do not mark bare declarations as DECL_INLINE. Doing so
...@@ -4337,12 +4337,7 @@ grokdeclarator (tree declarator, tree declspecs, ...@@ -4337,12 +4337,7 @@ grokdeclarator (tree declarator, tree declspecs,
two things: let the function be deferred until it is actually two things: let the function be deferred until it is actually
needed, and let dwarf2 know that the function is inlinable. */ needed, and let dwarf2 know that the function is inlinable. */
else if (flag_inline_trees == 2 && initialized) else if (flag_inline_trees == 2 && initialized)
{ DECL_INLINE (decl) = 1;
if (!DECL_INLINE (decl))
DID_INLINE_FUNC (decl) = 1;
DECL_INLINE (decl) = 1;
DECL_DECLARED_INLINE_P (decl) = 0;
}
} }
else else
{ {
...@@ -6157,7 +6152,7 @@ finish_function (int nested, int can_defer_p) ...@@ -6157,7 +6152,7 @@ finish_function (int nested, int can_defer_p)
/* Function is parsed. /* Function is parsed.
Generate RTL for the body of this function or defer Generate RTL for the body of this function or defer
it for later expansion. */ it for later expansion. */
int uninlinable = 1; bool uninlinable = true;
/* There's no reason to do any of the work here if we're only doing /* There's no reason to do any of the work here if we're only doing
semantic analysis; this code just generates RTL. */ semantic analysis; this code just generates RTL. */
...@@ -6174,14 +6169,14 @@ finish_function (int nested, int can_defer_p) ...@@ -6174,14 +6169,14 @@ finish_function (int nested, int can_defer_p)
predicates depend on cfun and current_function_decl to predicates depend on cfun and current_function_decl to
function completely. */ function completely. */
timevar_push (TV_INTEGRATION); timevar_push (TV_INTEGRATION);
uninlinable = ! tree_inlinable_function_p (fndecl, 0); uninlinable = !tree_inlinable_function_p (fndecl);
if (can_defer_p if (can_defer_p
/* We defer functions marked inline *even if* the function /* We defer functions marked inline *even if* the function
itself is not inlinable. This is because we don't yet itself is not inlinable. This is because we don't yet
know if the function will actually be used; we may be know if the function will actually be used; we may be
able to avoid emitting it entirely. */ able to avoid emitting it entirely. */
&& (! uninlinable || DECL_DECLARED_INLINE_P (fndecl)) && (!uninlinable || DECL_DECLARED_INLINE_P (fndecl))
/* Save function tree for inlining. Should return 0 if the /* Save function tree for inlining. Should return 0 if the
language does not support function deferring or the language does not support function deferring or the
function could not be deferred. */ function could not be deferred. */
......
...@@ -58,7 +58,6 @@ union lang_tree_node ...@@ -58,7 +58,6 @@ union lang_tree_node
struct lang_decl GTY(()) struct lang_decl GTY(())
{ {
struct c_lang_decl base;
/* The return types and parameter types may have variable size. /* The return types and parameter types may have variable size.
This is a list of any SAVE_EXPRs that need to be evaluated to This is a list of any SAVE_EXPRs that need to be evaluated to
compute those sizes. */ compute those sizes. */
...@@ -100,12 +99,6 @@ struct lang_decl GTY(()) ...@@ -100,12 +99,6 @@ struct lang_decl GTY(())
and C_RID_YYCODE is the token number wanted by Yacc. */ and C_RID_YYCODE is the token number wanted by Yacc. */
#define C_IS_RESERVED_WORD(ID) TREE_LANG_FLAG_0 (ID) #define C_IS_RESERVED_WORD(ID) TREE_LANG_FLAG_0 (ID)
/* This function was declared inline. This flag controls the linkage
semantics of 'inline'; whether or not the function is inlined is
controlled by DECL_INLINE. */
#define DECL_DECLARED_INLINE_P(NODE) \
(DECL_LANG_SPECIFIC (NODE)->base.declared_inline)
/* In a RECORD_TYPE, a sorted array of the fields of the type. */ /* In a RECORD_TYPE, a sorted array of the fields of the type. */
struct lang_type GTY(()) struct lang_type GTY(())
{ {
......
...@@ -353,7 +353,7 @@ dump_cgraph (FILE *f) ...@@ -353,7 +353,7 @@ dump_cgraph (FILE *f)
if (DECL_SAVED_TREE (node->decl)) if (DECL_SAVED_TREE (node->decl))
fprintf (f, " tree"); fprintf (f, " tree");
if (node->local.disgread_inline_limits) if (node->local.disregard_inline_limits)
fprintf (f, " always_inline"); fprintf (f, " always_inline");
else if (node->local.inlinable) else if (node->local.inlinable)
fprintf (f, " inlinable"); fprintf (f, " inlinable");
......
...@@ -33,10 +33,10 @@ struct cgraph_local_info GTY(()) ...@@ -33,10 +33,10 @@ struct cgraph_local_info GTY(())
/* Set once it has been finalized so we consider it to be output. */ /* Set once it has been finalized so we consider it to be output. */
bool finalized; bool finalized;
/* False when there is something making inlining impossible (such as va_arg) */ /* False when there something makes inlining impossible (such as va_arg). */
bool inlinable; bool inlinable;
/* True when function should be inlined independently on it's size. */ /* True when function should be inlined independently on it's size. */
bool disgread_inline_limits; bool disregard_inline_limits;
/* Size of the function before inlining. */ /* Size of the function before inlining. */
int self_insns; int self_insns;
}; };
......
...@@ -189,12 +189,12 @@ cgraph_finalize_compilation_unit (void) ...@@ -189,12 +189,12 @@ cgraph_finalize_compilation_unit (void)
/* First kill forward declaration so reverse inlining works properly. */ /* First kill forward declaration so reverse inlining works properly. */
cgraph_create_edges (decl, DECL_SAVED_TREE (decl)); cgraph_create_edges (decl, DECL_SAVED_TREE (decl));
node->local.inlinable = tree_inlinable_function_p (decl, 1); node->local.inlinable = tree_inlinable_function_p (decl);
DECL_ESTIMATED_INSNS (decl) DECL_ESTIMATED_INSNS (decl)
= (*lang_hooks.tree_inlining.estimate_num_insns) (decl); = (*lang_hooks.tree_inlining.estimate_num_insns) (decl);
node->local.self_insns = DECL_ESTIMATED_INSNS (decl); node->local.self_insns = DECL_ESTIMATED_INSNS (decl);
if (node->local.inlinable) if (node->local.inlinable)
node->local.disgread_inline_limits node->local.disregard_inline_limits
= (*lang_hooks.tree_inlining.disregard_inline_limits) (decl); = (*lang_hooks.tree_inlining.disregard_inline_limits) (decl);
for (edge = node->callees; edge; edge = edge->next_callee) for (edge = node->callees; edge; edge = edge->next_callee)
...@@ -321,7 +321,7 @@ cgraph_postorder (struct cgraph_node **order) ...@@ -321,7 +321,7 @@ cgraph_postorder (struct cgraph_node **order)
struct cgraph_edge *edge, last; struct cgraph_edge *edge, last;
struct cgraph_node **stack = struct cgraph_node **stack =
xcalloc (sizeof (struct cgraph_node *), cgraph_n_nodes); xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
/* We have to deal with cycles nicely, so use a depth first traversal /* We have to deal with cycles nicely, so use a depth first traversal
output algorithm. Ignore the fact that some functions won't need output algorithm. Ignore the fact that some functions won't need
...@@ -735,10 +735,10 @@ cgraph_default_inline_p (struct cgraph_node *n) ...@@ -735,10 +735,10 @@ cgraph_default_inline_p (struct cgraph_node *n)
{ {
if (!DECL_INLINE (n->decl) || !DECL_SAVED_TREE (n->decl)) if (!DECL_INLINE (n->decl) || !DECL_SAVED_TREE (n->decl))
return false; return false;
if (DID_INLINE_FUNC (n->decl)) if (DECL_DECLARED_INLINE_P (n->decl))
return n->global.insns < MAX_INLINE_INSNS_AUTO;
else
return n->global.insns < MAX_INLINE_INSNS_SINGLE; return n->global.insns < MAX_INLINE_INSNS_SINGLE;
else
return n->global.insns < MAX_INLINE_INSNS_AUTO;
} }
/* We use greedy algorithm for inlining of small functions: /* We use greedy algorithm for inlining of small functions:
...@@ -756,7 +756,7 @@ cgraph_decide_inlining_of_small_functions (struct cgraph_node **inlined, ...@@ -756,7 +756,7 @@ cgraph_decide_inlining_of_small_functions (struct cgraph_node **inlined,
struct cgraph_node *node; struct cgraph_node *node;
fibheap_t heap = fibheap_new (); fibheap_t heap = fibheap_new ();
struct fibnode **heap_node = struct fibnode **heap_node =
xcalloc (sizeof (struct fibnode *), cgraph_max_uid); xcalloc (cgraph_max_uid, sizeof (struct fibnode *));
int ninlined, ninlined_callees; int ninlined, ninlined_callees;
int max_insns = ((HOST_WIDEST_INT) initial_insns int max_insns = ((HOST_WIDEST_INT) initial_insns
* (100 + PARAM_VALUE (PARAM_INLINE_UNIT_GROWTH)) / 100); * (100 + PARAM_VALUE (PARAM_INLINE_UNIT_GROWTH)) / 100);
...@@ -873,11 +873,11 @@ cgraph_decide_inlining (void) ...@@ -873,11 +873,11 @@ cgraph_decide_inlining (void)
struct cgraph_node *node; struct cgraph_node *node;
int nnodes; int nnodes;
struct cgraph_node **order = struct cgraph_node **order =
xcalloc (sizeof (struct cgraph_node *), cgraph_n_nodes); xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
struct cgraph_node **inlined = struct cgraph_node **inlined =
xcalloc (sizeof (struct cgraph_node *), cgraph_n_nodes); xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
struct cgraph_node **inlined_callees = struct cgraph_node **inlined_callees =
xcalloc (sizeof (struct cgraph_node *), cgraph_n_nodes); xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
int ninlined; int ninlined;
int ninlined_callees; int ninlined_callees;
int i, y; int i, y;
...@@ -917,7 +917,7 @@ cgraph_decide_inlining (void) ...@@ -917,7 +917,7 @@ cgraph_decide_inlining (void)
node = order[i]; node = order[i];
for (e = node->callees; e; e = e->next_callee) for (e = node->callees; e; e = e->next_callee)
if (e->callee->local.disgread_inline_limits) if (e->callee->local.disregard_inline_limits)
break; break;
if (!e) if (!e)
continue; continue;
...@@ -928,7 +928,7 @@ cgraph_decide_inlining (void) ...@@ -928,7 +928,7 @@ cgraph_decide_inlining (void)
ninlined = cgraph_inlined_into (order[i], inlined); ninlined = cgraph_inlined_into (order[i], inlined);
for (; e; e = e->next_callee) for (; e; e = e->next_callee)
{ {
if (e->inline_call || !e->callee->local.disgread_inline_limits) if (e->inline_call || !e->callee->local.disregard_inline_limits)
continue; continue;
if (e->callee->output || e->callee == node) if (e->callee->output || e->callee == node)
continue; continue;
...@@ -1038,7 +1038,7 @@ cgraph_expand_functions (void) ...@@ -1038,7 +1038,7 @@ cgraph_expand_functions (void)
{ {
struct cgraph_node *node; struct cgraph_node *node;
struct cgraph_node **order = struct cgraph_node **order =
xcalloc (sizeof (struct cgraph_node *), cgraph_n_nodes); xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
int order_pos = 0; int order_pos = 0;
int i; int i;
......
2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
* cp-tree.h (struct lang_decl): Don't include c_lang_decl.
(DECL_DECLARED_INLINE_P): Remove.
* decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
if decl is a FUNCTION_DECL. This never made sense, but now it is
required to avoid a tree check failure.
* decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
* optimize.c (maybe_clone_body): Likewise.
2003-08-04 Roger Sayle <roger@eyesopen.com> 2003-08-04 Roger Sayle <roger@eyesopen.com>
* decl.c (cxx_insert_default_attributes): Delete. * decl.c (cxx_insert_default_attributes): Delete.
......
...@@ -1637,8 +1637,6 @@ struct lang_type GTY(()) ...@@ -1637,8 +1637,6 @@ struct lang_type GTY(())
struct lang_decl_flags GTY(()) struct lang_decl_flags GTY(())
{ {
struct c_lang_decl base;
ENUM_BITFIELD(languages) language : 8; ENUM_BITFIELD(languages) language : 8;
unsigned operator_attr : 1; unsigned operator_attr : 1;
...@@ -2849,12 +2847,6 @@ struct lang_decl GTY(()) ...@@ -2849,12 +2847,6 @@ struct lang_decl GTY(())
/* We know what we're doing with this decl now. */ /* We know what we're doing with this decl now. */
#define DECL_INTERFACE_KNOWN(NODE) DECL_LANG_FLAG_5 (NODE) #define DECL_INTERFACE_KNOWN(NODE) DECL_LANG_FLAG_5 (NODE)
/* This function was declared inline. This flag controls the linkage
semantics of 'inline'; whether or not the function is inlined is
controlled by DECL_INLINE. */
#define DECL_DECLARED_INLINE_P(NODE) \
(DECL_LANG_SPECIFIC (NODE)->decl_flags.base.declared_inline)
/* DECL_EXTERNAL must be set on a decl until the decl is actually emitted, /* DECL_EXTERNAL must be set on a decl until the decl is actually emitted,
so that assemble_external will work properly. So we have this flag to so that assemble_external will work properly. So we have this flag to
tell us whether the decl is really not external. */ tell us whether the decl is really not external. */
......
...@@ -8885,19 +8885,14 @@ grokfndecl (tree ctype, ...@@ -8885,19 +8885,14 @@ grokfndecl (tree ctype,
DECL_NOT_REALLY_EXTERN (decl) = 1; DECL_NOT_REALLY_EXTERN (decl) = 1;
} }
DID_INLINE_FUNC (decl) = 0;
/* If the declaration was declared inline, mark it as such. */ /* If the declaration was declared inline, mark it as such. */
if (inlinep) if (inlinep)
DECL_DECLARED_INLINE_P (decl) = 1; DECL_DECLARED_INLINE_P (decl) = 1;
/* We inline functions that are explicitly declared inline, or, when /* We inline functions that are explicitly declared inline, or, when
the user explicitly asks us to, all functions. */ the user explicitly asks us to, all functions. */
if (DECL_DECLARED_INLINE_P (decl)) if (DECL_DECLARED_INLINE_P (decl)
|| (flag_inline_trees == 2 && !DECL_INLINE (decl) && funcdef_flag))
DECL_INLINE (decl) = 1; DECL_INLINE (decl) = 1;
if (flag_inline_trees == 2 && !DECL_INLINE (decl) && funcdef_flag)
{
DID_INLINE_FUNC (decl) = 1;
DECL_INLINE (decl) = 1;
}
DECL_EXTERNAL (decl) = 1; DECL_EXTERNAL (decl) = 1;
if (quals != NULL_TREE && TREE_CODE (type) == FUNCTION_TYPE) if (quals != NULL_TREE && TREE_CODE (type) == FUNCTION_TYPE)
...@@ -14248,8 +14243,6 @@ start_method (tree declspecs, tree declarator, tree attrlist) ...@@ -14248,8 +14243,6 @@ start_method (tree declspecs, tree declarator, tree attrlist)
check_template_shadow (fndecl); check_template_shadow (fndecl);
DECL_DECLARED_INLINE_P (fndecl) = 1; DECL_DECLARED_INLINE_P (fndecl) = 1;
DID_INLINE_FUNC (fndecl) = 0;
if (flag_default_inline) if (flag_default_inline)
DECL_INLINE (fndecl) = 1; DECL_INLINE (fndecl) = 1;
......
...@@ -1743,7 +1743,8 @@ import_export_decl (tree decl) ...@@ -1743,7 +1743,8 @@ import_export_decl (tree decl)
if ((DECL_IMPLICIT_INSTANTIATION (decl) if ((DECL_IMPLICIT_INSTANTIATION (decl)
|| DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION (decl)) || DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION (decl))
&& (flag_implicit_templates && (flag_implicit_templates
|| (flag_implicit_inline_templates || (flag_implicit_inline_templates
&& TREE_CODE (decl) == FUNCTION_DECL
&& DECL_DECLARED_INLINE_P (decl)))) && DECL_DECLARED_INLINE_P (decl))))
{ {
if (!TREE_PUBLIC (decl)) if (!TREE_PUBLIC (decl))
......
...@@ -159,7 +159,6 @@ maybe_clone_body (tree fn) ...@@ -159,7 +159,6 @@ maybe_clone_body (tree fn)
/* Update CLONE's source position information to match FN's. */ /* Update CLONE's source position information to match FN's. */
DECL_SOURCE_LOCATION (clone) = DECL_SOURCE_LOCATION (fn); DECL_SOURCE_LOCATION (clone) = DECL_SOURCE_LOCATION (fn);
DECL_INLINE (clone) = DECL_INLINE (fn); DECL_INLINE (clone) = DECL_INLINE (fn);
DID_INLINE_FUNC (clone) = DID_INLINE_FUNC (fn);
DECL_DECLARED_INLINE_P (clone) = DECL_DECLARED_INLINE_P (fn); DECL_DECLARED_INLINE_P (clone) = DECL_DECLARED_INLINE_P (fn);
DECL_COMDAT (clone) = DECL_COMDAT (fn); DECL_COMDAT (clone) = DECL_COMDAT (fn);
DECL_WEAK (clone) = DECL_WEAK (fn); DECL_WEAK (clone) = DECL_WEAK (fn);
......
2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
* java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
2003-08-03 Tom Tromey <tromey@redhat.com> 2003-08-03 Tom Tromey <tromey@redhat.com>
* java-tree.h (METHOD_TRANSIENT): Removed. * java-tree.h (METHOD_TRANSIENT): Removed.
......
...@@ -906,12 +906,6 @@ union lang_tree_node ...@@ -906,12 +906,6 @@ union lang_tree_node
/* The original WFL of a final variable. */ /* The original WFL of a final variable. */
#define DECL_FIELD_FINAL_WFL(NODE) \ #define DECL_FIELD_FINAL_WFL(NODE) \
(DECL_LANG_SPECIFIC(NODE)->u.v.wfl) (DECL_LANG_SPECIFIC(NODE)->u.v.wfl)
/* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this is
the approximate number of instructions in this function. There is
no need for this number to be exact; it is only used in various
heuristics regarding optimization. */
#define DECL_ESTIMATED_INSNS(NODE) \
(FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
/* True if NODE is a local variable final. */ /* True if NODE is a local variable final. */
#define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE)) #define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE))
/* True if NODE is a final field. */ /* True if NODE is a final field. */
......
...@@ -317,10 +317,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent) ...@@ -317,10 +317,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
if (TREE_CODE (node) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node)) if (TREE_CODE (node) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node))
fputs (" suppress-debug", file); fputs (" suppress-debug", file);
if (TREE_CODE (node) == FUNCTION_DECL && DID_INLINE_FUNC (node)) if (TREE_CODE (node) == FUNCTION_DECL && DECL_INLINE (node))
fputs (" autoinline", file); fputs (DECL_DECLARED_INLINE_P (node) ? " inline" : " autoinline", file);
else if (TREE_CODE (node) == FUNCTION_DECL && DECL_INLINE (node))
fputs (" inline", file);
if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node)) if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node))
fputs (" built-in", file); fputs (" built-in", file);
if (TREE_CODE (node) == FUNCTION_DECL && DECL_NO_STATIC_CHAIN (node)) if (TREE_CODE (node) == FUNCTION_DECL && DECL_NO_STATIC_CHAIN (node))
......
...@@ -2532,16 +2532,8 @@ rest_of_handle_inlining (tree decl) ...@@ -2532,16 +2532,8 @@ rest_of_handle_inlining (tree decl)
return true; return true;
} }
} }
else { else
/* ??? Note that we used to just make it look like if
the "inline" keyword was specified when we decide
to inline it (because of -finline-functions).
garloff@suse.de, 2002-04-24: Add another flag to
actually record this piece of information. */
if (!DECL_INLINE (decl))
DID_INLINE_FUNC (decl) = 1;
inlinable = DECL_INLINE (decl) = 1; inlinable = DECL_INLINE (decl) = 1;
}
} }
insns = get_insns (); insns = get_insns ();
......
...@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
/* Function prototypes. */ /* Function prototypes. */
void optimize_inline_calls (tree); void optimize_inline_calls (tree);
int tree_inlinable_function_p (tree, int); bool tree_inlinable_function_p (tree);
tree walk_tree (tree*, walk_tree_fn, void*, void*); tree walk_tree (tree*, walk_tree_fn, void*, void*);
tree walk_tree_without_duplicates (tree*, walk_tree_fn, void*); tree walk_tree_without_duplicates (tree*, walk_tree_fn, void*);
tree copy_tree_r (tree*, int*, void*); tree copy_tree_r (tree*, int*, void*);
......
...@@ -1473,10 +1473,12 @@ struct tree_type GTY(()) ...@@ -1473,10 +1473,12 @@ struct tree_type GTY(())
where it is called. */ where it is called. */
#define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inline_flag) #define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inline_flag)
/* Nonzero in a FUNCTION_DECL means this function has been found inlinable /* Nonzero in a FUNCTION_DECL means that this function was declared inline,
only by virtue of -finline-functions */ such as via the `inline' keyword in C/C++. This flag controls the linkage
#define DID_INLINE_FUNC(NODE) \ semantics of 'inline'; whether or not the function is inlined is
(FUNCTION_DECL_CHECK (NODE)->decl.inlined_function_flag) controlled by DECL_INLINE. */
#define DECL_DECLARED_INLINE_P(NODE) \
(FUNCTION_DECL_CHECK (NODE)->decl.declared_inline_flag)
/* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */ /* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */
#define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.uninlinable) #define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.uninlinable)
...@@ -1606,6 +1608,13 @@ struct tree_type GTY(()) ...@@ -1606,6 +1608,13 @@ struct tree_type GTY(())
#define DECL_POINTER_ALIAS_SET_KNOWN_P(NODE) \ #define DECL_POINTER_ALIAS_SET_KNOWN_P(NODE) \
(DECL_POINTER_ALIAS_SET (NODE) != - 1) (DECL_POINTER_ALIAS_SET (NODE) != - 1)
/* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this is
the approximate number of statements in this function. There is
no need for this number to be exact; it is only used in various
heuristics regarding optimization. */
#define DECL_ESTIMATED_INSNS(NODE) \
(FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
struct function; struct function;
struct tree_decl GTY(()) struct tree_decl GTY(())
...@@ -1646,7 +1655,7 @@ struct tree_decl GTY(()) ...@@ -1646,7 +1655,7 @@ struct tree_decl GTY(())
unsigned user_align : 1; unsigned user_align : 1;
unsigned uninlinable : 1; unsigned uninlinable : 1;
unsigned thread_local_flag : 1; unsigned thread_local_flag : 1;
unsigned inlined_function_flag : 1; unsigned declared_inline_flag : 1;
unsigned unused : 3; unsigned unused : 3;
/* three unused bits. */ /* three unused bits. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment