summaryrefslogtreecommitdiff
path: root/gcc/ggc-page.c
Commit message (Collapse)AuthorAgeFilesLines
* * cse.c: Fix formatting.kazu2002-01-051-3/+3
| | | | | | | | | | | | | | | | | * dwarf2asm.c: Likewise. * dwarf2out.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * function.c: Likewise. * gcov.c: Likewise. * gencheck.c: Likewise. * genrecog.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * global.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48570 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (duplicate_decls, push_parm_decl): Remove leadingneil2001-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | capital from diagnostics. * c-lex.c (cb_file_change): Similarly. * c-parse.in : Similarly. * cfgrtl.c (verify_flow_info): Similarly. * collect2.c: Similarly. * cppfiles.c (find_include_file): Similarly. * cppinit.c (cpp_handle_option): Similarly. * cpplex.c (cpp_spell_token): Similarly. * cppmain.c (do_preprocessing): Similarly. * gcc.c (translate_options, process_command, do_spec1, main, pfatal_execute): Similarly. * genattr.c (main): Similarly. * genattrtab.c (check_attr_test, operate_exp, simplify_test_exp, write_test_expr, main): Similarly. * gencodes.c (main): Similarly. * genconfig.c (main): Similarly. * genconstants.c (main): Similarly. * genemit.c (main): Similarly. * genextract.c (main): Similarly. * genflags.c (main): Similarly. * genopinit.c (main): Similarly. * genoutput.c (process_template, main): Similarly. * genpeep.c (main): Similarly. * genrecog.c (main): Similarly. * gensupport.c (is_predicable, identify_predicable_attribute, alter_predicate_for_insn, init_md_reader_args, main): Similarly. * ggc-page.c (alloc_anon): Similarly. * mips-tfile.c (add_string, add_procedure, add_file, read_line, parse_begin, parse_bend, parse_def, parse_end, parse_file, parse_stabs_common, parse_stabs, write_varray, write_object, read_seek, copy_object, main, error): Similarly. * profile.c (compute_branch_probabilities): Similarly. * reg-stack.c (check_asm_stack_operands): Similarly. * reload.c (find_reloads): Similarly. * reload1.c (spill_failure, failed_reload): Similarly. * rtl-error.c (_fatal_insn_not_found): Similarly. * toplev.c (read_integral_parameter, crash_signal, decode_f_option, set_target_switch, parse_options_and_default_flags) : Similarly. * tradcif.y (parse_number, yylex): Similarly. * tradcpp.c (main, fancy_abort): Similarly. * tree.c (tree_check_failed): Similarly. * varray.c (varray_check_failed): Similarly. * xcoffout.c (xcoff_output_standard_types): Similarly. cp: * call.c (build_java_interface_fn_ref): Similarly. * except.c (is_admissible_throw_operand): Similarly. * init.c (build_java_class_ref): Similarly. * xref.c (open_xref_file): Similarly. objc: * objc-act.c (get_object_ref, lookup_and_install_protocols, build_objc_string_object, objc_declare_alias, build_ivar_chain, finish_message_expr, build_protocol_expr, is_public, start_class): Similarly. testsuite: * objc.dg/alias.m: Update. * objc.dg/class-1.m: Update. * objc.dg/const-str-1.m: Update. * objc.dg/fwd-proto-1.m: Update. * objc.dg/id-1.m: Update. * objc.dg/super-class-1.m: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47518 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog.2, ChangeLog.3, ChangeLog.4, ChangeLog.5, ChangeLog,jsm282001-11-111-3/+3
| | | | | | | | | | | | cfg.c, cfganal.c, cfgcleanup.c, cfglayout.c, cfgloop.c, cfgrtl.c, collect2.c, combine.c, config.in, configure, configure.in, conflict.c, dwarf2out.c, dwarfout.c, except.c, final.c, flow.c, genattrtab.c, ggc-page.c, jump.c, lcm.c, predict.c, reg-stack.c, reload1.c, rtlanal.c, sched-rgn.c, toplev.c, unwind-dw2-fde.h: Fix spelling errors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46928 138bc75d-0d04-0410-961f-82ee72b054a4
* * calls.c: Fix formatting.kazu2001-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-decl.c: Likewise. * cfgcleanup.c: Likewise. * combine.c: Likewise. * cppfiles.c: Likewise. * cpplib.c: Likewise. * cppmacro.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * dwarf2out.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * integrate.c: Likewise. * libgcc2.c: Likewise. * loop.c: Likewise. * optabs.c: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reload1.c: Likewise. * reload.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * sched-rgn.c: Likewise. * sdbout.c: Likewise. * stmt.c: Likewise. * toplev.c: Likewise. * varasm.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46145 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (ggc_marked_p): Properly convert return to boolean.kenner2001-09-211-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45715 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (hashtab.h): Include.kenner2001-09-201-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | (int_const_binop): Remove FORSIZE arg and compute from type; all callers changed. Call size_int_type_wide for all single-word constants. (size_htab_hash, size_htab_eq): New functions. (size_int_type_wide): Rework to use hash table. * ggc-common.c (hashtab.h): Include. (struct d_htab_root): New struct. (d_htab_roots): New variable. (ggc_add_deletable_htab, ggc_htab_delete): New functions (ggc_mark_roots): Handle deletable htabs. * ggc-page.c (ggc_marked_p): New function. * ggc-simple.c (ggc_marked_p): Likewise. * ggc.h: Reformatting throughout. (ggc_marked_p, ggc_add_deletable_htab): New declarations. * tree.c (init_obstacks): Make type_hash_table a deletable root. (type_hash_add): Allocate struct type_hash from GC memory. (mark_hash_entry, mark_type_hash): Deleted. (type_hash_marked_p, type_hash_mark): New functions. * Makefile.in (ggc-common.o, fold-const.o): Include hashtab.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45710 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,gerald2001-08-221-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45105 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc.c: Fix comment formatting.kazu2001-08-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gccspec.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genemit.c: Likewise. * gengenrtl.c: Likewise. * genrecog.c: Likewise. * gensupport.c: Likewise. * ggc-page.c: Likewise. * global.c: Likewise. * graph.c: Likewise. * ifcvt.c: Likewise. * integrate.c: Likewise. * lcm.c: Likewise. * libgcc2.c: Likewise. * loop.c: Likewise. * mbchar.c: Likewise. * optabs.c: Likewise. * predict.c: Likewise. * prefix.c: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * reg-stack.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtlanal.c: Likewise. * rtl.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44837 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-page.c (size_lookup): Increase minimum allocation sizezack2001-05-311-5/+5
| | | | | | | | | to eight bytes. (ggc_print_statistics): Report size of each bin in bytes, not as its order; there is no longer a direct relationship. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42736 138bc75d-0d04-0410-961f-82ee72b054a4
* * 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