summaryrefslogtreecommitdiff
path: root/gcc/ggc-page.c
Commit message (Collapse)AuthorAgeFilesLines
* * sibcall.c (skip_copy_to_return_value): Callzack2001-02-201-10/+0
| | | | | | | | | | | | | | | | | | | | 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
* * ggc-page.c (alloc_annon): Call perror and correctly call exit.kenner2001-01-141-8/+12
| | | | | | | (alloc_page, ggc_alloc): Add casts to remove warnings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39008 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (USING_MALLOC_PAGE_GROUPS): New; set if not using mmap.rth2001-01-131-22/+186
| | | | | | | | | | | | | | | | (struct page_entry): Add group member. (struct page_group): New. (struct globals): Add page_groups member. (alloc_anon): Only define for using mmap; remove valloc call. (page_group_index): New. (set_page_group_in_use): New. (clear_page_group_in_use): New. (alloc_page): Implement USING_MALLOC_PAGE_GROUPS. (free_page, release_pages): Likewise. * configure.in (with-gc): Default to ggc-page always. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38992 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (alloc_page): Round up allocation size to one page.rth2001-01-131-4/+7
| | | | | | | Set e->order on extra pages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38990 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-01-11 Zack Weinberg <zack@wolery.stanford.edu>zack2001-01-121-36/+54
| | | | | | | | | | | | | | | | * aclocal.m4 (AC_FUNC_MMAP_ANYWHERE): Completely rewritten. Now defines HAVE_MMAP_DEV_ZERO and/or HAVE_MMAP_ANON depending which you have. (AC_FUNC_MMAP_FILE): Don't AC_REQUIRE AC_FUNC_MMAP_ANYWHERE. * configure.in: Set GGC to ggc-page if any of mmap_dev_zero, mmap_anon, and valloc is available. * ggc-page.c: Restructure ifdef logic to match new autoconf spec. Don't throw away the test page in init_ggc. * configure, config.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38934 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (max_alignment): New structure.mmitchel2001-01-081-13/+28
| | | | | | | | | (MAX_ALIGNMENT): New macro. (init_ggc): Use it to round up the sizes in the extra_order_size_table. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38791 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (NUM_EXTRA_ORDERS): Hardwire to zero for now.mmitchel2001-01-051-0/+11
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38717 138bc75d-0d04-0410-961f-82ee72b054a4
* Special-case tree_decl/tree_list allocations.mmitchel2001-01-041-34/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ggc-page.c (OBJECT_PER_PAGE): Reimplement. (OBJECT_SIZE): New macro. (NUM_EXTRA_ORDER): Likewise. (extra_order_size_table): New variable. (NUM_ORDERS): New macro. (objects_per_page_table): New variable. (object_size_table): New variable. (G.pages): Use NUM_ORDERS to bound the array. (G.page_tails): Likewise. (DIV_ROUND_UP): Remove. (BITMAP_SIZE): Use CEIL, instead of DIV_ROUND_UP. (alloc_page): Use OBJECT_SIZE. (size_lookup): Don't make it const. (ggc_alloc): Use OBJECT_SIZE. (ggc_set_mark): Likewise. (ggc_get_size): Likewise. (init_ggc): Set up the object_size_table, objects_per_page_table, and adjust size_lookup. (ggc_recalculate_in_use_p): Use CEIL, not DIV_ROUND_UP. (ggc_pop_context): Use NUM_ORDERS. (clear_marks): Likewise. (sweep_pages): Likewise. (poison_pages): Likewise. (ggc_print_statistics): Use OBJECT_SIZE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38692 138bc75d-0d04-0410-961f-82ee72b054a4
* * stringpool.c: New file.zack2000-11-171-5/+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-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* * ggc-page.c (alloc_page): If HAVE_MMAP_ANYWHERE and we'rezack2000-08-241-32/+54
| | | | | | | | | | | asked for one page, allocate GGC_QUIRE_SIZE of them and put the extras on the free list. (release_pages): Clean up. (ggc_set_mark): Don't adjust G.allocated here... (sweep_pages): ... do it here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35961 138bc75d-0d04-0410-961f-82ee72b054a4
* * bitmap.c (debug_bitmap_file): Cast pointers to PTR for printinglaw2000-07-231-6/+8
| | | | | | | | | | with %p. * ggc-page.c (debug_print_page_list, alloc_page, free_page, ggc_alloc): Likewise. * bb-reorder.c (dump_scope_forest_1): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35201 138bc75d-0d04-0410-961f-82ee72b054a4
* toplevel:zack2000-06-091-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* hangeLog:samuel2000-04-281-9/+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
* * Makefile.in (ggc-page.o): Now includes toplev.h.kenner2000-04-151-18/+16
| | | | | | | | | | | | | | | * ggc-page.c (toplev.h): Now included. (gc_time): Remove declaration. (ggc_collect): TIME now long. * toplev.c (parse_time, varasm_time, gc_time): Still global; all others static. * toplev.h (gc_time, parse_time, gc_time): New declarations. * cp/decl2.c (parse_time, varconst_time): Delete declarations. (finish_file): Delete LINENO declaration. START_TIME and THIS_TIME now long. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33169 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (rtunion_def): Constify member `rtstr'.ghazi2000-03-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* * flow.c (mark_regs_live_at_end): Delete unused variables.ghazi2000-02-101-1/+1
| | | | | | | | | | | | | | | * ggc-page.c (ggc_page_print_statistics): bzero -> memset. * integrate.c (copy_rtx_and_substitute): Wrap variable `alignment' in macro FRAME_GROWS_DOWNWARD. * stmt.c (expand_end_bindings): Delete unused variable. * unroll.c (iteration_info): Mark parameter `loop' with ATTRIBUTE_UNUSED. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31895 138bc75d-0d04-0410-961f-82ee72b054a4
* (struct globals): Likewise.mmitchel2000-01-231-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31574 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (struct page_entry): Make `context_depth' anmmitchel2000-01-231-4/+4
| | | | | | | `unsigned short'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31572 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-common.c: PROTO -> PARAMS.ghazi2000-01-171-12/+12
| | | | | | | | | | | | | | | | | | | | | * 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
* * aclocal.m4 (AC_FUNC_MMAP_ZERO): New macro.oliva2000-01-161-9/+9
| | | | | | | | | * configure.in (AC_FUNC_MMAP_ZERO): Use instead of AC_FUNC_MMAP. * ggc-page.c: Replace HAVE_MMAP with HAVE_MMAP_ZERO. * configure, config.in: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31444 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>zack1999-12-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | * 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
* * lcm.c (compute_laterin): Cast bb->aux to size_t not int.rth1999-11-301-2/+2
| | | | | | | | | (compute_nearerout): Likewise. * ggc-page.c (ggc_page_print_statistics): Explicitly cast size_t to unsigned long for formatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30728 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (struct page_entry): Remove save_num_free_objects.mmitchel1999-11-011-23/+59
| | | | | | | | | | | | | | | | (DIV_ROUND_UP): Robustify. (ggc_recalculate_in_use_p): New function. (release_pages): Don't inline it. (ggc_alloc_obj): Don't refuse to allocate objects on pages for outer contexts. (ggc_pop_context): Use ggc_recalculate_in_use_p. (clear_marks): Always save in_use_p. (sweep_pages): Use ggc_recalculate_in_use_p. (ggc_page_print_statistics): Avoid signed/unsigned comparisons. Release pages before counting statistics. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30314 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-common.c: Update pre-function commentary.rth1999-10-301-24/+34
| | | | | | | | | | | | | * 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-common.c (ggc_print_statistics): Make arguments to fprintfmmitchel1999-10-301-3/+6
| | | | | | | | match format string, even on 64-bit hosts. * gcc-page.c (ggc_page_print_statistics): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30274 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc.h (struct ggc_statistics): New type.mmitchel1999-10-291-0/+65
| | | | | | | | | | | | | | | | | | (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
* * ggc-page.c (poison_pages): Don't be overzealous.mmitchel1999-10-271-0/+8
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30209 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-page.c: Try MAP_ANON if we don't have MAP_ANONYMOUS.rearnsha1999-10-201-0/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30102 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (init_ggc): Work around SunOS unaligned mmap bug.rth1999-10-181-0/+20
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30070 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (MAP_FAILED): Provide default.rth1999-10-141-0/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29961 138bc75d-0d04-0410-961f-82ee72b054a4
* Simplified GC interface and other goodies.rth1999-10-131-145/+75
| | | | 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-7/+47
| | | | | | | | | | | | | | | | | | | | (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
* * ggc-page.c (GGC_ALWAYS_COLLECT): Fix typo when undef'ing.mmitchel1999-10-051-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29833 138bc75d-0d04-0410-961f-82ee72b054a4
* Include tm_p.h in ggc filesmeissner1999-10-051-0/+1
| | | | 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
* * ggc-page.c: Don't include <unistd.h> etc taken care ofrth1999-09-291-7/+4
| | | | | | | by "system.h". Include <sys/mman.h> afterward. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29713 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (GGC_MIN_LAST_ALLOCATED): New.rth1999-09-281-3/+7
| | | | | | | | (init_ggc): Use it instead of a constant. (ggc_collect): Bound allocated_last_gc by it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29685 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c: New file.rth1999-09-231-0/+1083
* Makefile.in (ggc-page.o): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29632 138bc75d-0d04-0410-961f-82ee72b054a4