ggc.h: Delete ggc_add_string_root and ggc_mark_string.

* ggc.h: Delete ggc_add_string_root and ggc_mark_string.  Add
        digit_vector and digit_string.
        * stringpool.c (digit_vector): New.
        (ggc_alloc_string): Use digit_string.

        * stmt.c (digit_strings): Delete.
        (init_stmt): Do not initialize digit_strings.
        (expand_asm_operands): Use ggc.h's digit_string macro.
        * toplev.c (mark_file_stack): Delete.
        (compile_file): Don't call init_tree_codes.
        (main): No need to make the file stack a GC root.
        * tree.c (init_tree_codes): Delete.
        * tree.h (init_tree_codes): Delete.

        * c-lex.c: Don't include ggc.h.
        (mark_splay_tree_node, mark_splay_tree): Delete.
        (init_c_lex): No need to ggc_strdup string constant.  Don't add
        file_info_tree to GGC roots.
        (cb_enter_file, cb_rename_file): No need to ggc_strdup
        ip->nominal_fname.

        * Makefile.in (c-lex.o): No longer depends on $(GGC_H).

        * dbxout.c (dbxout_init),
        dwarf2out.c (dwarf2out_line),
        ggc-common.c (ggc_mark_rtx_children, ggc_mark_trees),
        varasm.c (mark_const_hash_entry, mark_pool_constant, init_varasm_once),
        xcoffout.c (xcoffout_source_file),
        i386.c (load_pic_register):
        Delete call(s) to ggc_add_string_root and/or ggc_mark_string.

        * except.c (create_rethrow_ref),
        profile.c (init_edge_profiler),
        toplev.c (compile_file),
        varasm.c (named_section, assemble_static_space,
        assemble_trampoline_template, output_constant_def, force_const_mem),
        i386.c (load_pic_register),
        ia64.c (ia64_encode_section_info),
        rs6000.c (rs6000_emit_load_toc_table, create_TOC_reference,
        rs6000_emit_prologue, rs6000_emit_epilogue),
        rs6000.md (load_toc_aix_si, load_toc_aix_di):
        Change ggc_alloc_string (var, -1) to ggc_strdup (var).

        * profile.c (output_func_start_profiler),
        tree.c (make_node),
        i386.c (load_pic_register): No need to ggc_strdup string constant.

cp:
        * lex.c (mark_impl_file_chain): Delete.
        (init_parse): Remove call to ggc_add_string_root.  No need to
        ggc_strdup a string constant.  Do not add impl_file_chain to GC
        roots.
        (handle_pragma_implementation): No need to ggc_strdup main_filename.

f:
        * lex.c (ffelex_hash_): Change ggc_alloc_string (var, -1) to
        ggc_strdup (var).

java:
        * parse.y (goal): Remove call to ggc_add_string_root.

From-SVN: r37522
This commit is contained in:
Zack Weinberg 2000-11-17 17:31:13 +00:00
parent 9e7d5ee809
commit a8a05998de
26 changed files with 219 additions and 299 deletions

View file

