aboutsummaryrefslogtreecommitdiff
path: root/gcc/f/com.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-10-13 06:26:46 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-10-13 06:26:46 +0000
commit1f8f4a0b31c687ce9cfb7fb76c0f1e02460a8ded (patch)
treecd4e3b39aeeef559afdffecc5526c482b9b80b01 /gcc/f/com.c
parentc26f7a3165fa34de2f55291d33da8320ed3077e8 (diff)
downloadgcc-1f8f4a0b31c687ce9cfb7fb76c0f1e02460a8ded.zip
gcc-1f8f4a0b31c687ce9cfb7fb76c0f1e02460a8ded.tar.gz
gcc-1f8f4a0b31c687ce9cfb7fb76c0f1e02460a8ded.tar.bz2
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. From-SVN: r36856
Diffstat (limited to 'gcc/f/com.c')
-rw-r--r--gcc/f/com.c214
1 files changed, 2 insertions, 212 deletions
diff --git a/gcc/f/com.c b/gcc/f/com.c
index 7648910..495f168 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;