Commit 6a0bec2c by Richard Henderson Committed by Richard Henderson

tree.h (immediate_size_expand): Delete.

        * tree.h (immediate_size_expand): Delete.
        * stor-layout.c (immediate_size_expand): Delete.
        (variable_size): Don't look at it.
        * c-decl.c (push_parm_decl): Don't frob immediate_size_expand.
        (start_function): Likewise.
        * cfgexpand.c (construct_exit_block): Likewise.
        * function.c (init_function_start, expand_function_end): Likewise.
        * tree-optimize.c (tree_rest_of_compilation): Likewise.
cp/
        * decl.c (start_preparsed_function): Don't set immediate_size_expand.
        * method.c (use_thunk): Likewise.
fortran/
        * trans-decl.c (gfc_generate_function_code): Don't set
        immediate_size_expand.
        (gfc_generate_constructors): Likewise.

From-SVN: r83946
parent 1730c8f5
2004-06-30 Richard Henderson <rth@redhat.com>
* tree.h (immediate_size_expand): Delete.
* stor-layout.c (immediate_size_expand): Delete.
(variable_size): Don't look at it.
* c-decl.c (push_parm_decl): Don't frob immediate_size_expand.
(start_function): Likewise.
* cfgexpand.c (construct_exit_block): Likewise.
* function.c (init_function_start, expand_function_end): Likewise.
* tree-optimize.c (tree_rest_of_compilation): Likewise.
2004-06-30 Richard Henderson <rth@redhat.com>
* gimplify.c (gimplify_compound_lval): Take fallback argument
instead of want_lvalue.
(gimplify_call_expr): Take want_value argument instead of test
......
......@@ -3028,11 +3028,6 @@ push_parm_decl (tree parm)
{
tree decl;
/* Don't attempt to expand sizes while parsing this decl.
(We can get here with i_s_e 1 somehow from Objective-C.) */
int save_immediate_size_expand = immediate_size_expand;
immediate_size_expand = 0;
decl = grokdeclarator (TREE_VALUE (TREE_PURPOSE (parm)),
TREE_PURPOSE (TREE_PURPOSE (parm)),
PARM, 0, NULL);
......@@ -3041,8 +3036,6 @@ push_parm_decl (tree parm)
decl = pushdecl (decl);
finish_decl (decl, NULL_TREE, NULL_TREE);
immediate_size_expand = save_immediate_size_expand;
}
/* Mark all the parameter declarations to date as forward decls.
......@@ -5589,7 +5582,6 @@ start_function (tree declspecs, tree declarator, tree attributes)
{
tree decl1, old_decl;
tree restype;
int old_immediate_size_expand = immediate_size_expand;
current_function_returns_value = 0; /* Assume, until we see it does. */
current_function_returns_null = 0;
......@@ -5603,18 +5595,12 @@ start_function (tree declspecs, tree declarator, tree attributes)
error message in c_finish_bc_stmt. */
c_break_label = c_cont_label = size_zero_node;
/* Don't expand any sizes in the return type of the function. */
immediate_size_expand = 0;
decl1 = grokdeclarator (declarator, declspecs, FUNCDEF, 1, NULL);
/* If the declarator is not suitable for a function definition,
cause a syntax error. */
if (decl1 == 0)
{
immediate_size_expand = old_immediate_size_expand;
return 0;
}
return 0;
decl_attributes (&decl1, attributes, 0);
......@@ -5793,8 +5779,6 @@ start_function (tree declspecs, tree declarator, tree attributes)
DECL_RESULT (current_function_decl)
= build_decl (RESULT_DECL, NULL_TREE, restype);
immediate_size_expand = old_immediate_size_expand;
start_fname_decls ();
return 1;
......@@ -6174,7 +6158,6 @@ store_parm_decls (void)
call expand_expr to calculate the size of a variable-sized array.
We haven't necessarily assigned RTL to all variables yet, so it's
not safe to try to expand expressions involving them. */
immediate_size_expand = 0;
cfun->x_dont_save_pending_sizes_p = 1;
}
......
......@@ -311,12 +311,6 @@ construct_exit_block (void)
basic_block exit_block;
edge e, e2, next;
/* We hard-wired immediate_size_expand to zero above.
expand_function_end will decrement this variable. So, we set the
variable to one here, so that after the decrement it will remain
zero. */
immediate_size_expand = 1;
/* Make sure the locus is set to the end of the function, so that
epilogue line numbers and warnings are set properly. */
#ifdef USE_MAPPED_LOCATION
......
2004-06-30 Richard Henderson (rth@redhat.com>
* decl.c (start_preparsed_function): Don't set immediate_size_expand.
* method.c (use_thunk): Likewise.
2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
* call.c (build_over_call), typeck.c (build_function_call): Call
......
......@@ -9733,7 +9733,6 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
call expand_expr to calculate the size of a variable-sized array.
We haven't necessarily assigned RTL to all variables yet, so it's
not safe to try to expand expressions involving them. */
immediate_size_expand = 0;
cfun->x_dont_save_pending_sizes_p = 1;
/* Start the statement-tree, start the tree now. */
......
......@@ -430,9 +430,6 @@ use_thunk (tree thunk_fndecl, bool emit_p)
assemble_end_function (thunk_fndecl, fnname);
current_function_decl = 0;
cfun = 0;
/* Because init_function_start increments this, we must
decrement it. */
immediate_size_expand--;
TREE_ASM_WRITTEN (thunk_fndecl) = 1;
}
else
......
2004-06-30 Richard Henderson <rth@redhat.com>
* trans-decl.c (gfc_generate_function_code): Don't set
immediate_size_expand.
(gfc_generate_constructors): Likewise.
2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/16161
......
......@@ -2035,7 +2035,6 @@ gfc_generate_function_code (gfc_namespace * ns)
call expand_expr to calculate the size of a variable-sized array.
We haven't necessarily assigned RTL to all variables yet, so it's
not safe to try to expand expressions involving them. */
immediate_size_expand = 0;
cfun->x_dont_save_pending_sizes_p = 1;
/* Will be created as needed. */
......@@ -2191,8 +2190,6 @@ gfc_generate_constructors (void)
cfun->x_whole_function_mode_p = 1;
immediate_size_expand = 0;
pushlevel (0);
for (; gfc_static_ctors; gfc_static_ctors = TREE_CHAIN (gfc_static_ctors))
......
......@@ -6288,9 +6288,6 @@ init_function_start (tree subr)
{
prepare_function_start (subr);
/* Within function body, compute a type's size as soon it is laid out. */
immediate_size_expand++;
/* Prevent ever trying to delete the first instruction of a
function. Also tell final how to output a linenum before the
function prologue. Note linenums could be missing, e.g. when
......@@ -6709,10 +6706,6 @@ expand_function_end (void)
while (in_sequence_p ())
end_sequence ();
/* Outside function body, can't compute type's actual size
until next function's body starts. */
immediate_size_expand--;
clear_pending_stack_adjust ();
do_pending_stack_adjust ();
......
......@@ -73,11 +73,6 @@ extern void debug_rli (record_layout_info);
static GTY(()) tree pending_sizes;
/* Nonzero means cannot safely call expand_expr now,
so put variable sizes onto `pending_sizes' instead. */
int immediate_size_expand;
/* Show that REFERENCE_TYPES are internal and should be Pmode. Called only
by front end. */
......@@ -154,7 +149,7 @@ variable_size (tree size)
if (TREE_CODE (save) == SAVE_EXPR)
SAVE_EXPR_PERSISTENT_P (save) = 1;
if (!immediate_size_expand && cfun && cfun->x_dont_save_pending_sizes_p)
if (cfun && cfun->x_dont_save_pending_sizes_p)
/* The front-end doesn't want us to keep a list of the expressions
that determine sizes for variable size objects. Trust it. */
return size;
......@@ -169,10 +164,7 @@ variable_size (tree size)
return size_one_node;
}
if (immediate_size_expand)
expand_expr (save, const0_rtx, VOIDmode, 0);
else
put_pending_size (save);
put_pending_size (save);
return size;
}
......
......@@ -474,7 +474,6 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
call expand_expr to calculate the size of a variable-sized array.
We haven't necessarily assigned RTL to all variables yet, so it's
not safe to try to expand expressions involving them. */
immediate_size_expand = 0;
cfun->x_dont_save_pending_sizes_p = 1;
node = cgraph_node (fndecl);
......
......@@ -3295,11 +3295,6 @@ extern int real_zerop (tree);
extern int pedantic_lvalues;
/* Nonzero means can safely call expand_expr now;
otherwise layout_type puts variable sizes onto `pending_sizes' instead. */
extern int immediate_size_expand;
/* Points to the FUNCTION_DECL of the function whose body we are reading. */
extern GTY(()) tree current_function_decl;
......
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