diff options
author | Richard Henderson <rth@redhat.com> | 2004-06-30 17:38:38 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-06-30 17:38:38 -0700 |
commit | 6a0bec2ce1817d8cb78a4a9c1729855382d412cd (patch) | |
tree | 11be711913612228df3a6979d2909f5aa10224d3 | |
parent | 1730c8f5a7e5dfdbb208ce8ae60b7630d1bb5bc4 (diff) | |
download | gcc-6a0bec2ce1817d8cb78a4a9c1729855382d412cd.zip gcc-6a0bec2ce1817d8cb78a4a9c1729855382d412cd.tar.gz gcc-6a0bec2ce1817d8cb78a4a9c1729855382d412cd.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/c-decl.c | 19 | ||||
-rw-r--r-- | gcc/cfgexpand.c | 6 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 1 | ||||
-rw-r--r-- | gcc/cp/method.c | 3 | ||||
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 3 | ||||
-rw-r--r-- | gcc/function.c | 7 | ||||
-rw-r--r-- | gcc/stor-layout.c | 12 | ||||
-rw-r--r-- | gcc/tree-optimize.c | 1 | ||||
-rw-r--r-- | gcc/tree.h | 5 |
12 files changed, 25 insertions, 54 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b013dd6..bcf1b22 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,16 @@ 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 diff --git a/gcc/c-decl.c b/gcc/c-decl.c index f5c03f3..16eb49d 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -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; } diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 5859275..c650576 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -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 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4d15664..2e89bcc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index dced875..ee7d76f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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. */ diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 774f8c0..327adc5 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -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 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8e65b69..d19b4f5 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index e642467..0b09555 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -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)) diff --git a/gcc/function.c b/gcc/function.c index faa77d9..f6c73a64 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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 (); diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index b2ef41d..94bc46f 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -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; } diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index be663bb..a4ee979 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -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; |