aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-27 02:17:48 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-27 02:17:48 +0000
commit1f1fa73c1ad0871e076e13f914a555fb91d09f19 (patch)
tree948316451d83b15b776dfaed5ddc3be0ef0528cf
parent95ed21b8d3c6ada80e21893c08f8713621c589c3 (diff)
* c-common.h (DECL_NUM_STMTS): New macro.
* c-decl.c (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE. (pushdecl): Likewise. * c-semantics.c (add_stmt): Update DECL_NUM_STMTS. * integrate.c (expand_inline_function): Don't check DECL_FRAME_SIZE. * print-tree.c (print_node): Don't print it. * toplev.c (rest_of_compilation): Don't try to inline when flag_no_inline is on. * tree.h (DECL_FRAME_SIZE): Remove. (tree_decl): Adjust accordingly. * Makefile.in (optimize.o): Depend on params.h. (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE. (init_decl_processing): Set flag_no_inline when doing inlining-on-trees. * optimize.c: Include params.h. (struct inline_data): Improve documentation of FNS. Add FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P. (INSNS_PER_STMT): New macro. (remap_block): Use CLONING_P. (inlinable_function_p): Don't inline big functions. (expand_call_inline): Keep track of how much inlining we've done. (optimize_function): Set FIRST_INLINED_FN. (maybe_clone_body): Set CLONING_P. * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in tree nodes. (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling rest_of_compilation. Clear DECL_RTL for local variables afterwards. (clear_decl_rtl): New function. * com.c (duplicate_decls): Don't copy DECL_FRAME_SIZE. * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40859 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog15
-rw-r--r--gcc/c-common.h7
-rw-r--r--gcc/c-decl.c4
-rw-r--r--gcc/c-semantics.c5
-rw-r--r--gcc/cp/ChangeLog22
-rw-r--r--gcc/cp/Make-lang.in2
-rw-r--r--gcc/cp/decl.c7
-rw-r--r--gcc/cp/optimize.c55
-rw-r--r--gcc/cp/semantics.c57
-rw-r--r--gcc/f/ChangeLog4
-rw-r--r--gcc/f/com.c2
-rw-r--r--gcc/integrate.c3
-rw-r--r--gcc/java/ChangeLog4
-rw-r--r--gcc/java/parse.h2
-rw-r--r--gcc/print-tree.c5
-rw-r--r--gcc/toplev.c3
-rw-r--r--gcc/tree.h14
17 files changed, 171 insertions, 40 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 200f0426559..645be42d376 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,18 @@
+2001-03-26 Mark Mitchell <mark@codesourcery.com>
+
+ * c-common.h (DECL_NUM_STMTS): New macro.
+ * c-decl.c (duplicate_decls): Copy DECL_NUM_STMTS, not
+ DECL_FRAME_SIZE.
+ (pushdecl): Likewise.
+ * c-semantics.c (add_stmt): Update DECL_NUM_STMTS.
+ * integrate.c (expand_inline_function): Don't check
+ DECL_FRAME_SIZE.
+ * print-tree.c (print_node): Don't print it.
+ * toplev.c (rest_of_compilation): Don't try to inline when
+ flag_no_inline is on.
+ * tree.h (DECL_FRAME_SIZE): Remove.
+ (tree_decl): Adjust accordingly.
+
2001-03-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* combine.c (try_combine): Use memcpy, not bcopy.
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 22f743ba18a..acc23e499f0 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -337,6 +337,13 @@ struct c_lang_decl {
(((struct c_lang_decl *) DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE))) \
->saved_tree)
+/* 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_NUM_STMTS(NODE) \
+ (FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
+
extern void c_mark_lang_decl PARAMS ((struct c_lang_decl *));
/* The variant of the C language being processed. Each C language
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 1d517254997..941083236b2 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2009,7 +2009,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
}
/* Also preserve various other info from the definition. */
else if (! new_is_definition)
- DECL_FRAME_SIZE (newdecl) = DECL_FRAME_SIZE (olddecl);
+ DECL_NUM_STMTS (newdecl) = DECL_NUM_STMTS (olddecl);
if (! new_is_definition)
{
DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
@@ -2372,7 +2372,7 @@ pushdecl (x)
DECL_INITIAL (x) = (current_function_decl == oldglobal
? 0 : DECL_INITIAL (oldglobal));
DECL_SAVED_INSNS (x) = DECL_SAVED_INSNS (oldglobal);
- DECL_FRAME_SIZE (x) = DECL_FRAME_SIZE (oldglobal);
+ DECL_NUM_STMTS (x) = DECL_NUM_STMTS (oldglobal);
DECL_ARGUMENTS (x) = DECL_ARGUMENTS (oldglobal);
DECL_RESULT (x) = DECL_RESULT (oldglobal);
TREE_ASM_WRITTEN (x) = TREE_ASM_WRITTEN (oldglobal);
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index 1c493e7bc6d..6f2ca2c9cfc 100644
--- a/gcc/c-semantics.c
+++ b/gcc/c-semantics.c
@@ -75,6 +75,11 @@ add_stmt (t)
/* When we expand a statement-tree, we must know whether or not the
statements are full-expresions. We record that fact here. */
STMT_IS_FULL_EXPR_P (last_tree) = stmts_are_full_exprs_p ();
+
+ /* Keep track of the number of statements in this function. */
+ if (current_function_decl)
+ ++DECL_NUM_STMTS (current_function_decl);
+
return t;
}
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3b89a973e06..cdf1637c61d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,25 @@
+2001-03-26 Mark Mitchell <mark@codesourcery.com>
+
+ * Makefile.in (optimize.o): Depend on params.h.
+ (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
+ (init_decl_processing): Set flag_no_inline when doing
+ inlining-on-trees.
+ * optimize.c: Include params.h.
+ (struct inline_data): Improve documentation of FNS. Add
+ FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
+ (INSNS_PER_STMT): New macro.
+ (remap_block): Use CLONING_P.
+ (inlinable_function_p): Don't inline big functions.
+ (expand_call_inline): Keep track of how much inlining we've done.
+ (optimize_function): Set FIRST_INLINED_FN.
+ (maybe_clone_body): Set CLONING_P.
+ * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
+ tree nodes.
+ (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
+ rest_of_compilation. Clear DECL_RTL for local variables
+ afterwards.
+ (clear_decl_rtl): New function.
+
2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
Implement DR 209
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index 67789446278..d9685335688 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -297,7 +297,7 @@ cp/semantics.o: cp/semantics.c $(CXX_TREE_H) cp/lex.h except.h toplev.h \
flags.h $(GGC_H) output.h $(RTL_H) $(TIMEVAR_H)
cp/dump.o: cp/dump.c $(CXX_TREE_H) c-dump.h
cp/optimize.o: cp/optimize.c $(CXX_TREE_H) rtl.h integrate.h insn-config.h \
- input.h
+ input.h params.h
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) toplev.h
cp/parse.o: cp/parse.c $(CXX_TREE_H) flags.h cp/lex.h except.h output.h \
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 03f94a35fa1..92ee8edb7ac 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3692,7 +3692,7 @@ duplicate_decls (newdecl, olddecl)
SET_DECL_RTL (newdecl, DECL_RTL (olddecl));
}
else
- DECL_FRAME_SIZE (newdecl) = DECL_FRAME_SIZE (olddecl);
+ DECL_NUM_STMTS (newdecl) = DECL_NUM_STMTS (olddecl);
DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
if ((DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl)))
@@ -6346,7 +6346,10 @@ init_decl_processing ()
if (! flag_permissive && ! pedantic)
flag_pedantic_errors = 1;
if (!flag_no_inline)
- flag_inline_trees = 1;
+ {
+ flag_inline_trees = 1;
+ flag_no_inline = 1;
+ }
/* Initially, C. */
current_lang_name = lang_name_c;
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index d350fdaaeed..f7f957509c2 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -30,6 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "toplev.h"
#include "varray.h"
#include "ggc.h"
+#include "params.h"
/* To Do:
@@ -50,8 +51,13 @@ typedef struct inline_data
/* A stack of the functions we are inlining. For example, if we are
compiling `f', which calls `g', which calls `h', and we are
inlining the body of `h', the stack will contain, `h', followed
- by `g', followed by `f'. */
+ by `g', followed by `f'. The first few elements of the stack may
+ contain other functions that we know we should not recurse into,
+ even though they are not directly being inlined. */
varray_type fns;
+ /* The index of the first element of FNS that really represents an
+ inlined function. */
+ unsigned first_inlined_fn;
/* The label to jump to when a return statement is encountered. If
this value is NULL, then return statements will simply be
remapped as return statements, rather than as jumps. */
@@ -66,6 +72,14 @@ typedef struct inline_data
varray_type target_exprs;
/* A list of the functions current function has inlined. */
varray_type inlined_fns;
+ /* The approximate number of statements we have inlined in the
+ current call stack. */
+ int inlined_stmts;
+ /* We use the same mechanism to build clones that we do to perform
+ inlining. However, there are a few places where we need to
+ distinguish between those two situations. This flag is true nif
+ we are cloning, rather than inlining. */
+ bool cloning_p;
} inline_data;
/* Prototypes. */
@@ -82,6 +96,11 @@ static void remap_block PARAMS ((tree, tree, inline_data *));
static void copy_scope_stmt PARAMS ((tree *, int *, inline_data *));
static tree calls_setjmp_r PARAMS ((tree *, int *, void *));
+/* The approximate number of instructions per statement. This number
+ need not be particularly accurate; it is used only to make
+ decisions about when a function is too big to inline. */
+#define INSNS_PER_STMT (10)
+
/* Remap DECL during the copying of the BLOCK tree for the function.
DATA is really an `inline_data *'. */
@@ -199,9 +218,10 @@ remap_block (scope_stmt, decls, id)
/* We put the BLOCK_VARS in reverse order; fix that now. */
BLOCK_VARS (new_block) = nreverse (BLOCK_VARS (new_block));
fn = VARRAY_TREE (id->fns, 0);
- if (fn == current_function_decl)
- /* We're building a clone; DECL_INITIAL is still error_mark_node, and
- current_binding_level is the parm binding level. */
+ if (id->cloning_p)
+ /* We're building a clone; DECL_INITIAL is still
+ error_mark_node, and current_binding_level is the parm
+ binding level. */
insert_block (new_block);
else
{
@@ -583,6 +603,9 @@ inlinable_function_p (fn, id)
/* We can't inline varargs functions. */
else if (varargs_function_p (fn))
;
+ /* We can't inline functions that are too big. */
+ else if (DECL_NUM_STMTS (fn) * INSNS_PER_STMT > MAX_INLINE_INSNS)
+ ;
/* All is well. We can inline this function. Traditionally, GCC
has refused to inline functions using alloca, or functions whose
values are returned in a PARALLEL, and a few other such obscure
@@ -593,6 +616,13 @@ inlinable_function_p (fn, id)
/* Squirrel away the result so that we don't have to check again. */
DECL_UNINLINABLE (fn) = !inlinable;
+ /* Even if this function is not itself too big to inline, it might
+ be that we've done so much inlining already that we don't want to
+ risk inlining any more. */
+ if ((DECL_NUM_STMTS (fn) + id->inlined_stmts) * INSNS_PER_STMT
+ > MAX_INLINE_INSNS)
+ inlinable = 0;
+
/* We can inline a template instantiation only if it's fully
instantiated. */
if (inlinable
@@ -830,10 +860,19 @@ expand_call_inline (tp, walk_subtrees, data)
the equivalent inlined version either. */
TREE_USED (*tp) = 1;
+ /* Our function now has more statements than it did before. */
+ DECL_NUM_STMTS (VARRAY_TREE (id->fns, 0)) += DECL_NUM_STMTS (fn);
+ id->inlined_stmts += DECL_NUM_STMTS (VARRAY_TREE (id->fns, 0));
+
/* Recurse into the body of the just inlined function. */
expand_calls_inline (inlined_body, id);
VARRAY_POP (id->fns);
+ /* If we've returned to the top level, clear out the record of how
+ much inlining has been done. */
+ if (VARRAY_ACTIVE_SIZE (id->fns) == id->first_inlined_fn)
+ id->inlined_stmts = 0;
+
/* Don't walk into subtrees. We've already handled them above. */
*walk_subtrees = 0;
@@ -904,6 +943,10 @@ optimize_function (fn)
/* Create the list of functions this call will inline. */
VARRAY_TREE_INIT (id.inlined_fns, 32, "inlined_fns");
+ /* Keep track of the low-water mark, i.e., the point where
+ the first real inlining is represented in ID.FNS. */
+ id.first_inlined_fn = VARRAY_ACTIVE_SIZE (id.fns);
+
/* Replace all calls to inline functions with the bodies of those
functions. */
expand_calls_inline (&DECL_SAVED_TREE (fn), &id);
@@ -1011,6 +1054,10 @@ maybe_clone_body (fn)
VARRAY_PUSH_TREE (id.fns, clone);
VARRAY_PUSH_TREE (id.fns, fn);
+ /* Cloning is treated slightly differently from inlining. Set
+ CLONING_P so that its clear which operation we're performing. */
+ id.cloning_p = true;
+
/* Remap the parameters. */
id.decl_map = splay_tree_new (splay_tree_compare_pointers,
NULL, NULL);
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index c99a0db4e70..5406b3e3bd0 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -59,6 +59,7 @@ static void genrtl_named_return_value PARAMS ((void));
static void cp_expand_stmt PARAMS ((tree));
static void genrtl_start_function PARAMS ((tree));
static void genrtl_finish_function PARAMS ((tree));
+static tree clear_decl_rtl PARAMS ((tree *, int *, void *));
/* Finish processing the COND, the SUBSTMT condition for STMT. */
@@ -2241,7 +2242,6 @@ simplify_aggr_init_exprs_r (tp, walk_subtrees, data)
tree args;
tree slot;
tree type;
- tree call_type;
int copy_from_buffer_p;
aggr_init_expr = *tp;
@@ -2264,17 +2264,20 @@ simplify_aggr_init_exprs_r (tp, walk_subtrees, data)
args = TREE_OPERAND (aggr_init_expr, 1);
slot = TREE_OPERAND (aggr_init_expr, 2);
type = TREE_TYPE (aggr_init_expr);
- call_type = type;
if (AGGR_INIT_VIA_CTOR_P (aggr_init_expr))
{
/* Replace the first argument with the address of the third
argument to the AGGR_INIT_EXPR. */
- call_type = build_pointer_type (type);
mark_addressable (slot);
- args = tree_cons (NULL_TREE, build1 (ADDR_EXPR, call_type, slot),
+ args = tree_cons (NULL_TREE,
+ build1 (ADDR_EXPR,
+ build_pointer_type (TREE_TYPE (slot)),
+ slot),
TREE_CHAIN (args));
}
- call_expr = build (CALL_EXPR, call_type, fn, args, NULL_TREE);
+ call_expr = build (CALL_EXPR,
+ TREE_TYPE (TREE_TYPE (TREE_TYPE (fn))),
+ fn, args, NULL_TREE);
TREE_SIDE_EFFECTS (call_expr) = 1;
/* If we're using the non-reentrant PCC calling convention, then we
@@ -2681,6 +2684,10 @@ genrtl_finish_function (fn)
if (function_depth > 1)
ggc_push_context ();
+ /* There's no need to defer outputting this function any more; we
+ know we want to output it. */
+ DECL_DEFER_OUTPUT (fn) = 0;
+
/* Run the optimizers and output the assembler code for this
function. */
rest_of_compilation (fn);
@@ -2721,28 +2728,54 @@ genrtl_finish_function (fn)
--function_depth;
- if (!DECL_SAVED_INSNS (fn)
- && !(flag_inline_trees && DECL_INLINE (fn)))
+ /* If we don't need the RTL for this function anymore, stop pointing
+ to it. That's especially important for LABEL_DECLs, since you
+ can reach all the instructions in the function from the
+ CODE_LABEL stored in the DECL_RTL for the LABEL_DECL. */
+ if (!DECL_SAVED_INSNS (fn))
{
tree t;
- /* Stop pointing to the local nodes about to be freed. */
- /* But DECL_INITIAL must remain nonzero so we know this
- was an actual function definition. */
- DECL_INITIAL (fn) = error_mark_node;
+ /* Walk the BLOCK-tree, clearing DECL_RTL for LABEL_DECLs and
+ non-static local variables. */
+ walk_tree_without_duplicates (&DECL_SAVED_TREE (fn),
+ clear_decl_rtl,
+ NULL);
+
+ /* Clear out the RTL for the arguments. */
for (t = DECL_ARGUMENTS (fn); t; t = TREE_CHAIN (t))
{
SET_DECL_RTL (t, NULL_RTX);
DECL_INCOMING_RTL (t) = NULL_RTX;
}
- }
+ if (!(flag_inline_trees && DECL_INLINE (fn)))
+ /* DECL_INITIAL must remain nonzero so we know this was an
+ actual function definition. */
+ DECL_INITIAL (fn) = error_mark_node;
+ }
+
/* Let the error reporting routines know that we're outside a
function. For a nested function, this value is used in
pop_cp_function_context and then reset via pop_function_context. */
current_function_decl = NULL_TREE;
}
+/* Clear out the DECL_RTL for the non-static variables in BLOCK and
+ its sub-blocks. */
+
+static tree
+clear_decl_rtl (tp, walk_subtrees, data)
+ tree *tp;
+ int *walk_subtrees ATTRIBUTE_UNUSED;
+ void *data ATTRIBUTE_UNUSED;
+{
+ if (nonstatic_local_decl_p (*tp))
+ SET_DECL_RTL (*tp, NULL_RTX);
+
+ return NULL_TREE;
+}
+
/* Perform initialization related to this module. */
void
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 78fc6804b62..5c7ee808ad2 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,7 @@
+Mon Mar 26 18:13:30 2001 Mark Mitchell <mark@codesourcery.com>
+
+ * com.c (duplicate_decls): Don't copy DECL_FRAME_SIZE.
+
Mon Mar 19 15:05:39 2001 Mark Mitchell <mark@codesourcery.com>
* com.c (builtin_function): Use SET_DECL_ASSEMBLER_NAME.
diff --git a/gcc/f/com.c b/gcc/f/com.c
index bce0bbbb06c..749b72fd04d 100644
--- a/gcc/f/com.c
+++ b/gcc/f/com.c
@@ -13743,8 +13743,6 @@ duplicate_decls (tree newdecl, tree olddecl)
DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
}
- else
- DECL_FRAME_SIZE (newdecl) = DECL_FRAME_SIZE (olddecl);
DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
diff --git a/gcc/integrate.c b/gcc/integrate.c
index f91f9f15c37..76104c06f39 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -892,9 +892,6 @@ expand_inline_function (fndecl, parms, target, ignore, type,
incoming arg rtx values are expanded now so that we can be
sure we have enough slots in the const equiv map since the
store_expr call can easily blow the size estimate. */
- if (DECL_FRAME_SIZE (fndecl) != 0)
- copy_rtx_and_substitute (virtual_stack_vars_rtx, map, 0);
-
if (DECL_SAVED_INSNS (fndecl)->args_size != 0)
copy_rtx_and_substitute (virtual_incoming_args_rtx, map, 0);
}
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index d1471544b7f..397f670c1ed 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,7 @@
+2001-03-26 Mark Mitchell <mark@codesourcery.com>
+
+ * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
+
2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (find_as_inner_class): Follow current package
diff --git a/gcc/java/parse.h b/gcc/java/parse.h
index 98845d7977b..3ca2141da54 100644
--- a/gcc/java/parse.h
+++ b/gcc/java/parse.h
@@ -720,7 +720,7 @@ typedef struct _jdeplist {
#define CURRENT_OSB(C) (C)->osb_number [(C)->osb_depth]
/* Macro for the xreferencer */
-#define DECL_END_SOURCE_LINE(DECL) DECL_FRAME_SIZE (DECL)
+#define DECL_END_SOURCE_LINE(DECL) (DECL_CHECK (DECL)->decl.u1.i)
#define DECL_INHERITED_SOURCE_LINE(DECL) (DECL_CHECK (DECL)->decl.u2.i)
/* Parser context data structure. */
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index d4a858188ad..54a598eea4e 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -402,11 +402,6 @@ print_node (file, prefix, node, indent)
DECL_OFFSET_ALIGN (node));
}
}
- else if (DECL_INLINE (node))
- {
- fprintf (file, " frame_size ");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, DECL_FRAME_SIZE (node));
- }
else if (DECL_BUILT_IN (node))
{
if (DECL_BUILT_IN_CLASS (node) == BUILT_IN_MD)
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b0da7be7c08..3c7d0ab74aa 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2775,7 +2775,8 @@ rest_of_compilation (decl)
}
/* If requested, consider whether to make this function inline. */
- if (DECL_INLINE (decl) || flag_inline_functions)
+ if ((DECL_INLINE (decl) && !flag_no_inline)
+ || flag_inline_functions)
{
timevar_push (TV_INTEGRATION);
lose = function_cannot_inline_p (decl);
diff --git a/gcc/tree.h b/gcc/tree.h
index e7a2df17ae5..f1470afb9a6 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1396,9 +1396,6 @@ struct tree_type
#define DECL_INCOMING_RTL(NODE) (PARM_DECL_CHECK (NODE)->decl.u2.r)
/* For FUNCTION_DECL, if it is inline, holds the saved insn chain. */
#define DECL_SAVED_INSNS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.u2.f)
-/* For FUNCTION_DECL, if it is inline,
- holds the size of the stack frame, as an integer. */
-#define DECL_FRAME_SIZE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
/* For FUNCTION_DECL, if it is built-in,
this identifies which built-in operation it is. */
#define DECL_FUNCTION_CODE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.u1.f)
@@ -1691,12 +1688,15 @@ struct tree_decl
unsigned lang_flag_6 : 1;
unsigned lang_flag_7 : 1;
- /* For a FUNCTION_DECL, if inline, this is the size of frame needed.
- If built-in, this is the code for which built-in function.
- For other kinds of decls, this is DECL_ALIGN and DECL_OFFSET_ALIGN. */
union {
- HOST_WIDE_INT i;
+ /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
+ DECL_FUNCTION_CODE. */
enum built_in_function f;
+ /* In a FUNCITON_DECL for which DECL_BUILT_IN does not hold, this
+ is used by language-dependent code. */
+ HOST_WIDE_INT i;
+ /* DECL_ALIGN and DECL_OFFSET_ALIGN. (These are not used for
+ FUNCTION_DECLs). */
struct {unsigned int align : 24; unsigned int off_align : 8;} a;
} u1;