summaryrefslogtreecommitdiff
path: root/gcc/ggc-simple.c
Commit message (Collapse)AuthorAgeFilesLines
* * sibcall.c (skip_copy_to_return_value): Callzack2001-02-201-24/+1
| | | | | | | | | | | | | | | | | | | | identify_call_return_value here, and return orig_insn if it returns zero. Hardret and softret arguments now unnecessary. (call_ends_block_p): Don't call identify_call_return_value here. * ggc-common.c (ggc_mark_rtx_children): No need to mark 'S' or 's' slots in RTXen. * ggc-page.c, ggc-simple.c (ggc_mark_if_gcable): Delete function. * ggc.h (ggc_mark_if_gcable): Delete prototype. testsuite: * g77.dg: New directory. * g77.dg/20010216-1.f: New test case. * g77.dg/dg.exp: New driver. * lib/g77-dg.exp: New driver library. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39916 138bc75d-0d04-0410-961f-82ee72b054a4
* * stringpool.c: New file.zack2000-11-171-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ggc-common.c (ggc_mark_string_ptr, ggc_add_string_root): Delete. (ggc_alloc_string): Now in stringpool.o. * ggc-page.c, ggc-simple.c: Do not define or allocate empty_string. * ggc.h: Delete prototype of ggc_add_string_root. #define ggc_add_string_root and ggc_mark_string to nothing. Prototype init_stringpool and stringpool_statistics. (ggc_alloc_string): Returns a const char *. * tree.c (hash_table, do_identifier_warnings): Delete. (init_obstacks): Don't initialize the identifier hash table. (get_identifier, maybe_get_identifier, start_identifier_warnings, set_identifier_size): Now in stringpool.c. * tree.h (struct tree_string): Constify pointer field. (approx_sqrt): Prototype. * Makefile.in (stringpool.o): Add rule, mention in OBJS. * toplev.c (approx_sqrt): New function. (compile_file): Call stringpool_statistics if mem_report is on. (main): Call init_stringpool. * builtins.c (c_strlen), c-decl.c (finish_decl), c-lex.c (process_directive), c-typeck.c (constructor_asmspec, struct initializer_stack, start_init), except.c (create_rethrow_ref), stmt.c (digit_strings), toplev.c (decode_f_option), tree.c (built_in_filename), varasm,c (in_named_name, assemble_static_space, struct constant_descriptor, struct deferred_string, struct pool_constant, force_const_mem), i386.c (pic_label_name, global_offset_table_name), rs6000.c (rs6000_emit_prologue, rs6000_emit_epilogue) : Constify a char *. * c-common.c (combine_strings): Combine strings in scratch buffer, then pass to build_string. * optabs.c (init_libfuncs), profile.c (init_edge_profiler, output_func_start_profiler), stmt.c (init_stmt), alpha.c (alpha_need_linkage), arm.c (arm_encode_call_attribute), i386.c (load_pic_register), ia64.c (ia64_encode_section_info), rs6000.c (rs6000_encode_section_info): Create string in scratch buffer, then pass to ggc_alloc_string. * stmt.c (expand_asm_operands): If we must adjust the constraint strings, do so by creating a new one, not by modifying the old one in place. Constify some char *s. * config/pa/pa.c (hppa_encode_label): Drop unnecessary second argument. Create string in scratch buffer, then pass to ggc_alloc_string. * config/pa/pa-protos.h: Update prototype. * config/pa/elf.h, config/pa/pa.h, config/pa/som.h: hppa_encode_label takes only one argument. * c-parse.in (if_prefix): Find the filename and line number at $-2 and $-1 respectively. * diagnostic.c (error_recursion): Add missing newline, use fputs, translate string. cp: * lex.c (struct impl_files, internal_filename): Constify a char *. java: * jcf-parse.c (get_constant), parse.y (do_merge_string_cste): Create string in scratch buffer, then pass to build_string. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37514 138bc75d-0d04-0410-961f-82ee72b054a4
* * flags.h (time_report, mem_report): New global flags.zack2000-08-291-3/+49
| | | | | | | | | | | | | | | | | | | | | | | | * toplev.c: Define time_report and mem_report. (f_options): Add -ftime-report and -fmem-report. (compile_file): Turn on time_report if quiet_flag is off. Call ggc_print_statistics at very end if mem_report is on. * timevar.c (TIMEVAR_ENABLE): Examine time_report, not quiet_flag. * ggc-common.c (ggc_print_statistics): Rename to ggc_print_common_statistics; all callers changed. Scale quantities above 10K to kilobytes and above 10M to megabytes. * ggc-page.c (ggc_page_print_statistics): Rename to ggc_print_statistics. Report memory consumed by internal data structures for each allocation bucket. Scale quantities above 10K to kilobytes and above 10M to megabytes. * ggc-simple.c: Prototype debug_ggc_tree to avoid warning. Cast PTR_KEY(p) to unsigned long in fprintf call to avoid warning. Define tally_leaves always. (ggc_print_statistics): New function. * ggc.h: Adjust for renamed functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36049 138bc75d-0d04-0410-961f-82ee72b054a4
* toplevel:zack2000-06-091-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ggc-none.c, ggc-simple.c, ggc-page.c (ggc_alloc_obj): Rename it ggc_alloc, drop second argument, never clear returned memory. * ggc-common.c (ggc_alloc_string): Use ggc_alloc. (ggc_alloc_cleared): New. * ggc.h: Prototype ggc_alloc and ggc_alloc_cleared, not ggc_alloc_obj. Remove ggc_alloc macro. (ggc_alloc_rtx, ggc_alloc_rtvec, ggc_alloc_tree): Use ggc_alloc. * rtl.c (rtvec_alloc): Clear the vector always. (rtx_alloc): Clear the first word always. Remove dirty obstack tricks (this routine is no longer a bottleneck). * tree.c (make_node): Clear the new node always. (make_tree_vec): Likewise. (tree_cons): Clear the common structure always. (build1): Likewise; also, clear TREE_COMPLEXITY. * gengenrtl.c: Use puts wherever possible. Remove extra newlines. (gendef): Clear the first word of an RTX in the generator function, irrespective of ggc_p. Initialize '0' slots to NULL. (genlegend): Don't generate obstack_alloc_rtx routine, just a thin wrapper macro around obstack_alloc. * stmt.c (expand_fixup): Use ggc_alloc. * c-typeck.c (add_pending_init): Use ggc_alloc. * emit-rtl.c (init_emit_once): Clear CONST_DOUBLE_CHAIN(tem). * varasm.c (immed_double_const): Set CONST_DOUBLE_MEM(r) to const0_rtx when it is created. (immed_real_const_1): Set CONST_DOUBLE_CHAIN(r) to NULL_RTX if we are not in a function. * tree.c (tree_class_check_failed): Make second arg an int. * tree.h: Update prototype. cp: * call.c (add_candidate): Use ggc_alloc_cleared. * decl.c (lookup_label): Likewise. * lex.c (retrofit_lang_decl): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34478 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-simple.c (offsetof): Macro definition moved from here ...phdm2000-05-121-4/+0
| | | | | | | * system.h (offsetof): ... to here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33879 138bc75d-0d04-0410-961f-82ee72b054a4
* hangeLog:samuel2000-04-281-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33496 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (rtunion_def): Constify member `rtstr'.ghazi2000-03-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (emit_line_note_after, emit_line_note, emit_line_note_force, emit_note, decode_asm_operands): Constify. * cse.c (canon_hash): Likewise. * dbxout.c (dbxout_block): Likewise. * diagnostic.c (file_and_line_for_asm, v_error_for_asm, v_warning_for_asm): Likewise. * dwarfout.c (function_start_label): Likewise. * emit-rtl.c (emit_line_note_after, emit_line_note, emit_note, emit_line_note_force): Likewise. * final.c (last_filename, asm_insn_count, final_scan_insn, output_source_line): Likewise. * function.h (struct emit_status): Likewise. * gcse.c (hash_expr_1): Likewise. * genattr.c (gen_attr, main): Likewise. * genattrtab.c (struct function_unit, current_alternative_string, write_attr_valueq, n_comma_elts, next_comma_elt, attr_eq, attr_numeral, check_attr_test, check_attr_value, convert_set_attr_alternative, convert_set_attr, compute_alternative_mask, simplify_by_exploding, gen_attr, gen_unit): Likewise. * genflags.c (gen_insn): Likewise. * gengenrtl.c (type_from_format): Likewise. * genopinit.c (gen_insn): Likewise. * genoutput.c (n_occurrences, process_template, process_template): Likewise. * ggc-page.c (ggc_set_mark, ggc_mark_if_gcable, ggc_get_size): Likewise. * ggc-simple.c (ggc_set_mark, ggc_mark_if_gcable, ggc_get_size): Likewise. * ggc.h (ggc_mark_string, ggc_mark, ggc_mark_if_gcable, ggc_set_mark, ggc_get_size): Likewise. * objc/objc-act.c (build_module_descriptor, finish_objc): Likewise. * optabs.c (init_one_libfunc): Likewise. * output.h (assemble_start_function): Likewise. * recog.c (decode_asm_operands): Likewise. * toplev.c (rest_of_compilation): Likewise. * tree.h (emit_line_note_after, emit_line_note, emit_line_note_force): Likewise. * varasm.c (asm_output_bss, asm_output_aligned_bss, asm_emit_uninitialised, assemble_start_function, assemble_variable, const_hash, compare_constant_1, find_pool_constant, mark_constant_pool, assemble_alias): Likewise. * xcoffout.h (DBX_FINISH_SYMBOL): Likewise. * alpha/alpha.md (call_vms, call_value_vms): Likewise. * arm/aof.h (ASM_OUTPUT_ASCII): Likewise. * arm/aout.h (ASM_OUTPUT_ASCII): Likewise. * arm/arm-protos.h (output_ascii_pseudo_op, arm_dllexport_name_p, arm_dllimport_name_p): Likewise. * arm/arm.c (arm_encode_call_attribute, output_ascii_pseudo_op): Likewise. * arm/arm.h (ASM_OUTPUT_MI_THUNK): Likewise. * arm/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * arm/pe.c (arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport, arm_mark_dllimport, arm_pe_encode_section_info): Likewise. * arm/telf.h (ASM_OUTPUT_DEF_FROM_DECLS, ASM_FINISH_DECLARE_OBJECT): Likewise. * arm/thumb.c (thumb_function_prologue): Likewise. * arm/thumb.h (ASM_OUTPUT_ASCII): Likewise. * avr/avr.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * clipper/clix.h (ASM_OUTPUT_ASCII): Likewise. * fx80/fx80.h (ASM_OUTPUT_ASCII): Likewise. * i386/cygwin.h (ASM_OUTPUT_SECTION_NAME): Likewise. * i386/freebsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * i386/i386-interix.h (ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII, ASM_OUTPUT_SECTION_NAME): Likewise. * i386/i386-protos.h (asm_output_function_prefix): Likewise. * i386/i386.c (asm_output_function_prefix): Likewise. * i386/i386elf.h (ASM_OUTPUT_ASCII): Likewise. * i386/osfrose.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * i386/ptx4-i.h (ASM_OUTPUT_ASCII): Likewise. * i386/sco5.h (ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII, ASM_OUTPUT_SECTION_NAME): Likewise. * i386/sysv4.h (ASM_OUTPUT_ASCII): Likewise. * i860/paragon.h (ASM_OUTPUT_ASCII): Likewise. * i860/sysv3.h (ASM_OUTPUT_ASCII): Likewise. * m32r/m32r.c (m32r_encode_section_info): Likewise. * mcore-elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * mcore/mcore.c (mcore_encode_section_info): Likewise. * mips/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * mips/elf64.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * mips/iris6.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * mips/mips.h (ASM_OUTPUT_IDENT): Likewise. * mips/mips.md (movdi, movsi): Likewise. * mips/netbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * netbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * openbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise. * ptx4.h (ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII): Likewise. * rs6000/rs6000.c (rs6000_allocate_stack_space, output_epilog, output_mi_thunk, output_toc): Likewise. * rs6000/rs6000.md (movsi): Likewise. * rs6000/sysv4.h (ASM_OUTPUT_INT, ASM_OUTPUT_SECTION_NAME): Likewise. * tahoe/harris.h (ASM_OUTPUT_ASCII): Likewise. * v850/v850.c (print_operand, print_operand_address, v850_encode_data_area): Likewise. ch: * grant.c (globalize_decl): Constify a char*. cp: * decl2.c (finish_objects): Constify a char*. * method.c (emit_thunk): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32388 138bc75d-0d04-0410-961f-82ee72b054a4
* Update copyrightsghazi2000-01-171-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31465 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-common.c: PROTO -> PARAMS.ghazi2000-01-171-7/+7
| | | | | | | | | | | | | | | | | | | | | * ggc-page.c: Likewise. * ggc-simple.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * graph.c: Likewise. * gthr-win32.h: Likewise. * haifa-sched.c: Likewise. * halfpic.h: Likewise. * integrate.c: Likewise. * integrate.h: Likewise. * jump.c: Likewise. * lcm.c: Likewise. * local-alloc.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31458 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>zack1999-12-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | * acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING, GC_CHECKING, GC_ALWAYS_COLLECT. * configure.in: Allow --enable-checking with an argument listing check modes to enable. * config.in, configure: Rebuilt. * ggc-page.c, ggc-simple.c: Define GGC_POISON (and GGC_ALWAYS_VERIFY for ggc-simple.c) only if ENABLE_GC_CHECKING. Define GGC_ALWAYS_COLLECT only if ENABLE_GC_ALWAYS_COLLECT. * rtl.h, rtl.c: Change ENABLE_CHECKING to ENABLE_RTL_CHECKING throughout. * tree.h, tree.c: Change ENABLE_CHECKING to ENABLE_TREE_CHECKING throughout. * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING throughout. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31093 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-12-23 Zack Weinberg <zack@wolery.cumb.org>zack1999-12-231-1/+0
| | | | | | | | | | | | | * Makefile.in (ggc-simple.c, ggc-page.c): Don't depend on hash.h. (cse.c): Don't depend on hashtab.h. * cse.c: Don't include hashtab.h. (hash_cse_reg_info, cse_reg_info_equal_p): Delete prototypes of dead functions. * ggc-simple.c: Don't include hash.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31080 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-common.c: Update pre-function commentary.rth1999-10-301-0/+12
| | | | | | | | | | | | | * ggc-page.c: Likewise. (poison): Remove. (poison_pages): Use memset directly. (ggc_alloc_obj): Likewise. Use a different pattern than poison_pages. (ggc_collect): Poison before sweeping. * ggc-simple.c: Update pre-function commentary. (ggc_alloc_obj): Poison non-zeroed memory. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30275 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc.h (struct ggc_statistics): New type.mmitchel1999-10-291-0/+9
| | | | | | | | | | | | | | | | | | (ggc_get_size): New function. (ggc_print_statistics): Likewise. * ggc-common.c (ggc_stats): New variable. (ggc_mark_rtx_children): Keep statistics. (ggc_mark_tree_children): Likewise. (ggc_print_statistics): New function. * ggc-page.c (struct globals): Add bytes_mapped field. (alloc_anon): Update it. (release_pages): Likewise. (ggc_get_size): New function. (ggc_page_print_statistics): New function. * ggc-simple.c (ggc_get_size): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30251 138bc75d-0d04-0410-961f-82ee72b054a4
* Simplified GC interface and other goodies.rth1999-10-131-568/+304
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29946 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc.h (ggc_push_context): Fix comment.mmitchel1999-10-111-1/+69
| | | | | | | | | | | | | | | | | | | | (ggc_pop_context): Likewise. (mark_string_if_gcable): Likewise. * ggc-common.c (ggc_mark_rtx_children): Use ggc_mark_string_if_gcable. * ggc-page.c (ggc_lookup_page_table): New function. (ggc_allocated_p): Likewise. (mark_obj): Fix formatting. (ggc_mark_string_if_gcable): New function. * ggc-simple.c (ggc_allocated_strings): New variable. (ggc_strings_used): Likewise. (ggc_compare_addresses): New function. (ggc_pop_context): Pop the `any' memory too. (ggc_mark_string_if_gcable): New function. (ggc_collect): Initialize and tear down ggc_allocated_strings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29897 138bc75d-0d04-0410-961f-82ee72b054a4
* Initialize empty_string in ggc-simple.crux1999-10-071-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29856 138bc75d-0d04-0410-961f-82ee72b054a4
* Include tm_p.h in ggc filesmeissner1999-10-051-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29825 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-none.c (ggc_alloc_rtvec): An rtvec is an array of rtx,law1999-10-041-1/+1
| | | | | | | | | not an array of rtunion. * gcc-page.c (ggc_alloc_rtvec): Similarly. * gcc-simple (ggc_free_rtvec): Similarly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29793 138bc75d-0d04-0410-961f-82ee72b054a4
* Various fixes for problems discovered stress-testing GC.samuel1999-09-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | * config/i386/i386.c (pic_label_name): Change to char pointer. (global_offset_table): New variable. (load_pic_register): Fill global_offset_table if it hasn't already been done. Allocate pic_label_name dynamically. * ggc.h (empty_string): New variable. * ggc-simple.c (empty_string): Likewise. (init_ggc): Allocate empty_string and add as root. * stmt.c (digit_strings): New variable. (init_stmt): Add last_block_end_note as root. Allocate and initialize digit_strings. (expand_asm_operands): Use empty_string and digit_string instead of string constants. * profile.c (init_arc_profiler): Allocate with ggc_alloc_string instead of xmalloc. (output_func_start_profiler): Likewise. * c-typeck.c (digest_init): Check if init is error_mark_node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29575 138bc75d-0d04-0410-961f-82ee72b054a4
* Thu Sep 16 11:50:52 1999 Alex Samuel <samuel@codesourcery.com>rth1999-09-161-12/+1
| | | | | | | | | | | | | | | | | | | * ggc.h (ggc_root): Move to ggc-common.c. (roots): Remove. (ggc_mark_rtx, ggc_mark_tree): Change to macro. (ggc_mark_rtvec, ggc_mark_tree_varray): Declare extern. (ggc_mark_tree_hash_table, ggc_mark_string, ggc_mark): Likewise. (ggc_mark_roots, ggc_mark_rtx_children, ggc_mark_tree_children): New. * ggc-common.c (ggc_root): Move from ggc.h. (roots): Declare, static. (ggc_mark_rtx, ggc_mark_tree): Renamed to... (ggc_mark_rtx_children, ggc_mark_tree_children): Don't check for null or check/set mark bit. (ggc_mark_roots): New. * ggc-simple.c (ggc_collect): Call ggc_mark_roots. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29461 138bc75d-0d04-0410-961f-82ee72b054a4
* * aclocal.m4 (AC_GCC_C_LONG_DOUBLE): New macro.ghazi1999-09-151-0/+4
| | | | | | | | | | | * configure.in (AC_GCC_C_LONG_DOUBLE): Call it. * gansidecl.h (HAVE_LONG_DOUBLE): Define if gcc for stage2. * ggc-simple.c (HAVE_LONG_DOUBLE): Test before using long double. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29432 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-simple.c (ggc_pop_context): Fold outstanding bytes intorth1999-09-121-2/+4
| | | | | | | surrounding context. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29353 138bc75d-0d04-0410-961f-82ee72b054a4
* Update copyright.rth1999-09-111-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29282 138bc75d-0d04-0410-961f-82ee72b054a4
* Alex Samuel <samuel@codesourcery.com>rth1999-09-111-389/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ggc.h (rtvec_def): Forward declare. (tree_node): Likewise. (ggc_root): Define. (roots): Declare. (ggc_set_mark_rtx): Add prototype. (ggc_set_mark_rtvec): Likewise. (ggc_set_mark_tree): Likewise. * ggc-simple.c (ggc_root): Don't define. (roots): Don't declare. (ggc_mark_rtx): Remove. (ggc_mark_rtvec): Likewise. (ggc_mark_tree): Likewise. (ggc_mark_varray): Likewise. (ggc_mark_tree_hash_table_entry): Likewise. (ggc_mark_tree_hash_table): Likewise. (ggc_set_mart_rtx): New function. (ggc_set_mark_rtvec): Likewise. (ggc_set_mark_tree): Likewise. (ggc_add_root): Remove. (ggc_add_rtx_root): Likewise. (ggc_remove_tree_root): Likewise. (ggc_add_string_root): Likewise. (ggc_add_tree_varray_root): Likewise. (ggc_add_tree_hash_table_root): Likewise. (ggc_del_root): Likewise. (ggc_mark_rtx_ptr): Likewise. (ggc_mark_tree_ptr): Likewise. (ggc_mark_string_ptr): Likewise. (ggc_mark_tree_varray_ptr): Likewise. (ggc_mark_tree_hash_table_ptr): Likewise. * ggc-common.c: New file. * Makefile.in (OBJS): Add ggc-common.o. (ggc-common.o): List dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29281 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc.h (lang_cleanup_tree): Remove.mmitchel1999-09-091-8/+0
| | | | | | | | | | | | * gcc-simple.c (ggc_free_tree): Don't call lang_cleanup_tree. * ggc-callbacks.c (lang_cleanup_tree): Remove. * c-decl.c (finish_struct): Use ggc_alloc to allocate TYPE_LANG_SPECIFIC when garbage collecting. (lang_cleanup_tree): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29242 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-simple.c (IS_MARKED, IGNORE_MARK): New.rth1999-09-091-21/+63
| | | | | | | | | | | | | | | | (GGC_ANY_MAGIC, GGC_ANY_MAGIC_MARK): New. (struct ggc_any): Replace `mark' with `magic_mark'. (ggc_alloc_string): Use memcpy, not bcopy. (ggc_alloc_any): Set magic_mark. Update bytes_alloced_since_gc. (ggc_free_{rtx,rtvec,tree,string}): Mark inline. (ggc_free_any): New. (ggc_mark_string): Use IGNORE_MARK. Calc back to struct gcc_string. (ggc_mark): Use IGNORE_MARK. Abort if magic doesn't match. (ggc_collect): Re-enable collection avoidance. Use GGC_ANY_MARK. Use IS_MARKED. Use ggc_free_any. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29231 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (SUBST): Break out to a real function do_SUBST.rth1999-09-091-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (SUBST_INT): Likewise. * gcse.c (free_pre_mem): Free `temp_bitmap'. (pre_insert): Free `inserted'. * loop.c (basic_induction_var): Always set `location'. * function.c (expand_function_end): Add initial_trampoline as a root. * rtl.h (init_varasm_once): Declare. * toplev.c (compile_file): Call it. * ggc-simple.c (ggc_mark_string_ptr): New. (ggc_add_string_root): New. (ggc_collect): Disable collection avoidance temporarily. * ggc.h (ggc_add_string_root): Declare. * except.c (create_rethrow_ref): Use ggc_alloc_string. * optabs.c (init_libfuncs): Likewise. * varasm.c (named_section): Use ggc_alloc_string. (make_function_rtl): Likewise. (make_decl_rtl): Likewise. (assemble_static_space): Likewise. (assemble_trampoline_template): Likewise. (output_constant_def): Likewise. (force_const_mem): Likewise. (mark_const_hash_entry): New. (mark_pool_sym_hash_table): New. (mark_varasm_state): Use it. (init_varasm_once): New. * expr.h (init_one_libfunc): Declare. * optabs.c (init_one_libfunc): New. (init_optabs): Use it. * config/gofast.h: Likewise. * config/sparc/sol2.h (INIT_SUBTARGET_OPTABS): Likewise. * config/sparc/sparc.h (INIT_TARGET_OPTABS): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29226 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc.h (ggc_alloc): New function.mmitchel1999-09-091-3/+83
| | | | | | | | | | | | | (ggc_mark): Likewise. * ggc-simple.c (ggc_any): New structure. (ggc_status): Add anys. (n_anys_collected): New variable. (ggc_alloc): Define. (ggc_mark): Likewise. (ggc_collect): Collect the anys. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29222 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-simple.c (ggc_free_rtx): Poison the correct amountrth1999-09-081-1/+2
| | | | | | | for the rtx length. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29215 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-simple.c (init_ggc): Absorb the old init.rth1999-09-081-22/+17
| | | | | | | | | (ggc_push_context): Use xcalloc. (ggc_alloc_rtx, ggc_alloc_rtvec, ggc_alloc_tree): Likewise. (ggc_collect): Add [rvts] tags to the collection stats. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29206 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (free_emit_status): Take decl as a parameter.mmitchel1999-09-071-36/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (init_emit_once): Add more GC roots. * except.c (mark_func_eh_entry): New function. (mark_eh_node): Mark false_label and rethrow_label. (init_eh): Add more GC roots. * function.c (free_after_compilation): Take decl as a paramter. Call free_stmt_status. (mark_function_state): Don't assume x_parm_reg_stack_loc is non-NULL. * function.h (free_after_compilation): Change prototype. (free_varasm_status): Likewise. (free_emit_status): Likewise. (free_stmt_status): New function. * ggc-simple.c (rtx, vecs, trees, strings, bytes_alloced_since_gc): Remove, replacing with ... (ggc_status): New structure. (ggc_chain): New variable. (init_gcc): Define. (ggc_push_context): New function. (ggc_pop_context): Likewise. (ggc_alloc_rtx): Adjust for use of ggc_chain. (ggc_alloc_rtvec): Likewise. (ggc_alloc_tree): Likewise. (ggc_alloc_string): Likewise. (ggc_mark_rtx): Mark NOTE_SOURCE_FILE and NOTE_RANGE_INFO. (ggc_mark_tree): Give language-dependent code a chance to mark `x' nodes. (ggc_mark_tree_varray): Handle empty arrays. (ggc_collect): Adjust for use of ggc_chain. Clear bytes_alloced_since_last_gc. * ggc.h (ggc_pop_context): New function. (ggc_push_context): Likewise. * print-tree.c (print_node): Don't print obstacks when GC'ing. * stmt.c (free_stmt_status): New function. (init_stmt_for_function): Clear last_expr_value. * toplev.c (rest_of_compilation): Always call free_after_compilation. Conditionalize call to ggc_collect. (main): Call init_ggc. * tree.c (push_obstacks): Do the push, even when GC'ing. (push_obstacks_nochange): Likewise. (pop_obstacks): Liekwise. * varasm.c (free_varasm_status): Take decl as a parameter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29170 138bc75d-0d04-0410-961f-82ee72b054a4
* Commit parts that were missing in Mark's last commitcrux1999-09-071-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29164 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (ggc-simple.o): Depend on hash.h.mmitchel1999-09-061-1/+48
| | | | | | | | | | | | | | | | | | * ggc.h (ggc_add_tree_hash_table_root): Declare. (ggc_mark_tree_varray): Likewise. (ggc_mark_tree_hash_table): Likewise. * ggc-simple.c: Include hash.h. (ggc_mark_tree_hash_table_ptr): New function. (ggc_mark_tree_hash_table_entry): Likewise. (ggc_mark_tree_hash_table): Likewise. (ggc_add_tree_hash_table_root): Likewise. * varray.h (const_equiv_data): Use struct rtx_def *, rather than * profile.c (output_func_start_profiler): Remove apparently nonsensical call to start_sequence. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29134 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (ggc-simple.o): Depend on varray.h.mmitchel1999-09-051-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (rtl.o): Depend on ggc.h. (genattrtab.o): Depend on ggc.h. (print-tree.o): Likewise. (fold-const.o): Likewise. * emit-rtl.c (sequence_element_free_list): Remove, and all references. (make_insn_raw): Don't cache insns when GC'ing. (emit_insn_before): Likewise. (emit_insn_after): Likewise. (emit_insn): Likewise. (start_sequence): Use xmalloc to allocate the sequence_stack. (end_sequence): Add free to free it. (gen_sequence): Don't cache insns when GC'ing. (clear_emit_caches): Don't use sequence_element_free_list. (init_emit): Use xcalloc, not xmalloc+bzero. * fold-const.c (size_int_wide): Kill the cache, when GC'ing. * function.c (pop_function_context_from): Use free to free the fixup_var_refs_queue. (put_reg_into_stack): Allocate it with xmalloc. * genattrtab.c: Include ggc.h. (operate_exp): Don't use obstack_free when GC'ing. (simplify_cond): Likewise. (simplify_text_exp): Likewise. (optimize_attrs): Likewise. * gengentrtl.c (gendef): Use ggc_alloc_rtx to allocate RTL, when GC'ing. (gencode): Generate a #include for ggc.h. * ggc-callbacks.c (ggc_p): Define it to zero. * ggc-none.c (ggc_p): Likewise. * ggc-simple.c: Include varray.h. (ggc_mark_tree_varray): New function. (ggc_add_tree_varray_root): Likewise. (ggc_mark_tree_varray_ptr): Likewise. * ggc.h (ggc_p): Declare. (varray_head_tag): Likewise. (ggc_add_tree_varray_root): Declare. * print-tree.c (print_node): Don't check for TREE_PERMANENT inconsistencies when GC'ing. * rtl.c: Include ggc.h. (rtvec_alloc): Use ggc_alloc_rtvec when GC'ing. (rtx_alloc): Use ggc_alloc_rtx when GC'ing. (rtx_free): Don't call obstack_free when GC'ing. * toplev.c (rest_of_compilation): Call ggc_collect after every pass, if GC'ing. * tree.c (push_obstacks): Do nothing, if GC'ing. (pop_obstacks_nochange): Likewise. (pop_obstacks): Likewise. (make_node): Use ggc_alloc_tree when GC'ing. (copy_node): Likewise. (get_identifier): Use ggc_alloc_string when GC'ing. (build_string): Likewise. (make_tree_vec): Use ggc_alloc_tree when GC'ing. (tree_cons): Likewise. (build1): Likewise. (type_hash_canon): Don't call obstack_free when GC'ing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29125 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-simple.c (ggc_root, ggc_collect): Wrap prototype with PROTO.ghazi1999-09-051-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29118 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (GGC, GGC_LIB): New.mmitchel1999-09-041-0/+714
(HOST_RTL): Include ggc-none.o. (ggc-simple.o): New target. (ggc-none.o): Likewise. * tree.h (tree_common): Add gc_mark. * rtl.h (struct rtx_def): Steal a bit from code to make gc_mark. (struct rtvec_def): Add gc_mark. * emit-rtl.c (global_rtl): Update static initializers to contain enough initializers. * ggc.h, ggc-none.c, ggc-simple.c: New files. * toplev.c (gc_time): New variable. (all_time): New variable. (compile_file): Print gc time. (print_time): Calculate percentage of the whole. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29106 138bc75d-0d04-0410-961f-82ee72b054a4