From a8a05998deca5cf6fac99e9a9b6e8343ea3c1b3f Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Fri, 17 Nov 2000 17:31:13 +0000 Subject: 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 --- gcc/profile.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'gcc/profile.c') diff --git a/gcc/profile.c b/gcc/profile.c index d60b2b2..1525391 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -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); -- cgit v1.1