@ -1,3 +1,52 @@
2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
* ggc.h: Delete ggc_add_string_root and ggc_mark_string. Add
digit_vector and digit_string.
* stringpool.c (digit_vector): New.
(ggc_alloc_string): Use digit_string.
* stmt.c (digit_strings): Delete.
(init_stmt): Do not initialize digit_strings.
(expand_asm_operands): Use ggc.h's digit_string macro.
* toplev.c (mark_file_stack): Delete.
(compile_file): Don't call init_tree_codes.
(main): No need to make the file stack a GC root.
* tree.c (init_tree_codes): Delete.
* tree.h (init_tree_codes): Delete.
* c-lex.c: Don't include ggc.h.
(mark_splay_tree_node, mark_splay_tree): Delete.
(init_c_lex): No need to ggc_strdup string constant. Don't add
file_info_tree to GGC roots.
(cb_enter_file, cb_rename_file): No need to ggc_strdup
ip->nominal_fname.
* Makefile.in (c-lex.o): No longer depends on $(GGC_H).
* dbxout.c (dbxout_init),
dwarf2out.c (dwarf2out_line),
ggc-common.c (ggc_mark_rtx_children, ggc_mark_trees),
varasm.c (mark_const_hash_entry, mark_pool_constant, init_varasm_once),
xcoffout.c (xcoffout_source_file),
i386.c (load_pic_register):
Delete call(s) to ggc_add_string_root and/or ggc_mark_string.
* except.c (create_rethrow_ref),
profile.c (init_edge_profiler),
toplev.c (compile_file),
varasm.c (named_section, assemble_static_space,
assemble_trampoline_template, output_constant_def, force_const_mem),
i386.c (load_pic_register),
ia64.c (ia64_encode_section_info),
rs6000.c (rs6000_emit_load_toc_table, create_TOC_reference,
rs6000_emit_prologue, rs6000_emit_epilogue),
rs6000.md (load_toc_aix_si, load_toc_aix_di):
Change ggc_alloc_string (var, -1) to ggc_strdup (var).
* profile.c (output_func_start_profiler),
tree.c (make_node),
i386.c (load_pic_register): No need to ggc_strdup string constant.
2000-11-17 Hans-Peter Nilsson <hp@axis.com>
* Makefile.in (config.status): Depend on config.gcc.
@ -112,17 +161,17 @@
2000-11-15 Neil Booth <neilb@earthling.net>
* cpplib.c (start_directive, end_directive): New functions.
(_cpp_handle_directive, run_directive): Use them.
(_cpp_handle_directive): Don't -Wtraditional on indented
null directives.
(_cpp_push_buffer): Don't re-clear was_skipping.
* cpplib.h (struct cpp_reader): New member la_saved.
* cppmacro.c (cpp_get_token): Don't interpret _Pragma in
directives.
* cpplib.c (start_directive, end_directive): New functions.
(_cpp_handle_directive, run_directive): Use them.
(_cpp_handle_directive): Don't -Wtraditional on indented
null directives.
(_cpp_push_buffer): Don't re-clear was_skipping.
* cpplib.h (struct cpp_reader): New member la_saved.
* cppmacro.c (cpp_get_token): Don't interpret _Pragma in
directives.
gcc.dg/cpp/_Pragma1.c: Update.
gcc.dg/cpp/_Pragma2.c: New test.
gcc.dg/cpp/_Pragma1.c: Update.
gcc.dg/cpp/_Pragma2.c: New test.
2000-11-15 Mark Mitchell <mark@codesourcery.com>
@ -177,7 +226,7 @@
* configure.in: Move check for V3 above check for C++ header-file
directory.
* configure: Regenerated.
2000-11-14 DJ Delorie <dj@redhat.com>
* config/v850/v850.c: Remove obstacks.
@ -471,7 +520,7 @@ Tue Nov 14 12:34:56 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* configure.in: Turn on libstdc++ V3 by default.
* configure: Regenerated.
* fixinc/mkfixinc.sh: Use the ordinary fixincludes on Solaris.
2000-11-12 Jakub Jelinek <jakub@redhat.com>
@ -488,7 +537,7 @@ Tue Nov 14 12:34:56 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
of #include headers.
2000-11-12 Marc Espie <espie@openbsd.org>
* configure.in: Fix filds test.
* configure: Regen.
@ -499,32 +548,32 @@ Tue Nov 14 12:34:56 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2000-11-12 Neil Booth <neilb@earthling.net>
* cppexp.c: Don't worry about pfile->skipping.
* cpplib.c (struct if_stack): Make was_skipping unsigned char.
(cpp_handle_directive): Save pfile->skipping in struct cpp_buffer
for handled directives.
(skip_rest_of_line): Use _cpp_lex_token after popping contexts
and releasing lookaheads.
(do_ifdef, do_ifndef, do_if): Use buffer->was_skipping.
(do_else, do_elif, push_conditional): Update logic.
(do_endif): Set buffer->was_skipping rather than pfile->skipping.
(unwind_if_stack): Inline into cpp_pop_buffer.
(cpp_push_buffer): Clear ifs->was_skipping for cpp_handle_directive.
* cpplex.c (_cpp_lex_token): Clear skipping on EOF. Handle
multiple-include optimisation.
* cpplib.h (struct cpp_buffer): New member was_skipping.
* cppmacro.c (_cpp_get_token): Loop whilst pfile->skipping. This
works because skipping == 0 in directives.
(_cpp_release_lookahead): Renamed from release_lookahead.
(cpp_get_token): No need to check skipping as _cpp_get_token does
this for us. No need to handle MI optimisation.
* cppexp.c: Don't worry about pfile->skipping.
* cpplib.c (struct if_stack): Make was_skipping unsigned char.
(cpp_handle_directive): Save pfile->skipping in struct cpp_buffer
for handled directives.
(skip_rest_of_line): Use _cpp_lex_token after popping contexts
and releasing lookaheads.
(do_ifdef, do_ifndef, do_if): Use buffer->was_skipping.
(do_else, do_elif, push_conditional): Update logic.
(do_endif): Set buffer->was_skipping rather than pfile->skipping.
(unwind_if_stack): Inline into cpp_pop_buffer.
(cpp_push_buffer): Clear ifs->was_skipping for cpp_handle_directive.
* cpplex.c (_cpp_lex_token): Clear skipping on EOF. Handle
multiple-include optimisation.
* cpplib.h (struct cpp_buffer): New member was_skipping.
* cppmacro.c (_cpp_get_token): Loop whilst pfile->skipping. This
works because skipping == 0 in directives.
(_cpp_release_lookahead): Renamed from release_lookahead.
(cpp_get_token): No need to check skipping as _cpp_get_token does
this for us. No need to handle MI optimisation.
Sat Nov 11 21:14:02 2000 Mark P Mitchell <mark@codesourcery.com>
* fixinc/inclhack.def (sunos_matherr_decl): Bypass matherr
declarations that use `__MATH_EXCEPTION' in their prototypes, too.
* fixinc/fixincl.x: Regenerated.
2000-11-11 Bruce Korb <bkorb@gnu.org>
* fixinc/inclhack.def (avoid_bool_type): avoid commenting out #endif
@ -543,7 +592,7 @@ Sat Nov 11 18:41:20 2000 Mark P Mitchell <mark@codesourcery.com>
2000-11-11 Jason Merrill <jason@redhat.com>
* function.c (assign_parms): If TREE_ADDRESSABLE is set, try to
* function.c (assign_parms): If TREE_ADDRESSABLE is set, try to
give the parm a register and then call put_var_into_stack.
* stmt.c (expand_decl): Likewise.
@ -567,7 +616,7 @@ Sat Nov 11 18:41:20 2000 Mark P Mitchell <mark@codesourcery.com>
* cppexp.c (lex): Don't handle CPP_PLACEMARKER.
* cpplex.c (_cpp_lex_token): Rename skip_newlines to next_bol
* cpplib.c (skip_rest_of_line, check_eol, cpp_push_buffer):
Similarly.
Similarly.
* cpplib.h: Remove CPP_PLACEMARKER.
(struct lexer_state): Rename skip_newlines to next_bol.
* cppmacro.c (stringify_arg): Don't handle CPP_PLACEMARKER.
@ -669,15 +718,15 @@ Sat Nov 11 18:41:20 2000 Mark P Mitchell <mark@codesourcery.com>
* config/ia64/ia64.md (extendsfdf2, extendsftf2, extenddftf2): Emit
a no-op move if regs are equal.
* toplev.c (rest_of_compilation): Do the noop moves elimination pass
when calling jump after post-reload splitting.
when calling jump after post-reload splitting.
2000-11-09 Jan van Male <jan.vanmale@fenk.wau.nl>
* c-tree.texi: Fix typos.
* extend.texi: Likewise
* gcov.texi: Likewise
* rtl.texi: Likewise
* tm.texi: Likewise
* c-tree.texi: Fix typos.
* extend.texi: Likewise
* gcov.texi: Likewise
* rtl.texi: Likewise
* tm.texi: Likewise
2000-11-09 Hans-Peter Nilsson <hp@axis.com>
@ -708,12 +757,12 @@ Sat Nov 11 18:41:20 2000 Mark P Mitchell <mark@codesourcery.com>
* c-common.c (flag_dump_translation_unit): Define it.
(strip_array_types): New function.
* c-decl.c (c_decode_option): Handle -fdump-translation-unit.
* c-lang.c (finish_file): Call dump_node_to_file if
* c-lang.c (finish_file): Call dump_node_to_file if
flag_dump_translation_unit.
* c-semantics.c (mark_rtl_for_local_static): Fix typo in comment.
* c-tree.h (DECL_C_BIT_FIELD): Remove declaration.
* c-dump.c: New file.
2000-11-09 Christopher Faylor <cgf@cygnus.com>
* config/i386/cygwin.h: Add mingw startfile prefix.
@ -774,7 +823,7 @@ Sat Nov 11 18:41:20 2000 Mark P Mitchell <mark@codesourcery.com>
2000-11-09 Graham Stott <grahams@redhat.com>
* config/i386/i386.md (mmx_pinsrw): Output operands in correct
* config/i386/i386.md (mmx_pinsrw): Output operands in correct
order for -mintel-syntax. Remove comment now that the operand
order has been checked.
(mmx_pextrw): Likewise.
@ -846,15 +895,15 @@ Wed Nov 8 21:58:20 2000 Christopher Faylor <cgf@cygnus.com>
2000-11-08 Neil Booth <neilb@earthling.net>
Move directive handling into the lexer itself.
* cpplex.c (_cpp_lex_token): Handle directives directly.
In the case of a directive interrupting a function-like
macro invocation, use extra_char since read_ahead is
used to store the '#'. Return a CPP_EOF in this case.
* cppmacro.c (parse_arg): No need to handle CPP_DHASH any more.
(cpp_get_token): Don't handle directives here.
* cpplib.h: Remove CPP_DHASH token type.
Move directive handling into the lexer itself.
* cpplex.c (_cpp_lex_token): Handle directives directly.
In the case of a directive interrupting a function-like
macro invocation, use extra_char since read_ahead is
used to store the '#'. Return a CPP_EOF in this case.
* cppmacro.c (parse_arg): No need to handle CPP_DHASH any more.
(cpp_get_token): Don't handle directives here.
* cpplib.h: Remove CPP_DHASH token type.
Wed Nov 8 21:53:41 MET 2000 Jan Hubicka <jh@suse.cz>
@ -885,7 +934,7 @@ Wed Nov 8 21:53:41 MET 2000 Jan Hubicka <jh@suse.cz>
passed in multiple non-contiguous locations.
2000-11-08 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* README.gnat: Remove file.
2000-11-08 Alexandre Oliva <aoliva@redhat.com>
@ -922,7 +971,7 @@ Wed Nov 8 21:53:41 MET 2000 Jan Hubicka <jh@suse.cz>
* c-lang.c (start_cdtor, finish_cdtor): New functions.
(finish_file): Use them in building constructor/destructor functions.
* config/alpha/alpha.h (HAS_INIT_SECTION, LD_INIT_SWITCH,
* config/alpha/alpha.h (HAS_INIT_SECTION, LD_INIT_SWITCH,
LD_FINI_SWITCH): Move ...
* config/alpha/osf.h: ... here.
* config/alpha/alpha-interix.h: Don't undef them.
@ -1045,7 +1094,7 @@ Mon Nov 6 20:08:13 2000 J"orn Rennecke <amylaar@redhat.com>
2000-11-06 Neil Booth <neilb@earthling.net>
* tradcpp.c (special_symbol): Assign an null string rather
* tradcpp.c (special_symbol): Assign an null string rather
than writing to an unallocated buffer.
2000-11-06 Neil Booth <neilb@earthling.net>
@ -1105,13 +1154,13 @@ Sat Sep 23 19:10:20 2000 Denis Chertykov <denisc@overta.ru> & Marek Michalkiew
2000-11-04 Neil Booth <neilb@earthling.net>
* cpplex.c (parse_string): Don't allow multiline strings in
#include family directives.
* cpplex.c (parse_string): Don't allow multiline strings in
#include family directives.
2000-11-04 Neil Booth <neilb@earthling.net>
* cpplib.c (do_line): Only warn pedantically if not reading
preprocessed input.
preprocessed input.
2000-11-04 Alexandre Oliva <aoliva@redhat.com>
@ -1228,7 +1277,7 @@ config:
sparc/sparc.h, sparc/sysv4.h, sparc/vxsim.h, sparc/vxsparc.h,
v850/rtems.h, vax/netbsd.h, vax/openbsd.h, vax/ultrix.h, vax/vax.h,
vax/vaxv.h, vax/vms.h, we32k/we32k.h
Replace -A() with -A=, the new assertion syntax.
Thu Nov 2 21:52:35 2000 J"orn Rennecke <amylaar@redhat.com>
@ -1266,17 +1315,17 @@ Thu Nov 2 19:20:12 2000 J"orn Rennecke <amylaar@redhat.com>
2000-11-02 Zack Weinberg <zackw@Stanford.EDU>
Integrated CPP.
* c-lex.c (init_c_lex): Update cpp_start_read call.
(cb_ident): Update for new callback prototype.
(cb_def_pragma): Update for new cpp_get_token prototype.
(c_lex): Similarly. Use cpp_get_line.
* c-parse.in (finish_parse): Update for new cpp_finish
prototype.
* cp/lex.c (finish_parse): Similarly.
Integrated CPP.
* c-lex.c (init_c_lex): Update cpp_start_read call.
(cb_ident): Update for new callback prototype.
(cb_def_pragma): Update for new cpp_get_token prototype.
(c_lex): Similarly. Use cpp_get_line.
* c-parse.in (finish_parse): Update for new cpp_finish
prototype.
* cp/lex.c (finish_parse): Similarly.
2000-11-01 Geoff Keating <geoffk@cygnus.com>
@ -1290,10 +1339,10 @@ Thu Nov 2 19:20:12 2000 J"orn Rennecke <amylaar@redhat.com>
2000-11-01 Neil Booth <neilb@earthling.net>
* cpplib.c (run_directive): Use correct line number for output
of _Pragma. Remember any in-progress directive.
* gcc.dg/cpp/vararg2.c, gcc.dg/cpp/_Pragm1.c: New tests.
* cpplib.c (run_directive): Use correct line number for output
of _Pragma. Remember any in-progress directive.
* gcc.dg/cpp/vararg2.c, gcc.dg/cpp/_Pragm1.c: New tests.
2000-11-01 Richard Henderson <rth@redhat.com>
@ -1313,7 +1362,7 @@ Thu Nov 2 19:20:12 2000 J"orn Rennecke <amylaar@redhat.com>
2000-11-01 Richard Henderson <rth@redhat.com>
* stmt.c (expand_start_null_loop): New.
(expand_end_null_loop): New.
(expand_end_null_loop): New.
* c-semantics.c (genrtl_do_stmt): Use them.
* tree.h: Declare them.
@ -1376,7 +1425,7 @@ Thu Nov 2 19:20:12 2000 J"orn Rennecke <amylaar@redhat.com>
(dwarf2out_end_block, dwarf2out_label): Likewise.
* final.c (final_scan_insn, case NOTE_INSN_DELETED_LABEL): Likewise
* config/ia64/ia64.h (ASM_OUTPUT_DEBUG_LABEL): Define.
2000-10-31 Richard Henderson <rth@redhat.com>
* dwarf2out.c (struct dw_loc_descr_struct): Add dw_loc_addr.
@ -1475,7 +1524,7 @@ Tue Oct 31 15:33:27 2000 J"orn Rennecke <amylaar@redhat.com>
2000-10-31 Bernd Schmidt <bernds@redhat.co.uk>
* config/i386/i386.c (ix86_init_builtins): Correct return type
* config/i386/i386.c (ix86_init_builtins): Correct return type
building v4hi_ftype_v4hi_int_int tree node.
(ix86_expand_builtin): Use correct operand numbers 0 and 1.
Copy operand 0 into a Pmode register, don't generate a MEM rtx.
@ -1555,7 +1604,7 @@ Tue Oct 31 15:33:27 2000 J"orn Rennecke <amylaar@redhat.com>
2000-10-29 Neil Booth <neilb@earthling.net>
* cppmacro.c (_cpp_create_definition): Optimize the case of
a macro defined to itself.
a macro defined to itself.
2000-10-29 Neil Booth <neilb@earthling.net>
@ -1625,7 +1674,7 @@ Tue Oct 31 15:33:27 2000 J"orn Rennecke <amylaar@redhat.com>
2000-10-28 Neil Booth <neilb@earthling.net>
New macro expander.
* cpplib.c (struct answer): New.
(struct if_stack): Use cpp_lexer_pos rather than line and col.
Rename cmacro mi_cmacro.
@ -1766,7 +1815,7 @@ Tue Oct 31 15:33:27 2000 J"orn Rennecke <amylaar@redhat.com>
_cpp_cleanup_hashtable.
* Makefile.in: Remove cppoutput.c.
* cppoutput.c: Delete
* fixheader.c (read_scan_file): Update for new cpp_get_token
@ -1779,7 +1828,7 @@ Tue Oct 31 15:33:27 2000 J"orn Rennecke <amylaar@redhat.com>
* scan.h (recognized_function): Update prototype.
* po/POTFILES.in: Remove cppoutput.c.
2000-10-27 Mark Mitchell <mark@codesourcery.com>
* c-typeck.c (check_init_type_bitfields): Remove.
@ -1797,7 +1846,7 @@ Tue Oct 31 15:33:27 2000 J"orn Rennecke <amylaar@redhat.com>
2000-10-21 Mike Coleman <mcoleman2@kc.rr.com>
* c-pragma.c (handle_pragma_pack): Initialize align to -1.
Improve error messages. Correct parsing of
Improve error messages. Correct parsing of
#pragma pack(pop [,id]). Do not check the user-supplied
alignment if we're popping.
@ -1836,11 +1885,11 @@ Tue Oct 31 15:33:27 2000 J"orn Rennecke <amylaar@redhat.com>
2000-10-27 Bernd Schmidt <bernds@redhat.co.uk>
Richard Henderson <rth@redhat.com>
* regrename.c: Rewrite to handle multi-register modes and
cond_exec instructions.
* Makefile.in (regrename.o): Update dependancies.
* recog.h (struct operand_alternative): Add is_address.
* recog.c (preprocess_constraints) [case 'p']: Set it.
* regrename.c: Rewrite to handle multi-register modes and
cond_exec instructions.
* Makefile.in (regrename.o): Update dependancies.
* recog.h (struct operand_alternative): Add is_address.
* recog.c (preprocess_constraints) [case 'p']: Set it.
2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
@ -1857,23 +1906,23 @@ Tue Oct 31 15:33:27 2000 J"orn Rennecke <amylaar@redhat.com>
switch is given, nothing otherwise.
* configure.lang: Delete.
* Makefile.in: Expunge all traces of extra_c_objs,
extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from
@maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set
warning options via a three level scheme so that -pedantic and
-Wtraditional are not used for non-C front ends: LOOSE_WARN,
STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS ->
WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS.
* Makefile.in: Expunge all traces of extra_c_objs,
extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from
@maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set
warning options via a three level scheme so that -pedantic and
-Wtraditional are not used for non-C front ends: LOOSE_WARN,
STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS ->
WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS.
Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES.
Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P,
LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file
generation rules. Wrap all rules that change the current
directory in parentheses; pmake doesn't spawn a new shell for
each command. Expunge all references to $(P). When one
command depends on another and they're run all at once, use &&
to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files
deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2
and beyond.
LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file
generation rules. Wrap all rules that change the current
directory in parentheses; pmake doesn't spawn a new shell for
each command. Expunge all references to $(P). When one
command depends on another and they're run all at once, use &&
to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files
deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2
and beyond.
* objc/Make-lang.in: Wrap all rules that change the current
directory in parentheses. Expunge all references to $(P).

View file

@ -1153,7 +1153,7 @@ c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) $(C_TREE_H) \
$(RTL_H) $(EXPR_H)
c-lex.o : c-lex.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-lex.h $(C_TREE_H) \
c-pragma.h input.h intl.h flags.h toplev.h output.h \
mbchar.h $(GGC_H) cpplib.h $(EXPR_H)
mbchar.h cpplib.h $(EXPR_H)
c-aux-info.o : c-aux-info.c $(CONFIG_H) system.h $(TREE_H) $(C_TREE_H) \
flags.h toplev.h
c-convert.o : c-convert.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h

View file

@ -35,7 +35,6 @@ Boston, MA 02111-1307, USA. */
#include "c-pragma.h"
#include "toplev.h"
#include "intl.h"
#include "ggc.h"
#include "tm_p.h"
#include "splay-tree.h"
@ -149,8 +148,6 @@ static tree lex_string PARAMS ((const char *, unsigned int, int));
static tree lex_charconst PARAMS ((const char *, unsigned int, int));
static void update_header_times PARAMS ((const char *));
static int dump_one_header PARAMS ((splay_tree_node, void *));
static int mark_splay_tree_node PARAMS ((splay_tree_node, void *));
static void mark_splay_tree PARAMS ((void *));
#if !USE_CPPLIB
static int skip_white_space PARAMS ((int));
@ -177,10 +174,7 @@ init_c_lex (filename)
file_info_tree = splay_tree_new ((splay_tree_compare_fn)strcmp,
0,
(splay_tree_delete_value_fn)free);
/* Make sure to mark the filenames in the tree for GC. */
ggc_add_root (&file_info_tree, 1, sizeof (file_info_tree),
mark_splay_tree);
toplevel = get_fileinfo (ggc_strdup ("<top level>"));
toplevel = get_fileinfo ("<top level>");
if (flag_detailed_statistics)
{
header_time = 0;
@ -698,7 +692,7 @@ cb_enter_file (pfile)
if (ip->prev)
{
lex_lineno = lineno = ip->prev->lineno - 1;
push_srcloc (ggc_alloc_string (ip->nominal_fname, -1), 1);
push_srcloc (ip->nominal_fname, 1);
input_file_stack->indent_level = indent_level;
debug_start_source_file (ip->nominal_fname);
}
@ -769,7 +763,7 @@ cb_rename_file (pfile)
cpp_buffer *ip = CPP_BUFFER (pfile);
/* Bleah, need a better interface to this. */
const char *flags = cpp_syshdr_flags (pfile, ip);
input_filename = ggc_alloc_string (ip->nominal_fname, -1);
input_filename = ip->nominal_fname;
lex_lineno = ip->lineno;
in_system_header = (flags[0] != 0);
@ -2550,25 +2544,3 @@ lex_charconst (str, len, wide)
return value;
}
/* Mark for GC a node in a splay tree whose keys are strings. */
static int
mark_splay_tree_node (n, data)
splay_tree_node n;
void *data ATTRIBUTE_UNUSED;
{
ggc_mark_string ((char *) n->key);
return 0;
}
/* Mark for GC a splay tree whose keys are strings. */
static void
mark_splay_tree (p)
void *p;
{
splay_tree st = *(splay_tree *) p;
splay_tree_foreach (st, mark_splay_tree_node, NULL);
}

View file

@ -1677,7 +1677,6 @@ ix86_can_use_return_insn_p ()
static const char *pic_label_name;
static int pic_label_output;
static const char *global_offset_table_name;
/* This function generates code for -fpic that loads %ebx with
the return address of the caller and then returns. */
@ -1721,13 +1720,7 @@ load_pic_register ()
{
rtx gotsym, pclab;
if (global_offset_table_name == NULL)
{
global_offset_table_name =
ggc_alloc_string ("_GLOBAL_OFFSET_TABLE_", 21);
ggc_add_string_root (&global_offset_table_name, 1);
}
gotsym = gen_rtx_SYMBOL_REF (Pmode, global_offset_table_name);
gotsym = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
if (TARGET_DEEP_BRANCH_PREDICTION)
{
@ -1735,8 +1728,7 @@ load_pic_register ()
{
char buf[32];
ASM_GENERATE_INTERNAL_LABEL (buf, "LPR", 0);
pic_label_name = ggc_alloc_string (buf, -1);
ggc_add_string_root (&pic_label_name, 1);
pic_label_name = ggc_strdup (buf);
}
pclab = gen_rtx_MEM (QImode, gen_rtx_SYMBOL_REF (Pmode, pic_label_name));
}

View file

@ -4817,7 +4817,7 @@ ia64_encode_section_info (decl)
else if (symbol_str[0] == SDATA_NAME_FLAG_CHAR)
{
XSTR (XEXP (DECL_RTL (decl), 0), 0)
= ggc_alloc_string (symbol_str + 1, -1);
= ggc_strdup (symbol_str + 1);
}
}

View file

@ -5114,10 +5114,10 @@ rs6000_emit_load_toc_table (fromprolog)
rtx symL;
ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno);
symF = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1));
symF = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
ASM_GENERATE_INTERNAL_LABEL (buf, "LCL", rs6000_pic_labelno);
symL = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1));
symL = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
rs6000_maybe_dead (emit_insn (gen_load_toc_v4_PIC_1 (tempLR,
symF)));
@ -5131,11 +5131,10 @@ rs6000_emit_load_toc_table (fromprolog)
rtx tocsym;
static int reload_toc_labelno = 0;
tocsym = gen_rtx_SYMBOL_REF (Pmode,
ggc_alloc_string (toc_label_name, -1));
tocsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (toc_label_name));
ASM_GENERATE_INTERNAL_LABEL (buf, "LCG", reload_toc_labelno++);
symF = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1));
symF = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
rs6000_maybe_dead (emit_insn (gen_load_toc_v4_PIC_1b (tempLR,
symF,
@ -5152,7 +5151,7 @@ rs6000_emit_load_toc_table (fromprolog)
char buf[30];
rtx realsym;
ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1);
realsym = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1));
realsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
rs6000_maybe_dead (emit_insn (gen_elf_high (dest, realsym)));
rs6000_maybe_dead (emit_insn (gen_elf_low (dest, dest, realsym)));
@ -5205,12 +5204,11 @@ rtx
create_TOC_reference(symbol)
rtx symbol;
{
return gen_rtx_PLUS (Pmode,
gen_rtx_REG (Pmode, TOC_REGISTER),
gen_rtx_CONST (Pmode,
gen_rtx_MINUS (Pmode, symbol,
gen_rtx_SYMBOL_REF (Pmode,
ggc_alloc_string (toc_label_name, -1)))));
return gen_rtx_PLUS (Pmode,
gen_rtx_REG (Pmode, TOC_REGISTER),
gen_rtx_CONST (Pmode,
gen_rtx_MINUS (Pmode, symbol,
gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (toc_label_name)))));
}
#if TARGET_AIX
@ -5613,7 +5611,7 @@ rs6000_emit_prologue()
LINK_REGISTER_REGNUM));
sprintf (rname, "%s%d%s", SAVE_FP_PREFIX,
info->first_fp_reg_save - 32, SAVE_FP_SUFFIX);
alloc_rname = ggc_alloc_string (rname, -1);
alloc_rname = ggc_strdup (rname);
RTVEC_ELT (p, 1) = gen_rtx_USE (VOIDmode,
gen_rtx_SYMBOL_REF (Pmode,
alloc_rname));
@ -6061,7 +6059,7 @@ rs6000_emit_epilogue(sibcall)
sprintf (rname, "%s%d%s", RESTORE_FP_PREFIX,
info->first_fp_reg_save - 32, RESTORE_FP_SUFFIX);
alloc_rname = ggc_alloc_string (rname, -1);
alloc_rname = ggc_strdup (rname);
RTVEC_ELT (p, 2) = gen_rtx_USE (VOIDmode,
gen_rtx_SYMBOL_REF (Pmode,
alloc_rname));

View file

@ -9190,7 +9190,7 @@ operands[2] = GEN_INT (INTVAL (operands[1]) >> 32);
{
char buf[30];
ASM_GENERATE_INTERNAL_LABEL (buf, \"LCTOC\", 1);
operands[1] = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1));
operands[1] = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
operands[2] = gen_rtx_REG (Pmode, 2);
return \"{l|lwz} %0,%1(%2)\";
}"
@ -9204,7 +9204,7 @@ operands[2] = GEN_INT (INTVAL (operands[1]) >> 32);
{
char buf[30];
ASM_GENERATE_INTERNAL_LABEL (buf, \"LCTOC\", 1);
operands[1] = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1));
operands[1] = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
operands[2] = gen_rtx_REG (Pmode, 2);
return \"ld %0,%1(%2)\";
}"

View file

@ -1,3 +1,11 @@
2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
* lex.c (mark_impl_file_chain): Delete.
(init_parse): Remove call to ggc_add_string_root. No need to
ggc_strdup a string constant. Do not add impl_file_chain to GC
roots.
(handle_pragma_implementation): No need to ggc_strdup main_filename.
2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
@ -101,7 +109,7 @@
(cp_dump_tree): New function.
* pt.c (add_maybe_template): Remove.
* typeck.c (strip_array_types): Likewise.
2000-11-07 Eric Christopher <echristo@redhat.com>
* decl.c (init_decl_processing): Change definition of
@ -631,7 +639,7 @@ Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
* ir.texi: Add more documentation.
* ir.texi: Add more documentation.
2000-09-11 Mark Mitchell <mark@codesourcery.com>

View file

@ -55,7 +55,6 @@ static int interface_strcmp PARAMS ((const char *));
static int *init_cpp_parse PARAMS ((void));
static void init_reswords PARAMS ((void));
static void init_cp_pragma PARAMS ((void));
static void mark_impl_file_chain PARAMS ((PTR));
static tree parse_strconst_pragma PARAMS ((const char *, int));
static void handle_pragma_vtable PARAMS ((cpp_reader *));
@ -137,11 +136,6 @@ struct impl_files
static struct impl_files *impl_file_chain;
/* The string used to represent the filename of internally generated
tree nodes. The variable, which is dynamically allocated, should
be used; the macro is only used to initialize it. */
static const char *internal_filename;
#define INTERNAL_FILENAME ("<internal>")
/* Return something to represent absolute declarators containing a *.
TARGET is the absolute declarator that the * contains.
@ -708,9 +702,7 @@ init_parse (filename)
set_identifier_size (sizeof (struct lang_identifier));
decl_printable_name = lang_printable_name;
internal_filename = ggc_alloc_string (INTERNAL_FILENAME,
sizeof (INTERNAL_FILENAME));
input_filename = internal_filename;
input_filename = "<internal>";
init_reswords ();
init_pragma ();
@ -764,10 +756,6 @@ init_parse (filename)
token_count = init_cpp_parse ();
interface_unknown = 1;
ggc_add_string_root (&internal_filename, 1);
ggc_add_root (&impl_file_chain, 1, sizeof (impl_file_chain),
mark_impl_file_chain);
return init_c_lex (filename);
}
@ -953,23 +941,6 @@ set_yydebug (value)
#endif
}
/* Mark ARG (which is really a struct impl_files **) for GC. */
static void
mark_impl_file_chain (arg)
void *arg;
{
struct impl_files *ifs;
ifs = *(struct impl_files **) arg;
while (ifs)
{
ggc_mark_string (ifs->filename);
ifs = ifs->next;
}
}
/* Helper function to load global variables with interface
information. */
@ -1219,7 +1190,7 @@ handle_pragma_implementation (dfile)
if (ifiles == 0)
{
ifiles = (struct impl_files*) xmalloc (sizeof (struct impl_files));
ifiles->filename = ggc_alloc_string (main_filename, -1);
ifiles->filename = main_filename;
ifiles->next = impl_file_chain;
impl_file_chain = ifiles;
}

View file

@ -454,8 +454,6 @@ dbxout_init (asm_file, input_file_name, syms)
and output them all, except for those already output. */
dbxout_typedefs (syms);
ggc_add_string_root ((char **) &lastfile, 1);
}
/* Output any typedef names for types described by TYPE_DECLs in SYMS,

View file

@ -11029,9 +11029,6 @@ dwarf2out_line (filename, line)
/* Emit the .file and .loc directives understood by GNU as. */
if (lastfile == 0 || strcmp (filename, lastfile))
{
if (lastfile == 0)
ggc_add_string_root ((char **) &lastfile, 1);
fprintf (asm_out_file, "\t.file 0 \"%s\"\n", filename);
lastfile = filename;
}

View file

@ -504,7 +504,7 @@ create_rethrow_ref (region_num)
char buf[60];
ASM_GENERATE_INTERNAL_LABEL (buf, "LRTH", region_num);
ptr = ggc_alloc_string (buf, -1);
ptr = ggc_strdup (buf);
def = gen_rtx_SYMBOL_REF (Pmode, ptr);
SYMBOL_REF_NEED_ADJUST (def) = 1;

View file

@ -1,3 +1,8 @@
2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
* lex.c (ffelex_hash_): Change ggc_alloc_string (var, -1) to
ggc_strdup (var).
Thu Nov 16 23:14:07 2000 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* malloc.c (malloc_init): Call xmalloc, not malloc.

View file

@ -1317,7 +1317,7 @@ ffelex_hash_ (FILE *finput)
lineno = l;
if (ffelex_kludge_flag_)
input_filename = ggc_alloc_string (ffelex_token_text (token), -1);
input_filename = ggc_strdup (ffelex_token_text (token));
else
{
wf = ffewhere_file_new (ffelex_token_text (token),

View file

@ -224,7 +224,6 @@ ggc_mark_rtx_children (r)
break;
case CODE_LABEL:
ggc_mark_rtx (LABEL_REFS (r));
ggc_mark_string (LABEL_ALTERNATE_NAME (r));
break;
case LABEL_REF:
ggc_mark_rtx (LABEL_NEXTREF (r));
@ -252,11 +251,6 @@ ggc_mark_rtx_children (r)
break;
default:
if (NOTE_LINE_NUMBER (r) >= 0)
{
case NOTE_INSN_DELETED_LABEL:
ggc_mark_string (NOTE_SOURCE_FILE (r));
}
break;
}
break;
@ -354,10 +348,6 @@ ggc_mark_trees ()
ggc_mark_tree (TREE_IMAGPART (t));
break;
case STRING_CST:
ggc_mark_string (TREE_STRING_POINTER (t));
break;
case PARM_DECL:
ggc_mark_rtx (DECL_INCOMING_RTL (t));
break;
@ -367,7 +357,6 @@ ggc_mark_trees ()
break;
case IDENTIFIER_NODE:
ggc_mark_string (IDENTIFIER_POINTER (t));
lang_mark_tree (t);
continue;
@ -379,7 +368,6 @@ ggc_mark_trees ()
switch (TREE_CODE_CLASS (code))
{
case 'd': /* A decl node. */
ggc_mark_string (DECL_SOURCE_FILE (t));
ggc_mark_tree (DECL_SIZE (t));
ggc_mark_tree (DECL_SIZE_UNIT (t));
ggc_mark_tree (DECL_NAME (t));

View file

@ -40,7 +40,9 @@ union tree_node;
struct varasm_status;
/* Constants for general use. */
extern const char empty_string[];
extern const char empty_string[]; /* empty string */
extern const char digit_vector[]; /* "0" .. "9" */
#define digit_string(d) (digit_vector + ((d) * 2))
/* Trees that have been marked, but whose children still need marking. */
extern varray_type ggc_pending_trees;
@ -54,9 +56,6 @@ void ggc_add_tree_varray_root PARAMS ((struct varray_head_tag **, int nelt));
void ggc_add_tree_hash_table_root PARAMS ((struct hash_table **, int nelt));
void ggc_del_root PARAMS ((void *base));
/* Temporary */
#define ggc_add_string_root(ptr, nelt) /* nothing */
/* Mark nodes from the gc_add_root callback. These functions follow
pointers to mark other objects too. */
extern void ggc_mark_rtx_varray PARAMS ((struct varray_head_tag *));
@ -93,9 +92,6 @@ extern void ggc_mark_rtvec_children PARAMS ((struct rtvec_def *));
ggc_mark_rtvec_children (v__); \
} while (0)
/* Temporary */
#define ggc_mark_string(EXPR) /* nothing */
#define ggc_mark(EXPR) \
do { \
const void *a__ = (EXPR); \

View file

@ -1,3 +1,7 @@
2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
* parse.y (goal): Remove call to ggc_add_string_root.
2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
* jcf-parse.c (get_constant), parse.y (do_merge_string_cste):

View file

@ -600,7 +600,6 @@ goal:
ggc_add_tree_root (&package_list, 1);
ggc_add_tree_root (&current_this, 1);
ggc_add_tree_root (&currently_caught_type_list, 1);
ggc_add_string_root (&cyclic_inheritance_report, 1);
ggc_add_root (&ctxp, 1,
sizeof (struct parser_ctxt *),
mark_parser_ctxt);

View file

@ -1027,7 +1027,7 @@ init_edge_profiler ()
/* Generate and save a copy of this so it can be shared. */
char buf[20];
ASM_GENERATE_INTERNAL_LABEL (buf, "LPBX", 2);
profiler_label = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1));
profiler_label = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
ggc_add_rtx_root (&profiler_label, 1);
}
@ -1124,10 +1124,8 @@ output_func_start_profiler ()
/* Actually generate the code to call __bb_init_func. */
ASM_GENERATE_INTERNAL_LABEL (buf, "LPBX", 0);
table_address = force_reg (Pmode,
gen_rtx_SYMBOL_REF (Pmode,
ggc_alloc_string (buf, -1)));
emit_library_call (gen_rtx_SYMBOL_REF
(Pmode, ggc_alloc_string ("__bb_init_func", 14)), 0,
gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)));
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__bb_init_func"), 0,
mode, 1, table_address, Pmode);
expand_function_end (input_filename, lineno, 0);

View file

@ -393,9 +393,6 @@ struct stmt_status
/* Non-zero if we are using EH to handle cleanus. */
static int using_eh_for_cleanups_p = 0;
/* Character strings, each containing a single decimal digit. */
static const char *digit_strings[10];
static int n_occurrences PARAMS ((int, const char *));
static void expand_goto_internal PARAMS ((tree, rtx, rtx));
static int expand_fixup PARAMS ((tree, rtx, rtx));
@ -597,18 +594,7 @@ mark_stmt_status (p)
void
init_stmt ()
{
int i;
char buf[2];
gcc_obstack_init (&stmt_obstack);
buf[1] = 0;
for (i = 0; i < 10; i++)
{
buf[0] = '0' + i;
digit_strings[i] = ggc_alloc_string (buf, 1);
}
ggc_add_string_root (digit_strings, 10);
}
void
@ -1809,7 +1795,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
ASM_OPERANDS_INPUT (body, ninputs - ninout + i)
= output_rtx[j];
ASM_OPERANDS_INPUT_CONSTRAINT_EXP (body, ninputs - ninout + i)
= gen_rtx_ASM_INPUT (inout_mode[i], digit_strings[j]);
= gen_rtx_ASM_INPUT (inout_mode[i], digit_string (j));
}
generating_concat_p = old_generating_concat_p;

View file

@ -40,6 +40,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* The "" allocated string. */
const char empty_string[] = "";
/* Character strings, each containing a single decimal digit.
Written this way to save space. */
const char digit_vector[] = {
'0', 0, '1', 0, '2', 0, '3', 0, '4', 0,
'5', 0, '6', 0, '7', 0, '8', 0, '9', 0
};
static struct obstack string_stack;
/* This is the hash entry associated with each string. It lives in
@ -262,6 +269,8 @@ ggc_alloc_string (contents, length)
if (length == 0)
return empty_string;
if (length == 1 && contents[0] >= '0' && contents[0] <= '9')
return digit_string (contents[0] - '0');
str = alloc_string (contents, length, INSERT);
return str->ptr;

View file

@ -171,7 +171,6 @@ static void output_lang_identify PARAMS ((FILE *)) ATTRIBUTE_UNUSED;
static void compile_file PARAMS ((const char *));
static void display_help PARAMS ((void));
static void display_target_options PARAMS ((void));
static void mark_file_stack PARAMS ((void *));
static void decode_d_option PARAMS ((const char *));
static int decode_f_option PARAMS ((const char *));
@ -1503,26 +1502,6 @@ decl_name (decl, verbosity)
return IDENTIFIER_POINTER (DECL_NAME (decl));
}
/* Mark P for GC. Also mark main_input_filename and input_filename. */
static void
mark_file_stack (p)
void *p;
{
struct file_stack *stack = *(struct file_stack **)p;
/* We're only called for input_file_stack, so we can mark the current
input_filename here as well. */
ggc_mark_string (main_input_filename);
ggc_mark_string (input_filename);
while (stack)
{
ggc_mark_string (stack->name);
stack = stack->next;
}
}
/* This calls abort and is used to avoid problems when abort if a macro.
It is used when we need to pass the address of abort. */
@ -2183,7 +2162,6 @@ compile_file (name)
/* Initialize data in various passes. */
init_obstacks ();
init_tree_codes ();
name = init_parse (name);
init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE
@ -2251,7 +2229,7 @@ compile_file (name)
#endif
if (name != 0)
name = ggc_alloc_string (name, strlen (name));
name = ggc_strdup (name);
input_filename = name;
@ -4584,8 +4562,6 @@ main (argc, argv)
/* Initialize the garbage-collector. */
init_ggc ();
init_stringpool ();
ggc_add_root (&input_file_stack, 1, sizeof input_file_stack,
mark_file_stack);
ggc_add_rtx_root (&stack_limit_rtx, 1);
ggc_add_tree_root (&current_function_decl, 1);
ggc_add_tree_root (&current_function_func_begin_label, 1);

View file

@ -179,12 +179,6 @@ static void finish_vector_type PARAMS((tree));
void (*lang_unsave) PARAMS ((tree *));
void (*lang_unsave_expr_now) PARAMS ((tree));
/* The string used as a placeholder instead of a source file name for
built-in tree nodes. The variable, which is dynamically allocated,
should be used; the macro is only used to initialize it. */
static const char *built_in_filename;
#define BUILT_IN_FILENAME ("<built-in>")
tree global_trees[TI_MAX];
tree integer_types[itk_none];
@ -249,18 +243,6 @@ perm_calloc (nelem, size)
return rval;
}
/* Init the tables indexed by tree code.
Note that languages can add to these tables to define their own codes. */
void
init_tree_codes ()
{
built_in_filename
= ggc_alloc_string (BUILT_IN_FILENAME, sizeof (BUILT_IN_FILENAME));
ggc_add_string_root (&built_in_filename, 1);
}
/* Compute the number of bytes occupied by 'node'. This routine only
looks at TREE_CODE and, if the code is TREE_VEC, TREE_VEC_LENGTH. */
size_t
@ -417,7 +399,7 @@ make_node (code)
DECL_IN_SYSTEM_HEADER (t) = in_system_header;
DECL_SOURCE_LINE (t) = lineno;
DECL_SOURCE_FILE (t) =
(input_filename) ? input_filename : built_in_filename;
(input_filename) ? input_filename : "<built-in>";
DECL_UID (t) = next_decl_uid++;
/* Note that we have not yet computed the alias set for this
declaration. */

View file

@ -2645,7 +2645,6 @@ extern tree type_hash_lookup PARAMS ((unsigned int, tree));
extern void type_hash_add PARAMS ((unsigned int, tree));
extern unsigned int type_hash_list PARAMS ((tree));
extern int simple_cst_list_equal PARAMS ((tree, tree));
extern void init_tree_codes PARAMS ((void));
extern void dump_tree_statistics PARAMS ((void));
extern void print_obstack_statistics PARAMS ((const char *,
struct obstack *));

View file

@ -319,7 +319,7 @@ named_section (decl, name, reloc)
abort ();
#endif
in_named_name = ggc_alloc_string (name, -1);
in_named_name = ggc_strdup (name);
in_section = in_named;
}
}
@ -1808,7 +1808,7 @@ assemble_static_space (size)
ASM_GENERATE_INTERNAL_LABEL (name, "LF", const_labelno);
++const_labelno;
namestring = ggc_alloc_string (name, -1);
namestring = ggc_strdup (name);
x = gen_rtx_SYMBOL_REF (Pmode, namestring);
@ -1864,7 +1864,7 @@ assemble_trampoline_template ()
/* Record the rtl to refer to it. */
ASM_GENERATE_INTERNAL_LABEL (label, "LTRAMP", 0);
name = ggc_alloc_string (label, -1);
name = ggc_strdup (label);
return gen_rtx_SYMBOL_REF (Pmode, name);
}
#endif
@ -2369,7 +2369,6 @@ mark_const_hash_entry (ptr)
while (desc)
{
ggc_mark_string ((const char *)desc->label);
ggc_mark_rtx (desc->rtl);
desc = desc->next;
}
@ -3176,7 +3175,7 @@ output_constant_def (exp, defer)
desc = record_constant (exp);
desc->next = const_hash_table[hash];
desc->label = ggc_alloc_string (label, -1);
desc->label = ggc_strdup (label);
const_hash_table[hash] = desc;
/* We have a symbol name; construct the SYMBOL_REF and the MEM. */
@ -3381,7 +3380,6 @@ mark_pool_constant (pc)
{
ggc_mark (pc);
ggc_mark_rtx (pc->constant);
ggc_mark_string (pc->label);
pc = pc->next;
}
}
@ -3693,7 +3691,7 @@ force_const_mem (mode, x)
++const_labelno;
desc->label = found = ggc_alloc_string (label, -1);
desc->label = found = ggc_strdup (label);
/* Add label to symbol hash table. */
hash = SYMHASH (found);
@ -4894,7 +4892,6 @@ init_varasm_once ()
mark_const_hash_entry);
ggc_add_root (&const_str_htab, 1, sizeof const_str_htab,
mark_const_str_htab);
ggc_add_string_root (&in_named_name, 1);
}
/* Extra support for EH values. */

View file

@ -352,10 +352,6 @@ xcoffout_source_file (file, filename, inline_p)
fprintf (file, "\n");
xcoff_current_include_file = filename;
}
if (!xcoff_lastfile)
ggc_add_string_root ((char **) &xcoff_lastfile, 1);
xcoff_lastfile = filename;
}
}