diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-10-13 06:26:46 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-10-13 06:26:46 +0000 |
commit | d7c47c0ef0309b9b24b450072b3fbbebf52f7b5a (patch) | |
tree | cd4e3b39aeeef559afdffecc5526c482b9b80b01 /gcc/f | |
parent | a2d421410ebac81ab3d874b79c72fc1d6dc2d60c (diff) | |
download | gcc-d7c47c0ef0309b9b24b450072b3fbbebf52f7b5a.tar.gz |
Remove obstacks.
* Makefile.in (ggc-callbacks.o): Remove target.
(flow.o): Depend on GGC_H.
* alias.c (init_alias_analysis):
Remove ggc_p conditionals.
(end_alias_analysis): Likewise.
* basic-block.h (init_flow): New function.
(allocate_reg_life_data): Declare.
* bb-reorder.c (function_obstack): Replace with ...
(flow_obstack): ... new variable.
(fixup_reorder_chain): Use it.
* c-decl.c (ggc_p): Remove.
(caller-save.c): Don't call oballoc/obfree.
* combine.c (struct
undobuf): Remove storage.
(try_combine): Don't call oballoc.
(undo_all): Don't call obfree.
* cse.c (insert): Use xmalloc, not
oballoc.
(cse_main): Adjust accordingly.
* dwarf2out.c (save_rtx): Remove
obstack code.
(dwarf2out_init): Remove ggc_p conditionals.
* emit-rtl.c (rtl_obstack): Remove.
(gen_rtx_CONST_INT): Remove ggc_p conditionals.
(make_insn_raw): Likewise.
(emit_insn_before): Likewise.
(emit_insn_after): Likewise.
(emit_insn): Likewise.
(gen_sequence): Likewise.
(copy_insn_1): Remove handling of `b' RTL components.
(init_emit_once): Remove ggc_p conditionals.
* except.c (create_rethrow_ref): Don't fool with obstacks.
(add_partial_entry): Likewise.
(call_get_eh_context): Likewise.
(begin_protect_partials): Likewise.
(protect_with_terminate): Likewise.
* explow.c
(plus_constant_wide): Likewise.
* expr.c (init_expr_once):
Likewise.
(emit_block_move): Likewise.
(clear_storage): Likewise.
(expand_expr): Likewise.
* flow.c (function_obstack): Remove.
(flow_obstack): New variable.
(flow_firstobj): Likewise.
(create_base_block): Use the flow_obstack.
(split_block): Likewise.
(split_edge): Likewise.
(calculate_global_regs_live): Likewise.
(allocate_bb_life_data): Make it static. Likewiwse.
(init_flow): New function.
(size_int_type_wide): Remove ggc_p conditionals.
* function.c
(push_function_context_to): Don't call save_tree_status.
(pop_function_context_from): Or restore_tree_status.
(assign_stack_local_1): Don't call push_obstacks.
(find_fixup_replacement): Use xmalloc.
(fixup_var_refs_insns): Free the storage.
(insns_for_mem_walk): Don't mess with obstacks.
(instantiate_decls): Likewise.
(trampoline_address): Likewise.
(expand_function_end): Likewise.
* function.h (sturct function):
Remove obstack-related variables.
(save_tree_status): Don't declare.
(restore_tree_status): Likewise.
* gcse.c (compute_can_copy):
Don't call oballoc/obfree.
* genattrtab.c (operate_exp): Remove
ggc_p conditionals.
(simplify_cond): Likewise.
(simplify_test_exp): Don't mess with obstacks.
(optimize_attrs): Likewise.
* gengenrtl.c (gendef): Don't include
ggc_p conditionals.
* ggc-callbacks.c (ggc_p): Remove.
* ggc-none.c (ggc_p): Remove.
* ggc.h (ggc_p): Don't declare.
* integrate.c (save_for_inline): Don't mess with obstacks.
(integrate_decl_tree): Likewise.
(output_inline_function): Likewise.
* lists.c
(init_EXPR_INSN_LIST_cache): Likewise.
* loop.c (temp_obstack):
Remove.
(rtl_obstack): Likewise.
(init_loop): Don't mess with obstacks.
(reg_address_cost): Free BIVs and GIVs.
(check_insns_for_bivs): Use xmalloc, not oballoc.
(find_mem_givs): Likewise.
(record_biv): Likewise.
(general_induction_var): Likewise.
(product_cheap_p): Likewse.
* optabs.c (init_one_libfunc): Remove
ggc_p conditional.
* print-tree.c (debug_tree): Don't use
oballoc/obfree.
(print_node): Likewise.
* profile.c (output_func_start_profiler):
Remove call to temporary_allocation.
* reload1.c
(eliminate_regs_in_insn): Don't mess with obstacks.
* resource.c
(mark_target_live_regs): Use xmalloc.
(free_resource_info): Free the memory.
* rtl.c (rtl_obstack):
Remove.
(rtvec_alloc): Don't mess with obstacks.
(rtx_alloc): Likewise.
(rtx_free): Remove.
(copy_rtx): Don't handle `b' cases.
(read_rtx): Use a local rtl_obstack.
* rtl.h (oballoc): Remove.
(obfree): Likewise.
(pop_obstacks): Likewise.
(push_obstacks): Likewise.
(allocate_bb_life_data): Likewise.
(allocate_reg_life_data): Likewise.
(rtx_free): Likewise.
* sdbout.c (sdbout_queue_anonymous_type):
Use tree_cons, not saveable_tree_cons.
* simplify-rtx.c
(cselib_init): Don't mess with obstacks.
* stmt.c
(mark_block_nesting): Mark the label_chain.
(epxand_label): Use ggc_alloc, not oballoc.
(clear_last_expr): Don't mess with obstacks.
(expand_decl_cleanup): Likewise.
(expand_dcc_cleanup): Likewise.
(expand_dhc_cleanup): Likewise.
(expand_anon_union_decl): Likewise.
(add_case_node): Use xmalloc, not oballoc.
(free_case_nodes): New function.
(expand_end_case): Call it.
* stor-layout.c (layout_type): Don't
mess with obstacks.
(layout_type): Likewise.
* toplev.c (wrapup_global_declarations):
Likewise.
(compile_file): Remove ggc_p conditionals.
(rest_of_compilation): Call init_flow. Remove ggc_p conditionals.
(decode_f_option): Remove ggc_p conditionals.
* tree.c
(function_maybepermanent_obstack): Remove.
(maybepermanent_obstack): Likewise.
(function_obstack): Likewise.
(tmeporary_obstack): Likewise.
(momentary_obstack): Likewise.
(temp_decl_obstack): Likewise.
(saveable_obstack): Likewise.
(rtl_obstack): Likewise.
(current_obstack): Likewise.
(expression_obstack): Likewise.
(struct obstack_stack): Likewise.
(obstack_stack): Likewise.
(obstack_stack_obstack): Likewise.
(maybepermanent_firstobj): Likewise.
(temporary_firstobj): Likewise.
(momentary_firstobj): Likewise.
(temp_decl_firstobj): Likewise.
(momentary_function_firstobj): Likewise.
(all_types_permanent): Likewise.
(struct momentary_level): Likewise.
(momentary_stack): Likewise.
(init_obstacks): Remove initialization of removed obstacks.
(save_tree_status): Remove.
(restore_tree_status): Likewise.
(temporary_allocation): Liekwise.
(end_temporary_allocation): Liekwise.
(resume_temporary_allocation): Likewise.
(saveable_allocation): Likewise.
(push_obstacks): Likewise.
(push_obstacks_nochange): Likewise.
(pop_obstacks): Likewise.
(allocation_temporary_p): Likewise.
(permanent_allocation): Likewise.
(preserve_data): Likewise.
(preserve_initializer): Likewise.
(rtl_in_current_obstack): Likewise.
(rtl_in_saveable_obstack): Likewise.
(oballoc): Likewise.
(obfree): Likewise.
(savealloc): Likewise.
(expralloc): Likewise.
(print_obstack_name): Likewise.
(debug_obstack): Likewise.
(object_permanent_p): Likewise.
(push_momentary): Likewise.
(perserve_momentary): Likewise.
(clear_momentary): Likewise.
(pop_momentary): Likewise.
(pop_momentary_nofree): Likewise.
(suspend_momentary): Likewise.
(resume_momentary): Likewise.
(make_node): Don't set TREE_PERMANENT.
(copy_node): Remove ggc_p conditionals. Don't set TYPE_OBSTACK.
Don't set TREE_PERMANENT.
(get_identifier): Remove ggc_p conditionals.
(build_string): Likewise.
(make_tree_vec): Likewise.
(build_decl_list): Remove.
(build_expr_list): Likewise.
(tree_cons): Remove ggc_p conditionals.
(decl_tree_cons): Remove.
(expr_tree_cons): Likewise.
(perm_tree_cons): Likewise.
(temp_tree_cons): Likewise.
(saveable_tree_cons): Likewise.
(build1): Remove ggc_p conditionals.
(build_parse_node): Likewise.
(build_type_attribute_variant): Don't mess with obstacks.
(build_type_copy): Likewise.
(type_hash_canon): Likewise.
(build_pointer_type): Likewise.
(build_reference_type): Likewise.
(build_index_type): Likewise.
(build_range_type): Likewise.
(dump_tree_statistics): Don't print obstack information.
* tree.h
(struct tree_common): Remove permanent_flag.
(TREE_PERMANENT): Remove.
(TREE_SET_PERMANENT): Likewise.
(TYPE_OBSTACK): Likewise.
(struct tree_type): Remove obstack.
(oballoc): Remove.
(savealloc): Likewise.
(build_decl_list): Likewise.
(build_expr_list): Likewise.
(perm_tree_cons): Likewise.
(temp_tree_cons): Likewise.
(saveable_tree_cons): Likewise.
(decl_tree_cons): Likewise.
(expr_tree_cons): Likewise.
(suspend_momentary): Likewise.
(allocation_temporary_p): Likewise.
(resume_momentary): Likewise.
(push_obstacks_nochange): Likewise.
(permanent_allocation): Likewise.
(push_momentary): Likewise.
(clear_momentary): Likewise.
(pop_momentary): Likewise.
(end_temporary_allocation): Likewise.
(pop_obstacks): Likewise.
(push_obstacks): Likewise.
(pop_momentary_nofree): LIkewise.
(preserve_momentary): Likewise.
(saveable_allocation): Likewise.
(temporary_allocation): Likewise.
(resume_temporary_allocation): Likewise.
(perserve_initializer): Likewise.
(debug_obstack): Likewise.
(rtl_in_current_obstack): Likewise.
(rtl_in_saveable_obstack): Likewise.
(obfree): Likewise.
* varasm.c (current_obstack): Remove.
(saveable_obstack): Remove.
(rtl_obstack): Remove.
(immed_double_const): Don't mess with obstacks.
(immed_real_cons): Likewise.
(output_constant_def): Likewise.
(init_varasm_status): Use xcalloc.
(mark_pool_constant): Mark the pool constant itself.
(free_varasm_status): Free memory.
(decode_rtx_const): Call bzero directly, rather than expanding it
inline.
(record_rtx_const): Don't mess with obstacks.
(force_const_mem): Likewise.
* config/arm/arm.c (arm_encode_call_attribute): Remove ggc_p
conditionals.
(aof_pic_entry): Likewise.
* config/ia64/ia64.c (ia64_encode_section_info): Likewise.
* config/m32r/m32r.c (m32r_encode_section_info): Likewise.
* config/pa/pa.c (saveable_obstack): Remove.
(rtl_obstack): Likewise.
(current_obstack): Likewise.
(output_call): Don't mess with obstacks.
(hppa_encode_label): Remove ggc_p conditionals.
* config/romp/romp.c (get_symref): Don't mess with obstacks.
* config/rs6000/rs6000.c (output_toc): Remove ggc_p conditional.
(rs6000_encode_section_info): Likewise.
* config/sh/sh.c (get_fpscr_rtx): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36856 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/f')
-rw-r--r-- | gcc/f/ChangeLog | 40 | ||||
-rw-r--r-- | gcc/f/com.c | 214 | ||||
-rw-r--r-- | gcc/f/std.c | 6 | ||||
-rw-r--r-- | gcc/f/ste.c | 61 |
4 files changed, 45 insertions, 276 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 63d89b59bb6..0ffe42ea258 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,43 @@ +Thu Oct 12 22:28:51 2000 Mark Mitchell <mark@codesourcery.com> + + * com.c (ffecom_do_entry_): Don't mess with obstacks. + (ffecom_finish_global_): Likewise. + (ffecom_finish_symbol_transform_): Likewise. + (ffecom_gen_sfuncdef_): Likewise. + (ffecom_init_zero_): Likewise. + (ffecom_start_progunit_): Likewise. + (ffecom_sym_transform_): Likewise. + (ffecom_sym_transform_assign_): Likewise. + (ffecom_transform_equiv_): Likewise. + (ffecom_transform_namelist_): Likewise. + (ffecom_vardesc_): Likewise. + (ffecom_vardesc_array_): Likewise. + (ffecom_vardesc_dims_): Likewise. + (ffecom_end_transition): Likewise. + (ffecom_make_tempvar): Likewise. + (bison_rule_pushlevel_): Likewise. + (bison_rule_compstmt_): Likewise. + (finish_decl): Likewise. + (finish_function): Likewise. + (push_parm_decl): Likewise. + (start_decl): Likewise. + (start_function): Likewise. + (ggc_p): Don't define. + * std.c (ffestd_stmt_pass_): Likewise. + * ste.c (ffeste_end_block_): Likewise. + (ffeste_end_stmt_): Likewise. + (ffeste_begin_iterdo_): Likewise. + (ffeste_io_ialist_): Likewise. + (ffeste_io_cilist_): Likewise. + (ffeste_io_inlist_): Likewise. + (ffeste_io_olist_): Likewise. + (ffeste_R810): Likewise. + (ffeste_R838): Likewise. + (ffeste_R839): Likewise. + (ffeste_R842): Likewise. + (ffeste_R843): Likewise. + (ffeste_R1001): Likewise. + 2000-10-05 Richard Henderson <rth@cygnus.com> * com.c (finish_function): Don't init can_reach_end. diff --git a/gcc/f/com.c b/gcc/f/com.c index 7648910e3ea..495f168e056 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -54,8 +54,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA when it comes to building decls: Internal Function (one we define, not just declare as extern): - int yes; - yes = suspend_momentary (); if (is_nested) push_f_function_context (); start_function (get_identifier ("function_name"), function_type, is_nested, is_public); @@ -66,13 +64,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA ffecom_end_compstmt (); finish_function (is_nested); if (is_nested) pop_f_function_context (); - if (is_nested) resume_momentary (yes); Everything Else: - int yes; tree d; tree init; - yes = suspend_momentary (); // fill in external, public, static, &c for decl, and // set DECL_INITIAL to error_mark_node if going to initialize // set is_top_level TRUE only if not at top level and decl @@ -80,7 +75,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA d = start_decl (decl, is_top_level); init = ...; // if have initializer finish_decl (d, init, is_top_level); - resume_momentary (yes); */ @@ -2698,23 +2692,12 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum) bool cmplxfunc; /* Use f2c way of returning COMPLEX. */ bool multi; /* Master fn has multiple return types. */ bool altreturning = FALSE; /* This entry point has alternate returns. */ - int yes; int old_lineno = lineno; const char *old_input_filename = input_filename; input_filename = ffesymbol_where_filename (fn); lineno = ffesymbol_where_filelinenum (fn); - /* c-parse.y indeed does call suspend_momentary and not only ignores the - return value, but also never calls resume_momentary, when starting an - outer function (see "fndef:", "setspecs:", and so on). So g77 does the - same thing. It shouldn't be a problem since start_function calls - temporary_allocation, but it might be necessary. If it causes a problem - here, then maybe there's a bug lurking in gcc. NOTE: This identical - comment appears twice in thist file. */ - - suspend_momentary (); - ffecom_doing_entry_ = TRUE; /* Don't bother with array dimensions. */ switch (ffecom_primary_entry_kind_) @@ -2835,8 +2818,6 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum) /* Build dummy arg list for this entry point. */ - yes = suspend_momentary (); - if (charfunc || cmplxfunc) { /* Prepend arg for where result goes. */ tree type; @@ -2873,8 +2854,6 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum) ffecom_push_dummy_decls_ (ffesymbol_dummyargs (fn), FALSE); - resume_momentary (yes); - store_parm_decls (0); ffecom_start_compstmt (); @@ -2885,16 +2864,12 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum) if (multi) { - yes = suspend_momentary (); - multi_retval = ffecom_get_invented_identifier ("__g77_%s", "multi_retval"); multi_retval = build_decl (VAR_DECL, multi_retval, ffecom_multi_type_node_); multi_retval = start_decl (multi_retval, FALSE); finish_decl (multi_retval, NULL_TREE, FALSE); - - resume_momentary (yes); } else multi_retval = NULL_TREE; /* Not actually ref'd if !multi. */ @@ -3045,8 +3020,6 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum) call)); expand_return (result); } - - clear_momentary (); } ffecom_end_compstmt (); @@ -6112,8 +6085,6 @@ ffecom_finish_global_ (ffeglobal global) || !ffeglobal_common_have_size (global)) return global; /* No need to make common, never ref'd. */ - suspend_momentary (); - DECL_EXTERNAL (cbt) = 0; /* Give the array a size now. */ @@ -6172,8 +6143,6 @@ ffecom_finish_symbol_transform_ (ffesymbol s) if ((ffesymbol_where (s) == FFEINFO_whereCOMMON) && (ffesymbol_hook (s).decl_tree != error_mark_node)) { - int yes = suspend_momentary (); - /* This isn't working, at least for dbxout. The .s file looks okay to me (burley), but in gdb 4.9 at least, the variables appear to reside somewhere outside of the common area, so @@ -6182,8 +6151,6 @@ ffecom_finish_symbol_transform_ (ffesymbol s) with EQUIVALENCE, sadly...see similar #if later. */ ffecom_member_phase2_ (ffesymbol_storage (ffesymbol_common (s)), ffesymbol_storage (s)); - - resume_momentary (yes); } return s; @@ -6297,7 +6264,6 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt) tree result; bool charfunc = (bt == FFEINFO_basictypeCHARACTER); static bool recurse = FALSE; - int yes; int old_lineno = lineno; const char *old_input_filename = input_filename; @@ -6326,8 +6292,6 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt) assert (!recurse); recurse = TRUE; - yes = suspend_momentary (); - push_f_function_context (); if (charfunc) @@ -6349,8 +6313,6 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt) entirely internal to our code, and gcc has the ability to return COMPLEX directly as a value. */ - yes = suspend_momentary (); - if (charfunc) { /* Prepend arg for where result goes. */ tree type; @@ -6371,8 +6333,6 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt) ffecom_push_dummy_decls_ (ffesymbol_dummyargs (s), TRUE); - resume_momentary (yes); - store_parm_decls (0); ffecom_start_compstmt (); @@ -6404,8 +6364,6 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt) DECL_RESULT (current_function_decl), ffecom_expr (expr))); } - - clear_momentary (); } ffecom_end_compstmt (); @@ -6415,8 +6373,6 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt) pop_f_function_context (); - resume_momentary (yes); - recurse = FALSE; lineno = old_lineno; @@ -6515,8 +6471,6 @@ ffecom_init_zero_ (tree decl) assemble_variable (decl, TREE_PUBLIC (decl) ? 1 : 0, 0, 1); } - push_momentary (); - if ((TREE_CODE (type) != ARRAY_TYPE) && (TREE_CODE (type) != RECORD_TYPE) && (TREE_CODE (type) != UNION_TYPE) @@ -6524,26 +6478,16 @@ ffecom_init_zero_ (tree decl) init = convert (type, integer_zero_node); else if (!incremental) { - int momentary = suspend_momentary (); - init = build (CONSTRUCTOR, type, NULL_TREE, NULL_TREE); TREE_CONSTANT (init) = 1; TREE_STATIC (init) = 1; - - resume_momentary (momentary); } else { - int momentary = suspend_momentary (); - assemble_zeros (int_size_in_bytes (type)); init = error_mark_node; - - resume_momentary (momentary); } - pop_momentary_nofree (); - return init; } @@ -7339,7 +7283,6 @@ ffecom_start_progunit_ () bool main_program = FALSE; int old_lineno = lineno; const char *old_input_filename = input_filename; - int yes; assert (fn != NULL); assert (ffesymbol_hook (fn).decl_tree == NULL_TREE); @@ -7347,16 +7290,6 @@ ffecom_start_progunit_ () input_filename = ffesymbol_where_filename (fn); lineno = ffesymbol_where_filelinenum (fn); - /* c-parse.y indeed does call suspend_momentary and not only ignores the - return value, but also never calls resume_momentary, when starting an - outer function (see "fndef:", "setspecs:", and so on). So g77 does the - same thing. It shouldn't be a problem since start_function calls - temporary_allocation, but it might be necessary. If it causes a problem - here, then maybe there's a bug lurking in gcc. NOTE: This identical - comment appears twice in thist file. */ - - suspend_momentary (); - switch (ffecom_primary_entry_kind_) { case FFEINFO_kindPROGRAM: @@ -7468,8 +7401,6 @@ ffecom_start_progunit_ () ffeglobal_set_hook (g, current_function_decl); } - yes = suspend_momentary (); - /* Arg handling needs exec-transitioned ffesymbols to work with. But exec-transitioning needs current_function_decl to be filled in. So we do these things in two phases. */ @@ -7532,8 +7463,6 @@ ffecom_start_progunit_ () ffecom_push_dummy_decls_ (arglist, FALSE); } - resume_momentary (yes); - if (TREE_CODE (current_function_decl) != ERROR_MARK) store_parm_decls (main_program ? 1 : 0); @@ -7572,7 +7501,6 @@ ffecom_sym_transform_ (ffesymbol s) ffeinfoBasictype bt; ffeinfoKindtype kt; ffeglobal g; - int yes; int old_lineno = lineno; const char *old_input_filename = input_filename; @@ -7698,9 +7626,7 @@ ffecom_sym_transform_ (ffesymbol s) break; } - yes = suspend_momentary (); type = ffecom_type_localvar_ (s, bt, kt); - resume_momentary (yes); if (type == error_mark_node) { @@ -7713,7 +7639,6 @@ ffecom_sym_transform_ (ffesymbol s) { /* Child of EQUIVALENCE parent. */ ffestorag est; tree et; - int yes; ffetargetOffset offset; est = ffestorag_parent (st); @@ -7725,8 +7650,6 @@ ffecom_sym_transform_ (ffesymbol s) if (! TREE_STATIC (et)) put_var_into_stack (et); - yes = suspend_momentary (); - offset = ffestorag_modulo (est) + ffestorag_offset (ffesymbol_storage (s)) - ffestorag_offset (est); @@ -7747,16 +7670,12 @@ ffecom_sym_transform_ (ffesymbol s) TREE_CONSTANT (t) = staticp (et); addr = TRUE; - - resume_momentary (yes); } else { tree initexpr; bool init = ffesymbol_is_init (s); - yes = suspend_momentary (); - t = build_decl (VAR_DECL, ffecom_get_identifier_ (ffesymbol_text (s)), type); @@ -7805,8 +7724,6 @@ ffecom_sym_transform_ (ffesymbol s) assert (0 == compare_tree_int (DECL_SIZE_UNIT (t), ffestorag_size (st))); } - - resume_momentary (yes); } } break; @@ -7839,20 +7756,15 @@ ffecom_sym_transform_ (ffesymbol s) if ((ffecom_num_entrypoints_ != 0) && (ffecom_master_bt_ == FFEINFO_basictypeNONE)) { - yes = suspend_momentary (); - assert (ffecom_multi_retval_ != NULL_TREE); t = ffecom_1 (INDIRECT_REF, ffecom_multi_type_node_, ffecom_multi_retval_); t = ffecom_2 (COMPONENT_REF, ffecom_tree_type[bt][kt], t, ffecom_multi_fields_[bt][kt]); - resume_momentary (yes); break; } - yes = suspend_momentary (); - t = build_decl (VAR_DECL, ffecom_get_identifier_ (ffesymbol_text (s)), ffecom_tree_type[bt][kt]); @@ -7862,7 +7774,6 @@ ffecom_sym_transform_ (ffesymbol s) ffecom_func_result_ = t; - resume_momentary (yes); break; case FFEINFO_whereDUMMY: @@ -8208,7 +8119,6 @@ ffecom_sym_transform_ (ffesymbol s) tree ct; ffestorag st = ffesymbol_storage (s); tree type; - int yes; cs = ffesymbol_common (s); /* The COMMON area itself. */ if (st != NULL) /* Else not laid out. */ @@ -8217,8 +8127,6 @@ ffecom_sym_transform_ (ffesymbol s) st = ffesymbol_storage (s); } - yes = suspend_momentary (); - type = ffecom_type_localvar_ (s, bt, kt); cg = ffesymbol_global (cs); /* The global COMMON info. */ @@ -8261,8 +8169,6 @@ ffecom_sym_transform_ (ffesymbol s) addr = TRUE; } - - resume_momentary (yes); } break; @@ -8619,7 +8525,6 @@ static ffesymbol ffecom_sym_transform_assign_ (ffesymbol s) { tree t; /* Transformed thingy. */ - int yes; int old_lineno = lineno; const char *old_input_filename = input_filename; @@ -8638,8 +8543,6 @@ ffecom_sym_transform_assign_ (ffesymbol s) assert (!ffecom_transform_only_dummies_); - yes = suspend_momentary (); - t = build_decl (VAR_DECL, ffecom_get_invented_identifier ("__g77_ASSIGN_%s", ffesymbol_text (s)), @@ -8683,8 +8586,6 @@ ffecom_sym_transform_assign_ (ffesymbol s) t = start_decl (t, FALSE); finish_decl (t, NULL_TREE, FALSE); - resume_momentary (yes); - ffesymbol_hook (s).assign_tree = t; lineno = old_lineno; @@ -8886,7 +8787,6 @@ ffecom_transform_equiv_ (ffestorag eqst) tree init; tree high; bool is_init = ffestorag_is_init (eqst); - int yes; assert (eqst != NULL); @@ -8941,8 +8841,6 @@ ffecom_transform_equiv_ (ffestorag eqst) &ffecom_member_phase1_, eqst); - yes = suspend_momentary (); - high = build_int_2 ((ffestorag_size (eqst) + ffestorag_modulo (eqst)) - 1, 0); TREE_TYPE (high) = ffecom_integer_type_node; @@ -9008,8 +8906,6 @@ ffecom_transform_equiv_ (ffestorag eqst) ffestorag_drive (ffestorag_list_equivs (eqst), &ffecom_member_phase2_, eqst); - - resume_momentary (yes); } #endif @@ -9027,12 +8923,9 @@ ffecom_transform_namelist_ (ffesymbol s) tree nvarsinit; tree field; tree high; - int yes; int i; static int mynumber = 0; - yes = suspend_momentary (); - nmlt = build_decl (VAR_DECL, ffecom_get_invented_identifier ("__g77_namelist_%d", mynumber++), @@ -9095,8 +8988,6 @@ ffecom_transform_namelist_ (ffesymbol s) nmlt = ffecom_1 (ADDR_EXPR, build_pointer_type (nmltype), nmlt); - resume_momentary (yes); - return nmlt; } @@ -9590,11 +9481,8 @@ ffecom_vardesc_ (ffebld expr) tree typeinit; tree field; tree varinits; - int yes; static int mynumber = 0; - yes = suspend_momentary (); - var = build_decl (VAR_DECL, ffecom_get_invented_identifier ("__g77_vardesc_%d", mynumber++), @@ -9656,8 +9544,6 @@ ffecom_vardesc_ (ffebld expr) var = ffecom_1 (ADDR_EXPR, build_pointer_type (vardesctype), var); - resume_momentary (yes); - ffesymbol_hook (s).vardesc_tree = var; } @@ -9674,7 +9560,6 @@ ffecom_vardesc_array_ (ffesymbol s) tree item = NULL_TREE; tree var; int i; - int yes; static int mynumber = 0; for (i = 0, list = NULL_TREE, b = ffesymbol_namelist (s); @@ -9694,8 +9579,6 @@ ffecom_vardesc_array_ (ffesymbol s) } } - yes = suspend_momentary (); - item = build_array_type (build_pointer_type (ffecom_type_vardesc_ ()), build_range_type (integer_type_node, integer_one_node, @@ -9711,8 +9594,6 @@ ffecom_vardesc_array_ (ffesymbol s) var = start_decl (var, FALSE); finish_decl (var, list, FALSE); - resume_momentary (yes); - return var; } @@ -9732,7 +9613,6 @@ ffecom_vardesc_dims_ (ffesymbol s) tree backlist; tree item = NULL_TREE; tree var; - int yes; tree numdim; tree numelem; tree baseoff = NULL_TREE; @@ -9805,8 +9685,6 @@ ffecom_vardesc_dims_ (ffesymbol s) numdim = build_tree_list (NULL_TREE, numdim); TREE_CHAIN (numdim) = numelem; - yes = suspend_momentary (); - item = build_array_type (ffecom_f2c_ftnlen_type_node, build_range_type (integer_type_node, integer_zero_node, @@ -9826,8 +9704,6 @@ ffecom_vardesc_dims_ (ffesymbol s) var = ffecom_1 (ADDR_EXPR, build_pointer_type (item), var); - resume_momentary (yes); - return var; } } @@ -11126,7 +11002,6 @@ ffecom_end_transition () tree dt; tree t; tree var; - int yes; static int number = 0; callee = ffebld_head (item); @@ -11138,8 +11013,6 @@ ffecom_end_transition () t = ffesymbol_hook (s).decl_tree; } - yes = suspend_momentary (); - dt = build_pointer_type (TREE_TYPE (t)); var = build_decl (VAR_DECL, @@ -11157,8 +11030,6 @@ ffecom_end_transition () t = ffecom_1 (ADDR_EXPR, dt, t); finish_decl (var, t, FALSE); - - resume_momentary (yes); } /* This handles any COMMON areas that weren't referenced but have, for @@ -12817,7 +12688,6 @@ tree ffecom_make_tempvar (const char *commentary, tree type, ffetargetCharacterSize size, int elements) { - int yes; tree t; static int mynumber; @@ -12826,8 +12696,6 @@ ffecom_make_tempvar (const char *commentary, tree type, if (type == error_mark_node) return error_mark_node; - yes = suspend_momentary (); - if (size != FFETARGET_charactersizeNONE) type = build_array_type (type, build_range_type (ffecom_f2c_ftnlen_type_node, @@ -12848,8 +12716,6 @@ ffecom_make_tempvar (const char *commentary, tree type, t = start_decl (t, FALSE); finish_decl (t, NULL_TREE, FALSE); - resume_momentary (yes); - return t; } #endif @@ -13670,7 +13536,6 @@ bison_rule_pushlevel_ () emit_line_note (input_filename, lineno); pushlevel (0); clear_last_expr (); - push_momentary (); expand_start_bindings (0); } @@ -13687,7 +13552,6 @@ bison_rule_compstmt_ () emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), keep, 0); t = poplevel (keep, 1, 0); - pop_momentary (); return t; } @@ -13988,7 +13852,6 @@ finish_decl (tree decl, tree init, bool is_top_level) { register tree type = TREE_TYPE (decl); int was_incomplete = (DECL_SIZE (decl) == 0); - int temporary = allocation_temporary_p (); bool at_top_level = (current_binding_level == global_binding_level); bool top_level = is_top_level || at_top_level; @@ -14017,11 +13880,6 @@ finish_decl (tree decl, tree init, bool is_top_level) } } - /* Pop back to the obstack that is current for this binding level. This is - because MAXINDEX, rtl, etc. to be made below must go in the permanent - obstack. But don't discard the temporary data yet. */ - pop_obstacks (); - /* Deduce size of array from initialization, if not already known */ if (TREE_CODE (type) == ARRAY_TYPE @@ -14101,46 +13959,6 @@ finish_decl (tree decl, tree init, bool is_top_level) 0); } - if (!(TREE_CODE (decl) == FUNCTION_DECL && DECL_INLINE (decl)) - && temporary - /* DECL_INITIAL is not defined in PARM_DECLs, since it shares space with - DECL_ARG_TYPE. */ - && TREE_CODE (decl) != PARM_DECL) - { - /* We need to remember that this array HAD an initialization, but - discard the actual temporary nodes, since we can't have a permanent - node keep pointing to them. */ - /* We make an exception for inline functions, since it's normal for a - local extern redeclaration of an inline function to have a copy of - the top-level decl's DECL_INLINE. */ - if ((DECL_INITIAL (decl) != 0) - && (DECL_INITIAL (decl) != error_mark_node)) - { - /* If this is a const variable, then preserve the - initializer instead of discarding it so that we can optimize - references to it. */ - /* This test used to include TREE_STATIC, but this won't be set - for function level initializers. */ - if (TREE_READONLY (decl)) - { - preserve_initializer (); - - /* The initializer and DECL must have the same (or equivalent - types), but if the initializer is a STRING_CST, its type - might not be on the right obstack, so copy the type - of DECL. */ - TREE_TYPE (DECL_INITIAL (decl)) = type; - } - else - DECL_INITIAL (decl) = error_mark_node; - } - } - - /* If we have gone back from temporary to permanent allocation, actually - free the temporary space that we no longer need. */ - if (temporary && !allocation_temporary_p ()) - permanent_allocation (0); - /* At the end of a declaration, throw away any variable type sizes of types defined inside that declaration. There is no use computing them in the following function definition. */ @@ -14190,23 +14008,17 @@ finish_function (int nested) /* If this is a nested function, protect the local variables in the stack above us from being collected while we're compiling this function. */ - if (ggc_p && nested) + if (nested) ggc_push_context (); /* Run the optimizers and output the assembler code for this function. */ rest_of_compilation (fndecl); /* Undo the GC context switch. */ - if (ggc_p && nested) + if (nested) ggc_pop_context (); } - /* Free all the tree nodes making up this function. */ - /* Switch back to allocating nodes permanently until we start another - function. */ - if (!nested) - permanent_allocation (1); - if (TREE_CODE (fndecl) != ERROR_MARK && !nested && DECL_SAVED_INSNS (fndecl) == 0) @@ -14435,8 +14247,6 @@ push_parm_decl (tree parm) immediate_size_expand = 0; - push_obstacks_nochange (); - /* Fill in arg stuff. */ DECL_ARG_TYPE (parm) = TREE_TYPE (parm); @@ -14517,9 +14327,6 @@ start_decl (tree decl, bool is_top_level) level anyway. */ assert (!is_top_level || !at_top_level); - /* The corresponding pop_obstacks is in finish_decl. */ - push_obstacks_nochange (); - if (DECL_INITIAL (decl) != NULL_TREE) { assert (DECL_INITIAL (decl) == error_mark_node); @@ -14551,14 +14358,6 @@ start_decl (tree decl, bool is_top_level) expand_decl (tem); } - if (DECL_INITIAL (tem) != NULL_TREE) - { - /* When parsing and digesting the initializer, use temporary storage. - Do this even if we will ignore the value. */ - if (at_top_level) - temporary_allocation (); - } - return tem; } @@ -14640,11 +14439,6 @@ start_function (tree name, tree type, int nested, int public) = build_decl (RESULT_DECL, NULL_TREE, restype); } - if (!nested) - /* Allocate further tree nodes temporarily during compilation of this - function only. */ - temporary_allocation (); - if (!nested && (TREE_CODE (current_function_decl) != ERROR_MARK)) TREE_ADDRESSABLE (current_function_decl) = 1; @@ -15802,10 +15596,6 @@ unsigned_type (type) return type; } -/* Callback routines for garbage collection. */ - -int ggc_p = 1; - void lang_mark_tree (t) union tree_node *t ATTRIBUTE_UNUSED; diff --git a/gcc/f/std.c b/gcc/f/std.c index 8610b9c01da..425744cb0d6 100644 --- a/gcc/f/std.c +++ b/gcc/f/std.c @@ -1,5 +1,5 @@ /* std.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc. Contributed by James Craig Burley. This file is part of GNU Fortran. @@ -687,7 +687,6 @@ ffestd_stmt_pass_ () tree duplicate; expand_start_case (0, which, TREE_TYPE (which), "entrypoint dispatch"); - push_momentary (); stmt = ffestd_stmt_list_.first; do @@ -709,7 +708,6 @@ ffestd_stmt_pass_ () label = ffecom_temp_label (); TREE_USED (label) = 1; expand_goto (label); - clear_momentary (); ffesymbol_hook (stmt->u.R1226.entry).length_tree = label; } @@ -717,9 +715,7 @@ ffestd_stmt_pass_ () } while (--ents != 0); - pop_momentary (); expand_end_case (which); - clear_momentary (); } #endif diff --git a/gcc/f/ste.c b/gcc/f/ste.c index ea927cca7a5..5b4c68eb2d1 100644 --- a/gcc/f/ste.c +++ b/gcc/f/ste.c @@ -440,8 +440,6 @@ ffeste_end_block_ (ffestw block) free (b); - clear_momentary (); - ffecom_end_compstmt (); } @@ -482,8 +480,6 @@ ffeste_end_stmt_(void) free (b); - clear_momentary (); - ffecom_end_compstmt (); } @@ -493,7 +489,6 @@ ffeste_end_stmt_(void) #define ffeste_end_block_(b) \ do \ { \ - clear_momentary (); \ ffecom_end_compstmt (); \ } while(0) #define ffeste_start_stmt_() ffeste_start_block_(NULL) @@ -501,10 +496,8 @@ ffeste_end_stmt_(void) #endif /* ! defined (ENABLE_CHECKING) */ -/* Begin an iterative DO loop. Pass the block to start if applicable. - - NOTE: Does _two_ push_momentary () calls, which the caller must - undo (by calling ffeste_end_iterdo_). */ +/* Begin an iterative DO loop. Pass the block to start if + applicable. */ #if FFECOM_targetCURRENT == FFECOM_targetGCC static void @@ -573,8 +566,6 @@ ffeste_begin_iterdo_ (ffestw block, tree *xtvar, tree *xtincr, tincr_saved = ffecom_save_tree (tincr); - preserve_momentary (); - /* Want to have tstart, tend for just this statement. */ ffeste_start_stmt_ (); @@ -1210,7 +1201,6 @@ ffeste_io_ialist_ (bool have_err, static tree f2c_alist_struct = NULL_TREE; tree t; tree ttype; - int yes; tree field; tree inits, initn; bool constantp = TRUE; @@ -1277,8 +1267,6 @@ ffeste_io_ialist_ (bool have_err, TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; - yes = suspend_momentary (); - t = build_decl (VAR_DECL, ffecom_get_invented_identifier ("__g77_alist_%d", mynumber++), @@ -1287,8 +1275,6 @@ ffeste_io_ialist_ (bool have_err, t = ffecom_start_decl (t, 1); ffecom_finish_decl (t, inits, 0); - resume_momentary (yes); - /* Prepare run-time expressions. */ if (! unitexp) @@ -1343,7 +1329,6 @@ ffeste_io_cilist_ (bool have_err, static tree f2c_cilist_struct = NULL_TREE; tree t; tree ttype; - int yes; tree field; tree inits, initn; bool constantp = TRUE; @@ -1489,8 +1474,6 @@ ffeste_io_cilist_ (bool have_err, TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; - yes = suspend_momentary (); - t = build_decl (VAR_DECL, ffecom_get_invented_identifier ("__g77_cilist_%d", mynumber++), @@ -1499,8 +1482,6 @@ ffeste_io_cilist_ (bool have_err, t = ffecom_start_decl (t, 1); ffecom_finish_decl (t, inits, 0); - resume_momentary (yes); - /* Prepare run-time expressions. */ if (! unitexp) @@ -1569,7 +1550,6 @@ ffeste_io_cllist_ (bool have_err, static tree f2c_close_struct = NULL_TREE; tree t; tree ttype; - int yes; tree field; tree inits, initn; tree ignore; /* Ignore length info for certain fields. */ @@ -1625,8 +1605,6 @@ ffeste_io_cllist_ (bool have_err, TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; - yes = suspend_momentary (); - t = build_decl (VAR_DECL, ffecom_get_invented_identifier ("__g77_cllist_%d", mynumber++), @@ -1635,8 +1613,6 @@ ffeste_io_cllist_ (bool have_err, t = ffecom_start_decl (t, 1); ffecom_finish_decl (t, inits, 0); - resume_momentary (yes); - /* Prepare run-time expressions. */ if (! unitexp) @@ -1692,7 +1668,6 @@ ffeste_io_icilist_ (bool have_err, static tree f2c_icilist_struct = NULL_TREE; tree t; tree ttype; - int yes; tree field; tree inits, initn; bool constantp = TRUE; @@ -1839,8 +1814,6 @@ ffeste_io_icilist_ (bool have_err, TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; - yes = suspend_momentary (); - t = build_decl (VAR_DECL, ffecom_get_invented_identifier ("__g77_icilist_%d", mynumber++), @@ -1849,8 +1822,6 @@ ffeste_io_icilist_ (bool have_err, t = ffecom_start_decl (t, 1); ffecom_finish_decl (t, inits, 0); - resume_momentary (yes); - /* Prepare run-time expressions. */ if (! unitexp) @@ -1940,7 +1911,6 @@ ffeste_io_inlist_ (bool have_err, static tree f2c_inquire_struct = NULL_TREE; tree t; tree ttype; - int yes; tree field; tree inits, initn; bool constantp = TRUE; @@ -2095,8 +2065,6 @@ ffeste_io_inlist_ (bool have_err, TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; - yes = suspend_momentary (); - t = build_decl (VAR_DECL, ffecom_get_invented_identifier ("__g77_inlist_%d", mynumber++), @@ -2105,8 +2073,6 @@ ffeste_io_inlist_ (bool have_err, t = ffecom_start_decl (t, 1); ffecom_finish_decl (t, inits, 0); - resume_momentary (yes); - /* Prepare run-time expressions. */ ffeste_f2c_prepare_int_ (unit_spec, unitexp); @@ -2196,7 +2162,6 @@ ffeste_io_olist_ (bool have_err, static tree f2c_open_struct = NULL_TREE; tree t; tree ttype; - int yes; tree field; tree inits, initn; tree ignore; /* Ignore length info for certain fields. */ @@ -2280,8 +2245,6 @@ ffeste_io_olist_ (bool have_err, TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; - yes = suspend_momentary (); - t = build_decl (VAR_DECL, ffecom_get_invented_identifier ("__g77_olist_%d", mynumber++), @@ -2290,8 +2253,6 @@ ffeste_io_olist_ (bool have_err, t = ffecom_start_decl (t, 1); ffecom_finish_decl (t, inits, 0); - resume_momentary (yes); - /* Prepare run-time expressions. */ if (! unitexp) @@ -2974,8 +2935,6 @@ ffeste_R810 (ffestw block, unsigned long casenum) c->previous_stmt = c->previous_stmt->previous_stmt; } while ((c != (ffestwCase) &s->first_rel) && (casenum == c->casenum)); - - clear_momentary (); } #else #error @@ -3305,8 +3264,6 @@ ffeste_R838 (ffelab label, ffebld target) target_tree, label_tree); expand_expr_stmt (expr_tree); - - clear_momentary (); } } #else @@ -3340,8 +3297,6 @@ ffeste_R839 (ffebld target) error ("ASSIGNed GOTO target variable is too small"); expand_computed_goto (convert (TREE_TYPE (null_pointer_node), t)); - - clear_momentary (); } #else #error @@ -3556,8 +3511,6 @@ ffeste_R842 (ffebld expr) TREE_SIDE_EFFECTS (callit) = 1; expand_expr_stmt (callit); - - clear_momentary (); } #else #error @@ -3641,8 +3594,6 @@ ffeste_R843 (ffebld expr) TREE_SIDE_EFFECTS (callit) = 1; expand_expr_stmt (callit); - - clear_momentary (); } #if 0 /* Old approach for phantom g77 run-time library. */ @@ -3668,8 +3619,6 @@ ffeste_R843 (ffebld expr) TREE_SIDE_EFFECTS (callit) = 1; expand_expr_stmt (callit); - - clear_momentary (); } #endif #else @@ -4998,9 +4947,6 @@ ffeste_R1001 (ffests s) TREE_CONSTANT (t) = 1; TREE_STATIC (t) = 1; - push_obstacks_nochange (); - end_temporary_allocation (); - var = ffecom_lookup_label (ffeste_label_formatdef_); if ((var != NULL_TREE) && (TREE_CODE (var) == VAR_DECL)) @@ -5019,9 +4965,6 @@ ffeste_R1001 (ffests s) expand_decl_init (var); } - resume_temporary_allocation (); - pop_obstacks (); - ffeste_label_formatdef_ = NULL; } #else |