aboutsummaryrefslogtreecommitdiff
path: root/gcc/ggc-page.c
AgeCommit message (Collapse)AuthorFilesLines
2009-05-11basic-block.h (enum profile_status): Break out of struct control_flow_graph.Ian Lance Taylor1-5/+7
./: * basic-block.h (enum profile_status): Break out of struct control_flow_graph. * cgraph.h (struct inline_summary): Break out of struct cgraph_local_info. * cgraphunit.c (enum cgraph_order_sort_kind): New enum, broken out of struct cgraph_order_sort. * combine.c (enum undo_kind): New enum, broken out of struct undo. * cse.c (struct branch_path): Break out of struct cse_basic_block_data. * except.h (enum eh_region_type): Break out of struct eh_region. * gcc.c (enum add_del): Break out of struct modify_target. * genrecog.c (enum decision_type): Break out of struct decision_test. * ggc-page.c (struct ggc_pch_ondisk): Break out of struct ggc_pch_data. * matrix-reorg.c (struct free_info): Break out of struct matrix_info. * regmove.c (enum match_use): New enum, broken out of struct match. * sched-int.h (enum post_call_group): New enum, broken out of struct deps. (struct deps_reg): Break out of struct deps. * target.h (struct asm_int_op): Break out of struct gcc_target. * tree-eh.c (struct goto_queue_node): Break out of struct leh_tf_state. * tree-inline.h (enum copy_body_cge_which): Break out of copy_body_data. * tree-pass.h (enum opt_pass_type): Break out of struct opt_pass. * c-decl.c (in_struct, struct_types): New static variables. (pushtag): Add loc parameter. Change all callers. (lookup_tag): Add ploc parameter. Change all callers. (check_compound_literal_type): New function. (parser_xref_tag): Add loc parameter. Change all callers. If -Wc++-compat, warn about struct/union/enum types defined within a struct or union. (start_struct): Add enclosing_in_struct, enclosing_struct_types, and loc parameters. Change all callers. Change error calls to error_at, using loc. For a redefinition, if the location of the original definition is known, report it. Set in_struct and struct_types. If -Wc++-compat warn if in sizeof, typeof, or alignof. (finish_struct): Add new parameters enclosing_in_struct and enclosing_struct_types. Change all callers. Set C_TYPE_DEFINED_IN_STRUCT for all struct/union/enum types defined in the struct. If in a struct, add this struct to struct_types. (start_enum): Add loc parameter. Change all callers. Use error_at for errors, using loc. For a redefinition, if the location of the original definition is known, report it. If in a struct, add this enum type to struct_types. If -Wc++-compat warn if in sizeof, typeof, or alignof. * c-parser.c (disable_extension_diagnostics): Disable -Wc++-compat. (enable_extension_diagnostics): Reenable -Wc++-compat if appropriate. (c_parser_enum_specifier): Get enum location for start_enum. (c_parser_struct_or_union_specifier): Get struct location for start_struct. Save in_struct and struct_types status between start_struct and finish_struct. (c_parser_cast_expression): Get location of cast. (c_parser_alignof_expression): Get location of type. (c_parser_postfix_expression): Likewise. (c_parser_postfix_expression_after_paren_type): Add type_loc parameter. Change all callers. Call check_compound_literal_type. Use type_loc for error about variable size type. * c-typeck.c (build_external_ref): If -Wc++-compat, warn about a use of an enum constant from an enum type defined in a struct or union. (c_cast_expr): Add loc parameter. Change all callers. If -Wc++-compat, warn about defining a type in a cast. * c-tree.h (C_TYPE_DEFINED_IN_STRUCT): Define. (start_enum, start_struct, finish_struct): Update declarations. (parser_xref_tag, c_cast_expr): Update declarations. (check_compound_literal_type): Declare. fortran/: * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of gfc_omp_clauses. (enum gfc_omp_default_sharing): Likewise. * module.c (enum gfc_rsym_state): New enum, broken out of pointer_info. (enum gfc_wsym_state): Likewise. * parse.c (enum state_order): New enum, broken out of st_state. objc/: * objc-act.c (objc_building_struct): New static variable. (objc_in_struct, objc_struct_types): New static variables. (objc_start_struct, objc_finish_struct): New static functions. (generate_struct_by_value_array): Call objc_start_struct instead of start_struct, and call objc_finish_struct instead of finish_struct. (objc_build_struct, build_objc_symtab_template): Likewise. (build_module_descriptor): Likewise. (build_next_objc_exception_stuff): Likewise. (build_protocol_template): Likewise. (build_method_prototype_list_template): Likewise. (build_method_prototype_template): Likewise. (build_category_template, build_selector_template): Likewise. (build_class_template, build_super_template): Likewise. (build_ivar_template, build_ivar_list_template): Likewise. (build_method_list_template): Likewise. (build_method_template): Likewise. objcp/: * objcp-decl.h (start_struct): Add three new, ignored, macro parameters. (finish_struct): Add two new, ignored, macro parameters. testsuite/: * gcc.dg/Wcxx-compat-7.c: New testcase. * gcc.dg/Wcxx-compat-8.c: New testcase. * gcc.dg/c99-tag-1.c: Recognize new "originally defined here" notes * gcc.dg/pr17188-1.c: Likewise. * gcc.dg/pr39084.c: Likewise. From-SVN: r147358
2008-07-28backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch.Richard Biener1-4/+0
2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-11ggc-page.c (alloc_page): Substituting xmalloc...Angelo Graziosi1-2/+2
2008-07-11 Angelo Graziosi <angelo.graziosi@alice.it> * ggc-page.c (alloc_page): Substituting xmalloc, xcalloc with XNEWVEC and XCNEWVAR macros which add the needed casts. From-SVN: r137722
2008-06-29alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.Kaveh R. Ghazi1-1/+1
* alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings. * df-scan.c (df_notes_rescan): Likewise. * ggc-page.c (set_page_table_entry): Likewise. * intl.c (gcc_gettext_width): Likewise. * varasm.c (get_unnamed_section, get_noswitch_section, get_section): Likewise. From-SVN: r137245
2008-06-26driver-i386.c (detect_caches_amd, [...]): Fix -Wc++-compat and/or ↵Kaveh R. Ghazi1-17/+16
-Wcast-qual warnings. * config/i386/driver-i386.c (detect_caches_amd, detect_caches_intel, host_detect_local_cpu): Fix -Wc++-compat and/or -Wcast-qual warnings. *ggc-common.c (ggc_mark_roots, gt_pch_note_object, gt_pch_note_reorder, relocate_ptrs, write_pch_globals, gt_pch_save): Likewise. * ggc-page.c (push_depth, push_by_depth, alloc_anon, alloc_page, gt_ggc_m_S, clear_marks, ggc_pch_read): Likewise. * global.c (compute_regsets): Likewise. * graph.c (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Likewise. * haifa-sched.c (schedule_block, extend_h_i_d, extend_ready, unlink_bb_notes): Likewise. * integrate.c (get_hard_reg_initial_val): Likewise. * ipa-prop.c (ipa_push_func_to_list): Likewise. * ipa-struct-reorg.c (gen_var_name, gen_cluster_name): Likewise. * local-alloc.c (update_equiv_regs): Likewise. * loop-invariant.c (check_invariant_table_size, hash_invariant_expr, eq_invariant_expr, find_or_insert_inv): Likewise. * loop-iv.c (check_iv_ref_table_size, analyzed_for_bivness_p, altered_reg_used, mark_altered): Likewise. * loop-unroll.c (si_info_eq, ve_info_eq, allocate_basic_variable, insert_var_expansion_initialization, combine_var_copies_in_loop_exit, apply_opt_in_copies, release_var_copies): Likewise. * matrix-reorg.c (mat_acc_phi_hash, mat_acc_phi_eq, mtt_info_eq, analyze_matrix_decl, add_allocation_site, analyze_transpose, analyze_accesses_for_phi_node, check_var_notmodified_p, check_allocation_function, find_sites_in_func, record_all_accesses_in_func, transform_access_sites, transform_allocation_sites): Likewise. * omp-low.c (new_omp_region, create_omp_child_function_name, check_omp_nesting_restrictions, check_combined_parallel, lower_omp_2, diagnose_sb_1, diagnose_sb_2): Likewise. * optabs.c (no_conflict_move_test, gen_libfunc, gen_fp_libfunc, gen_intv_fp_libfunc, gen_interclass_conv_libfunc, gen_intraclass_conv_libfunc, set_optab_libfunc, set_conv_libfunc): Likewise. * opts-common.c (prune_options): Likewise. * opts.c (add_input_filename, print_filtered_help, get_option_state): Likewise. * params.c (add_params): Likewise. * passes.c (set_pass_for_id, next_pass_1, do_per_function_toporder, pass_fini_dump_file): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * predict.c (tree_predicted_by_p, tree_predict_edge, clear_bb_predictions, combine_predictions_for_bb): Likewise. From-SVN: r137134
2008-06-06cgraph.c: Fix typos in comments.Ralf Wildenhues1-1/+1
gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-05-21symtab.h (HT_ALLOCED): Remove.Tom Tromey1-1/+52
libcpp * include/symtab.h (HT_ALLOCED): Remove. (ht_purge): Declare. * symtab.c (DELETED): New define. (ht_lookup): Update comment. (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED code. Use subobject allocator for strings, if it exists. (ht_expand): Handle deleted entries. (ht_forall): Likewise. (ht_purge): New function. (ht_dump_statistics): Print deletion statistics. gcc * ggc-zone.c (lookup_page_table_if_allocated): New function. (zone_find_object_offset): Likewise. (gt_ggc_m_S): Likewise. (highest_bit): Likewise. * ggc-page.c (gt_ggc_m_S): New function. * stringpool.c (string_stack): Remove. (init_stringpool): Update. (ggc_alloc_string): Use ggc_alloc. (maybe_delete_ident): New function. (ggc_purge_stringpool): Likewise. (gt_ggc_m_S): Remove. * ggc-common.c (ggc_protect_identifiers): New global. (ggc_mark_roots): Call ggc_purge_stringpool. Use ggc_protect_identifiers. * ggc.h (ggc_protect_identifiers): Declare. (gt_ggc_m_S): Update. (ggc_purge_stringpool): Declare. * toplev.c (compile_file): Set and reset ggc_protect_identifiers. * gengtype.c (write_types_process_field) <TYPE_STRING>: Remove special case. (write_root): Cast gt_ggc_m_S to gt_pointer_walker. gcc/cp * mangle.c (save_partially_mangled_name): Remove. (restore_partially_mangled_name): Likewise. (write_encoding): Update. (write_unqualified_name): Likewise. (start_mangling): Always use name_obstack. Remove 'ident_p' argument. (get_identifier_nocopy): Remove. (finish_mangling_internal): Rename from finish_mangling. (finish_mangling): New function. (finish_mangling_get_identifier): Likewise. (partially_mangled_name, partially_mangled_name_len): Remove. (mangle_decl_string): Change return type. Update. (mangle_decl, mangle_type_string, mangle_special_for_type, mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable, mangle_ref_init_variable): Update. From-SVN: r135720
2008-02-19Support valgrind 3.3 for --enable-checking=valgrind.Hans-Peter Nilsson1-22/+11
* system.h: Consolidate ENABLE_VALGRIND_CHECKING-dependent defines here. [!VALGRIND_MAKE_MEM_NOACCESS]: Define as VALGRIND_MAKE_NOACCESS. [!VALGRIND_MAKE_MEM_DEFINED]: Define as VALGRIND_MAKE_READABLE. [!VALGRIND_MAKE_MEM_UNDEFINED]: Define as VALGRIND_MAKE_WRITABLE. * ggc-common.c: Remove ENABLE_VALGRIND_CHECKING-dependent defines. Replace use of VALGRIND_MAKE_READABLE, VALGRIND_MAKE_WRITABLE, and VALGRIND_MAKE_NOACCESS with VALGRIND_MAKE_MEM_DEFINED, VALGRIND_MAKE_MEM_UNDEFINED, and VALGRIND_MAKE_MEM_NOACCESS respectively. * ggc-zone.c: Similar. * ggc-page.c: Similar. From-SVN: r132407
2007-11-01ggc-page.c (extra_order_size_tab): Add bitmap_head size.Richard Guenther1-0/+1
2007-11-01 Richard Guenther <rguenther@suse.de> * ggc-page.c (extra_order_size_tab): Add bitmap_head size. From-SVN: r129833
2007-09-02ggc-page.c (ggc_pch_read): Call validate_free_objects.Laurynas Biveinis1-0/+3
2007-09-01 Laurynas Biveinis <laurynas.biveinis@gmail.com> * ggc-page.c (ggc_pch_read): Call validate_free_objects. From-SVN: r128023
2007-07-26Change copyright header to refer to version 3 of the GNU General Public ↵Nick Clifton1-5/+4
License and to point readers at the COPYING3 file and the FSF's license web page. From-SVN: r126948
2007-04-01emit-rtl.c (emit_insn_before_setloc): Do not ICE when asked to emit before ↵Jan Hubicka1-2/+2
very first instruction. * emit-rtl.c (emit_insn_before_setloc): Do not ICE when asked to emit before very first instruction. * ggc-page.c (ggc_print_statistics): Fix formatting string to avoid waring on 64bit hosts. * bitmap.h: Fix typo in bitmap_head_def. From-SVN: r123408
2006-11-28ggc-page.c (ggc_print_statistics): Use %ul and a cast to unsigned long for ↵Richard Guenther1-4/+6
printing OBJECT_SIZE. 2006-11-28 Richard Guenther <rguenther@suse.de> * ggc-page.c (ggc_print_statistics): Use %ul and a cast to unsigned long for printing OBJECT_SIZE. From-SVN: r119280
2006-07-25ggc-page.c (NUM_SIZE_LOOKUP): New constant - the length of the size_lookup[] ↵Nick Clifton1-8/+11
array. * ggc-page.c (NUM_SIZE_LOOKUP): New constant - the length of the size_lookup[] array. (ggc_alloc_stat): Use NUM_SIZE_LOOKUP. (ggc_pch_count_object): Likewise. (ggc_pch_alloc_object): Likewise. (ggc_pch_write_object): Likewise. (init_ggc): Do not attempt to initialize entries in the size_lookup[] array for objects whose size is greater than than the length of the array. From-SVN: r115738
2006-06-26ggc-page.c (init_ggc): Add missing element to size_lookup table.Richard Guenther1-49/+11
2006-06-26 Richard Guenther <rguenther@suse.de> * ggc-page.c (init_ggc): Add missing element to size_lookup table. Revert 2006-06-23 Richard Guenther <rguenther@suse.de> * ggc-page.c (init_ggc): Do not round up the extra_order_size_table sizes to MAX_ALIGNMENT. Fix the size_lookup table to honour alignment requests instead. Add verification code. Add struct tree_function_decl and struct tree_binfo size to extra_order_size_table. Add missing element to size_lookup table. From-SVN: r115007
2006-06-23ggc-page.c (init_ggc): Do not round up the extra_order_size_table sizes to ↵Richard Guenther1-13/+51
MAX_ALIGNMENT. 2006-06-23 Richard Guenther <rguenther@suse.de> * ggc-page.c (init_ggc): Do not round up the extra_order_size_table sizes to MAX_ALIGNMENT. Fix the size_lookup table to honour alignment requests instead. Add verification code. Add struct tree_function_decl and struct tree_binfo size to extra_order_size_table. Add missing element to size_lookup table. From-SVN: r114926
2006-06-21ggc-page.c (extra_order_size_table): Add var_ann_d, tree_ssa_name, ↵Richard Guenther1-0/+6
bitmap_element and phi_node with 4 arguments sizes. 2006-06-21 Richard Guenther <rguenther@suse.de> * ggc-page.c (extra_order_size_table): Add var_ann_d, tree_ssa_name, bitmap_element and phi_node with 4 arguments sizes. From-SVN: r114841
2006-06-19ggc-page.c (extra_order_size_tab): Add entries with size of struct function ↵Richard Guenther1-10/+27
and basic_block. 2006-06-19 Richard Guenther <rguenther@suse.de> * ggc-page.c (extra_order_size_tab): Add entries with size of struct function and basic_block. (size_lookup): Extend to cover sizes up to 511. (ggc_alloc_stat): Adjust user. (ggc_pch_count_object): Likewise. (ggc_pch_alloc_object): Likewise. (ggc_pch_write_object): Likewise. From-SVN: r114783
2006-01-31tree-vrp.c: Use XNEW/XCNEW allocation wrappers.Marcin Dalecki1-9/+9
2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
2005-09-07ggc-page.c (ggc_push_context): Remove.Mark Mitchell1-95/+0
* ggc-page.c (ggc_push_context): Remove. (ggc_pop_context): Likewise. * ggc.h (ggc_push_context): Remove. (ggc_pop_context): Likewise. From-SVN: r103979
2005-07-08Makefile.in (TREE_H): Add treestruct.def.Daniel Berlin1-1/+4
2005-07-08 Daniel Berlin <dberlin@dberlin.org> * Makefile.in (TREE_H): Add treestruct.def. (c-decl.o): Add pointer-set.h * c-decl.c (diagnose_mismatched_decls): Don't attempt to look at visibility on regular DECL's. (merge_decls): Fix the copying of decl nodes of various types for the new structures. Don't update RTL, section name, weak status, etc, on DECL's without RTL. (grokdeclarator): DECL_ARG_TYPE_AS_WRITTEN is gone. Don't check volatile on non-variable types. (store_parm_decls_oldstyle): Use pointer_set instead of DECL_WEAK to check whether we have seen arguments. * c-objc-common.c (c_tree_printer): Reverse order of tests so that flag is checked before field (flag is common, field is not). * dwarf2out.c (decl_ultimate_origin): Only DECL's with TS_DECL_COMMON could have an origin. (add_location_or_const_value_attribute): Don't check section name on non-var/function decls. (dwarf2out_var_location): Reverse order of tests. * emit-rtl.c (set_reg_attrs_for_parm): DECL_CHECK is dead, replace with DECL_WRTL_CHECK. * expmed.c (make_tree): rtl is now in decl_with_rtl. * fold-const.c (fold_binary): Don't check weakness on non-var/function decls. (tree_expr_nonzero_p): Ditto. (fold_checksum_tree): Use tree_decl_extra as sizeof buffer. * ggc-page.c (extra_order_size_table): Add sizes for tree_decl_non_common, tree_parm_decl, tree_var_decl, and tree_field_decl. * gimplify.c (gimplify_bind_expr): Only set DECL_SEEN_IN_BIND_EXPR_P on VAR_DECL. * integrate.c (copy_decl_for_inlining): Don't set RTL on decl's without RTL. * langhooks-def.h (LANG_HOOK_INIT_TS): New. * langhooks.h (init_ts). New langhook. * passes.c (rest_of_decl_compilation): Reverse order of tests. * print-tree.c (print_node): Update to only print fields that exist in the structures the passed decl has. * toplev.c (wrapup_global_declarations): Don't reset DECL_DEFER_OUTPUT on DECL's that don't contain it. * tree-browser.c (browse_tree): DECL_ARG_TYPE_AS_WRITTEN removed. * tree-inline.c (remap_decl): Ditto. * tree-outof-ssa.c (create_temp): Reverse order of tests. * tree-pretty-print.c (print_declaration): Don't print DECL_REGISTER on things that don't contain it. * tree-vrp.c (expr_computes_nonzero): Don't check weakness on non-var/function decls. * tree.c (tree_contains_struct): New structure. (init_priority_for_decl): New hashtable. (tree_int_map): New structure. (tree_int_map_eq): New function. (tree_int_map_marked_p): Ditto. (tree_int_map_hash): Ditto. (tree_map): Move to tree.h. (tree_map_eq): Externalize. (tree_map_hash): Ditto. (tree_map_marked_p): Ditto. (init_ttree): Set up tree_contains_struct and call langhook. (decl_assembler_name): Use DECL_NON_COMMON_CHECK.. (tree_code_size): Update for new structures. (tree_node_structure): Update for new structures. (make_node_stat): Don't try to set DECL_IN_SYSTEM_HEADER on decls without the field. (copy_node_stat): Copy init priority. (build_decl_stat): Ditto for visibility. (ts_enum_names): New. (tree_contains_struct_check_failed): New function. (decl_init_priority_lookup): Ditto. (decl_init_priority_insert): Ditto. * treestruct.def: New file. * tree.h (CODE_CONTAINS_STRUCT): New macro. (CONTAINS_STRUCT_CHECK): Ditto. (tree_contains_struct_check_failed): New prototype. (DECL_CHECK): Removed. (DECL_MINIMAL_CHECK): New. (DECL_COMMON_CHECK): Ditto. (DECL_WRTL_CHECK): Ditto. (DECL_NON_COMMON_CHECK): Ditto. (DECL_WITH_VIS_CHECK): Ditto. (VAR_OR_FUNCTION_DECL_P): Ditto (struct tree_decl_minimal): New structure. (struct tree_decl_common): Ditto. (struct tree_decl_with_rtl): Ditto. (struct tree_decl_with_vis): Ditto. (struct tree_decl_non_common): Ditto. (struct tree_field_decl): Ditto. (struct tree_parm_decl): Ditto. (struct tree_var_decl): Ditto. (struct tree_function_decl): Ditto. (struct tree_const_decl): Ditto. (struct tree_result_decl): Ditto. (union tree_node): Add new structures. * var-tracking.c (track_expr_p): Reverse order of tests. * doc/c-tree.texi: Add documentation on DECL node internal structure. 2005-07-08 Daniel Berlin <dberlin@dberlin.org> * utils.c (create_param_decl): DECL_ARG_TYPE_AS_WRITTEN is removed. 2005-07-08 Daniel Berlin <dberlin@dberlin.org> * Make-lang.in: Add gt-cp-lang.h. (cp-lang.o): Ditto. * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on the field. * config-lang.in: Add cp-lang.c to gtfiles. * cp-lang.c: Include hashtab.h. (cp_init_ts): New function. (LANG_HOOK_INIT_TS): Use macro. (decl_shadowed_for_var_lookup): New function. (decl_shadowed_for_var_insert): Ditto. * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common. (NON_THUNK_FUNCTION_CHECK): Ditto. (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common. (DECL_INIT_PRIORITY): Ditto. (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto. (DECL_SHADOWED_FOR_VAR): Use hashtable. (SET_DECL_SHADOWED_FOR_VAR): Ditto. * decl.c (duplicate_decls): Update for new/updated structures. (poplevel): Use SET_DECL_SHADOWED_FOR_VAR. * decl2.c (start_static_initialization_or_destruction): Deal with priority. * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing SET_DECL_RTL. * tree.c (handle_init_priority_attribute): Handle priority. 2005-07-08 Daniel Berlin <dberlin@dberlin.org> * objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is removed. * objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common. (KEYWORD_KEY_NAME): Use decl_minimal. (METHOD_SEL_NAME): Ditto.. (METHOD_SEL_ARGS): Use decl_non_common. (METHOD_ADD_ARGS): Ditto. (METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common. (METHOD_DEFINITION): Ditto. (METHOD_ENCODING): Ditto. * objc-lang.c: (objc_init_ts): New function. 2005-07-08 Daniel Berlin <dberlin@dberlin.org> * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN is removed. From-SVN: r101799
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-05-26c-common.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* c-common.c, c-parser.c, cfgbuild.c, cfghooks.c, cfghooks.h, cfgrtl.c, cgraphunit.c, ddg.c, expr.h, gcse.c, ggc-page.c, ggc-zone.c, gimplify.c, ipa-inline.c, longlong.h, targhooks.c, tree-flow-inline.h, tree-pass.h, tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c, tree-vect-analyze.c, tree-vect-transform.c, tree-vectorizer.c, tree.c, config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c, config/frv/frv.md, config/i386/i386.c, config/i386/sse.md, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/mcore/mcore.c, config/mips/mips.c, config/mips/mips.md, config/rs6000/darwin-ldouble.c, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/sh/sh.c, config/sh/sh.md, config/sh/ushmedia.h, config/sparc/sparc.c, config/sparc/sparc.md, config/stormy16/stormy-abi: Fix comment typos. Follow spelling conventions. * doc/invoke.texi, doc/tm.texi, doc/tree-ssa.texi: Fix typos. Follow spelling conventions. From-SVN: r100218
2005-05-17ggc-page.c (ggc_alloc_stat): Record amount of memory allocated.Zdenek Dvorak1-0/+3
* ggc-page.c (ggc_alloc_stat): Record amount of memory allocated. * ggc-zone.c (ggc_alloc_zone_1): Ditto. * timevar.c (timevar_ggc_mem_total): New variable. (GGC_MEM_BOUND): New constant. (get_time): Record ggc memory status. (timevar_accumulate): Accumulate amount of ggc memory. (timevar_print): Print consumption of ggc memory. * timevar.def (TV_FIND_REFERENCED_VARS, TV_TREE_REDPHI, TV_TREE_LOOP_BOUNDS, TV_TREE_LOOP_IVCANON, TV_TREE_VECTORIZATION, TV_TREE_LINEAR_TRANSFORM): Shorten strings to fit in 22 characters. * timevar.h (struct timevar_time_def): Add ggc_mem field. (timevar_ggc_mem_total): Declare. From-SVN: r99848
2005-03-13ggc-zone.c: Rewritten.Daniel Jacobowitz1-14/+4
* ggc-zone.c: Rewritten. * alloc-pool.c (dump_alloc_pool_statistics): Don't print statistics if there are none. * configure.ac: Define GGC_ZONE for --with-gc=zone. * config.in: Regenerated. * configure: Regenerated. * gentype.c (write_types_process_field, write_func_for_structure): Pass new argument to gt_pch_note_object. * ggc-common.c (struct ptr_data): Add TYPE. (gt_pch_note_object): Take TYPE argument and save it. (call_count): Update call to ggc_pch_count_object. (call_alloc): Update call to ggc_pch_alloc_object. (gt_pch_save): Call ggc_pch_prepare_write after paddng the PCH file. * ggc-none.c (rtl_zone, garbage_zone, ggc_alloc_zone_stat): Delete. * ggc-page.c (rtl_zone, tree_zone, garbage_zone) (ggc_alloc_zone_stat): Delete. (ggc_pch_count_object, ggc_pch_alloc_object): Add TYPE argument. * ggc.h (gt_pch_note_object, ggc_pch_count_object) (ggc_pch_alloc_object): Update prototypes. (garbage_zone): Delete. (tree_zone, rtl_zone, ggc_alloc_zone_stat, ggc_alloc_zone): Move to GGC_ZONE conditional. Update. Change tree_zone and rtl_zone into pointers. (tree_id_zone): New variable. (ggc_alloc_cleared_zone): Remove unused. (ggc_alloc_zone): Define. (ggc_alloc_rtvec, ggc_alloc_tree): Update to use ggc_alloc_zone. * rtl.c (rtx_alloc_stat, shallow_copy_rtx_stat): Use ggc_alloc_zone_stat. * stringpool.c (gt_pch_n_S): Update call to gt_pch_note_object. * tree.c (copy_node_stat, make_tree_binfo_stat, make_tree_vec_stat) (tree_cons_stat, build1_stat): Update call to ggc_alloc_zone_stat. (make_node_stat): Likewise. Use tree_id_zone. From-SVN: r96381
2005-02-24ChangeLog.5: Fix log message typo(s).Volker Reichelt1-2/+1
* ChangeLog.5: Fix log message typo(s). * ChangeLog.7: Likewise. * ChangeLog.tree-ssa: Likewise. * cfgexpand.c: Fix comment typo(s). * conflict.c: Likewise. * defaults.h: Likewise. * dwarf2out.c: Likewise. * gcse.c: Likewise. * ggc-page.c: Likewise. * tree-eh.c: Likewise. * tree-ssa-dom.c: Likewise. From-SVN: r95516
2005-01-18basic-block.h, [...]: Update copyright.Kazu Hirata1-1/+1
* basic-block.h, c-common.c, c-cppbuiltin.c, c-lang.c, c-tree.h, cfgbuild.c, cgraph.c, cgraph.h, collect2.c, combine.c, config.gcc, coverage.h, cse.c, cselib.c, defaults.h, df.c, dwarf2asm.c, dwarf2out.c, explow.c, expr.c, flow.c, fold-const.c, gcse.c, ggc-page.c, gimple-low.c, gimplify.c, ifcvt.c, langhooks-def.h, lcm.c, optabs.h, output.h, postreload-gcse.c, postreload.c, recog.c, resource.c, rtl.def, rtlanal.c, sched-deps.c, sched-rgn.c, targhooks.h, toplev.c, tree-data-ref.c, tree-eh.c, tree-flow.h, tree-loop-linear.c, tree-mudflap.h, tree-nrv.c, tree-optimize.c, tree-outof-ssa.c, tree-pass.h, tree-scalar-evolution.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dse.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa.c, tree-vectorizer.c, tree.def, unwind-dw2-fde-darwin.c, var-tracking.c: Update copyright. From-SVN: r93827
2005-01-16ggc-page.c (ggc_alloc_stat): Use __builtin_ctzl instead of a loop to look ↵Steven Bosscher1-0/+6
for a free slot in a page entry. * ggc-page.c (ggc_alloc_stat): Use __builtin_ctzl instead of a loop to look for a free slot in a page entry. From-SVN: r93738
2004-10-22alias.c, [...]: Fix comment formatting.Kazu Hirata1-1/+1
* alias.c, basic-block.h, cgraphunit.c, combine.c, domwalk.h, final.c, gengtype.c, genpreds.c, ggc-page.c, insn-notes.def, lambda-code.c, loop-unroll.c, modulo-sched.c, pointer-set.c, pretty-print.c, ra-colorize.c, sbitmap.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-inline.c, tree-into-ssa.c, tree-scalar-evolution.c, tree-ssa-dom.c, tree-ssa-loop-manip.c, tree-ssa-loop-niter.c, tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-threadupdate.c, tree-vectorizer.c, vec.h: Fix comment formatting. From-SVN: r89453
2004-09-27ggc-page.c (GGC_QUIRE_SIZE): Bump up from 16 to 256 if we're using mmap.Matt Austern1-2/+9
* ggc-page.c (GGC_QUIRE_SIZE): Bump up from 16 to 256 if we're using mmap. From-SVN: r88161
2004-09-09gcse.c (INSN_CUID, [...]): Use gcc_assert and gcc_unreachable.Nathan Sidwell1-61/+26
* gcse.c (INSN_CUID, insert_set_in_table, find_avail_set, cprop_insn, do_local_cprop, local_cprop_pass, find_bypass_set, process_insert_insn, insert_insn_end_bb, pre_insert_copy_insn, hoist_code, extract_mentioned_regs_helper, compute_store_table, insert_store): Use gcc_assert and gcc_unreachable. * ggc-common.c (ggc_splay_alloc, ggc_splay_dont_free, gt_pch_note_object, gt_pch_note_reorder, relocate_ptrs, ggc_record_overhead): Likewise. * ggc-page.c (alloc_page, free_page, ggc_set_mark, ggc_marked_p, init_ggc, ggc_push_context, ggc_recalculate_in_use_p, ggc_pop_context, clear_marks, validate_free_objects, ggc_pch_read): Likewise. * ggc-zone.c (ggc_allocated_p, free_chunk, ggc_set_mark, ggc_marked_p, ggc_get_size, init_ggc, destroy_ggc_zone, ggc_push_context, check_cookies, ggc_collect, ggc_print_statistics): Likewise. * gimple-low.c (lower_function_body, lower_stmt, lower_bind_expr): Likewise. * gimplify.c (gimple_tree_eq, push_gimplify_context, pop_gimplify_context, gimple_pop_condition, create_tmp_var, declare_tmp_vars, gimple_add_tmp_var, annotate_all_with_locus, mostly_copy_tree_r, gimplify_return_expr, gimplify_switch_expr, gimplify_case_label_expr, gimplify_exit_block_expr, canonicalize_component_ref, gimplify_compound_lval, gimplify_self_mod_expr, gimplify_call_expr, gimplify_init_ctor_eval, gimplify_init_constructor, gimplify_modify_expr, gimplify_save_expr, gimplify_target_expr, gimplify_expr, check_pointer_types_r, force_gimple_operand): Likewise. * global.c (global_alloc, build_insn_chain): Likewise. * graph.c (clean_graph_dump_file, finish_graph_dump_file): Likewise. gcov-io.c (gcov_open): Use GCOV_CHECK. From-SVN: r87240
2004-09-02gimplify.c (gimplify_compound_lval): Move "stack" varray out of GGC.Jan Hubicka1-11/+21
* gimplify.c (gimplify_compound_lval): Move "stack" varray out of GGC. * ggc-page.c: include tree-flow.h. (extra_order_size_table): Add stmt_ann_d. (STAT_LABEL): Rename from .... (LABEL): ... this one. * Makefile.in (ggc-page.o): Add dependency. * ggc-common.c (ggc_force_collect): New global variable. (loc_description): Add fields "freed", "collected" (ptr_hash): New static hash (ptr_hash_entry): New structure. (hash_ptr,eq_ptr,ggc_prune_ptr): New static functions. (ggc_record_overhead): Take ptr argument, record it (ggc_prune_overhead_list, ggc_free_overhead): New functions. (cmp_statistics): Imrove sorting. (dump_ggc_loc_statistics): Output newly collected statistics * ggc-page.c (ggc_alloc): Update call of ggc_record_overhead (ggc_free): Call ggc_free_overhead. (ggc_collect): Force collection when asked to be forced. (ggc_collect): Call ggc_prune_overhead_list. * ggc.h (ggc_force_collect): Declare (ggc_record_overhead): Update prototype. (ggc_free_overhead, ggc_prune_overhead_list): Declare. From-SVN: r86974
2004-03-22bt-load.c, [...]: Remove unnecessary casts.Kazu Hirata1-4/+4
* bt-load.c, builtins.c, cfghooks.c, cfgrtl.c, gcse.c, ggc-page.c, integrate.c, var-tracking.c, web.c: Remove unnecessary casts. From-SVN: r79811
2004-03-11c-typeck.c, [...]: Fix comment typos and formatting.Kazu Hirata1-1/+1
* c-typeck.c, combine.c, cse.c, dominance.c, et-forest.h, ggc-page.c, var-tracking.c, config/fp-bit.c, config/c4x/c4x.c, config/cris/cris.c, config/i386/ppro.md, config/i860/i860.c, config/i860/i860.h, config/m32r/m32r.h, config/m32r/xm-m32r.h, config/m68hc11/m68hc11.h, config/m68hc11/m68hc11.md, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa32-regs.h, config/pa/pa64-regs.h, config/pdp11/pdp11.h, config/rs6000/rs6000.c, config/stormy16/stormy16.c: Fix comment typos and formatting. From-SVN: r79303
2004-03-03ggc-common.c (ggc_alloc_cleared_stat, [...]): Rename from ...; make ↵Jan Hubicka1-5/+10
statistics transparent. * ggc-common.c (ggc_alloc_cleared_stat, ggc_realloc_stat): Rename from ...; make statistics transparent. (ggc_alloc_cleared, ggc_realloc_stat): ... these. (loc_descriptor): New structure. (hash_descriptor, eq_descriptor, loc_descriptor, cmp_statistics, add_statistics): New static function. (ggc_record_overhead, dump_statistics): New global function. * ggc-none.c (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat, ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Rename from ...; accept locations (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared, ggc_realloc, ggc_alloc_typed): ... this one. from ...; accept locations * ggc-page.c (ggc_alloc_typed_stat, ggc_alloc_zone_stat, ggc_alloc_stat): Rename from ... ; pass locations * ggc-page.c (ggc_alloc_typed, ggc_alloc_zone, ggc_alloc): ... this one. (ggc_alloc_stat): Record overehead. * ggc.h (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared, ggc_realloc, ggc_alloc_typed): Turn to macros (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat, ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Declare. (dump_ggc_loc_satistics, ggc_record_overehead): Declare. * langhooks.h (lhd_make_node): Declare. (LANG_HOOKS_MAKE_TYPE): Default to new function, * langhooks.c (lhd_make_node): New. * rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Rename from ... ; pass locations. (rtx_alloc, swallow_copy_rtx): ... this one. * rtl.h (rtx_alloc, swallow_copy_rtx): Turn to macros. * rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Declare. * toplpev.c (finalize): Dump stats. * tree.c (make_node_stat, copy_node_stat, make_tree_vec_stat, build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat): Rename from ... ; pass locators. (make_node, copy_node, make_tree_vec, build_tree_list, tree_cons, build?, build_decl): Declare. * tree.h (make_node_stat, copy_node_stat, make_tree_vec_stat, build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat): Declare. (make_node, copy_node, make_tree_vec, build_tree_list, tree_cons, build?, build_decl): New macros. * Makefile.in (RTL_H, TREE_H): Add statistics.h dependency. * statistics.h: New file. From-SVN: r78826
2004-03-01fold-const.c (fold): An equality comparison of a non-weak object against ↵Jeff Law1-7/+63
zero has a known result. * fold-const.c (fold): An equality comparison of a non-weak object against zero has a known result. Similarly an equality comparison of the address of two non-weak, unaliased symbols has a known result. * ggc-page.c (struct page_entry): New field PREV. (ggc_alloc): Update PREV field appropriately. (sweep_pages): Likewise. (ggc_free): Likewise. Use PREV field rather than loop to improve ggc_free performance. cp/ * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to the proper type. From-SVN: r78713
2004-01-31alloc-pool.c, c-lex.c, c-pragma.h, c-semantics.c, cfghooks.c,Kazu Hirata1-1/+2
cfghooks.h, cfglayout.c, cfgloopmanip.c, debug.c, debug.h, flow.c, genextract.c, ggc-common.c, ggc-page.c, ggc.h, ifcvt.c, jump.c, loop-unswitch.c, timevar.c, timevar.def, tree-optimize.c, vmsdbgout.c, config/fp-bit.c, config/alpha/alpha.c, config/alpha/alpha.h, config/alpha/alpha.md, config/alpha/unicosmk.h, config/alpha/vms.h, config/arm/linux-elf.h, config/avr/avr.c, config/c4x/c4x-protos.h, config/c4x/c4x.md, config/d30v/d30v.h, config/frv/frv.md, config/frv/frvbegin.c, config/frv/frvend.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/emmintrin.h, config/i386/gthr-win32.c, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/openbsd.h, config/i386/winnt.c, config/i386/xm-mingw32.h, config/i386/xmmintrin.h, config/ia64/ia64.md, config/iq2000/iq2000.md, config/m32r/m32r.md, config/m68k/m68k.md, config/mcore/mcore-elf.h, config/mcore/mcore.md, config/mips/elf.h, config/mips/elf64.h, config/mips/iris5gas.h, config/mips/iris6.h, config/mips/iris6gas.h, config/mips/linux.h, config/mips/mips.md, config/mips/netbsd.h, config/mips/openbsd.h, config/mips/windiss.h, config/pa/fptr.c, config/rs6000/aix.h, config/rs6000/altivec.h, config/rs6000/darwin.h, config/rs6000/xcoff.h, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/netbsd-elf.h, config/sh/sh.h, config/sh/vxworks.h, config/sparc/sol2.h: Update copyright. From-SVN: r77018
2004-01-28ggc.h (ggc_free): Declare.Richard Henderson1-40/+168
* ggc.h (ggc_free): Declare. * ggc-common.c (ggc_realloc): Use it. * ggc-page.c: Remove lots of inline markers. (globals): Add free_object_list. (ggc_alloc): Tidy. (ggc_free, validate_free_objects): New. (poison_pages): Provide default. (ggc_collect): Call validate_free_objects; emit markers to the debug file. From-SVN: r76801
2004-01-26Revert accidental commit.Richard Henderson1-149/+29
From-SVN: r76675
2004-01-26c-parse.in (extension): Use itype.Richard Henderson1-29/+149
* c-parse.in (extension): Use itype. (SAVE_EXT_FLAGS): Don't allocate a tree. (RESTORE_EXT_FLAGS): Don't read a tree. From-SVN: r76674
2003-12-21Patch from Dan NicolaescuDan Nicolaescu1-7/+18
* rtl.h (dump_rtx_statistics): Declare it. * rtl.c (rtx_alloc_counts, rtx_alloc_sizes, rtvec_alloc_counts, rtx_alloc_sizes): New static vars. (rtx_alloc, rtvec_alloc): Update them. (dump_rtx_statistics): New function. * toplev.c (finalize): Call it. * ggc-page.c (struct globals): Fix comments. Add new member total_allocated_per_order. (ggc_alloc): Keep track of the total allocated memory. (ggc_print_statistics): Clarify message. Print total allocated memory stats. * configure.in (gather-detailed-mem-stats): New flag. * configure: Regenerate. * config.in: Regenerate. * doc/install.texi (Configuration): Document --enable-gather-detailed-mem-stats. From-SVN: r74930
2003-12-03* gcc-page.c (extra_order_size_tab): Correct comment.James E Wilson1-1/+1
From-SVN: r74271
2003-12-01ggc.h (struct alloc_zone): Move forward declaration up.Steven Bosscher1-0/+14
* ggc.h (struct alloc_zone): Move forward declaration up. (new_ggc_zone): New function prototype. (destroy_ggc_zone): Ditto. * ggc-simple.c (new_ggc_zone): New function, does nothing. (destroy_ggc_zone): Ditto. * ggc-page.c (new_ggc_zone): New function, does nothing. (destroy_ggc_zone): Ditto. * ggc-zone.c (struct page_entry): Fix comment. (ggc_alloc_typed): Use a switch statement instead of ifs. (new_ggc_zone): New function to set up a new GC zone. (destroy_ggc_zone): New function to remove a GC zone. init_ggc): Use new_ggc_zone to set up the default zones. (ggc_collect): Walk a list of zones, instead of just the default zones. Report statistics using the zone name. From-SVN: r74132
2003-10-31ggc-page.c (ggc_pch_read): Wrap call to poison_pages in ENABLE_GC_CHECKING ↵Richard Earnshaw1-1/+1
not in GGC_POISON. * ggc-page.c (ggc_pch_read): Wrap call to poison_pages in ENABLE_GC_CHECKING not in GGC_POISON. From-SVN: r73135
2003-10-29configure.in: Look for <valgrind/memcheck.h> first.Hans-Peter Nilsson1-3/+5
* configure.in <enable-checking for valgrind>: Look for <valgrind/memcheck.h> first. AC_DEFINE HAVE_VALGRIND_MEMCHECK_H if it exists. * configure, config.in: Regenerate. * ggc-common.c [ENABLE_VALGRIND_CHECKING && HAVE_VALGRIND_MEMCHECK_H]: Include <valgrind/memcheck.h>. Use #elif for other alternatives. * ggc-page.c: Ditto. * ggc-zone.c: Don't assume <valgrind/memcheck.h>; instead copy include structure from ggc-common.c. From-SVN: r73065
2003-10-27ggc-zone.c: New file, zone allocating collector.Daniel Berlin1-4/+23
2003-10-26 Daniel Berlin <dberlin@dberlin.org> * ggc-zone.c: New file, zone allocating collector. * configure: Accept zone option for --with-gc * configure.in: Ditto. * ggc.h (ggc_pch_count_object): Pass bool indicating stringiness. Update all callers. (ggc_pch_alloc_object): Ditto. (ggc_pch_write_object): Ditto. (ggc_alloc_rtx): Use typed allocation, since all RTX's are of a single type. (ggc_alloc_rtvec): Ditto. (ggc_alloc_tree): Use zone allocation, since some things using this macro aren't a single typecode. * ggc-none.c (ggc_alloc_typed): New function. (ggc_alloc_zone): Ditto. * ggc-page.c: Ditto on both functions. From-SVN: r72971
2003-10-18rtl.h (rtl_size): Declare.Richard Sandiford1-1/+1
* rtl.h (rtl_size): Declare. (rtunion): Remove rtwint. (rtx_def): Replace 'fld' with a union of an rtunion or a HOST_WIDE_INT. (RTX_HDR_SIZE, RTX_SIZE): New macros. (RTL_CHECK1): Adjust for new rtx_def layout. (RTL_CHECK2, RTL_CHECKC1, RTL_CHECKC2): Likewise. (XWINT, XCWINT): Likewise. Access the rtx structure directly. (X0WINT): Remove. (X0ANY): New macro. * rtl.def: Adjust comments for new rtx_def layout. * ggc.h (ggc_alloc_rtx): Take the rtx code as argument, not the number of slots. * rtl.c (rtx_size): New array. (rtx_alloc): Adjust call to ggc_alloc_rtx. Use RTX_HDR_SIZE. (copy_rtx): Use RTX_HDR_SIZE. Adjust for new rtx_def layout. (shallow_copy_rtx): Adjust call to ggc_alloc_rtx. Use RTX_SIZE. * integrate.c (copy_rtx_and_substitute): Use X0ANY to copy '0' fields. * emit-rtl.c (copy_most_rtx): Likewise. (copy_rtx_if_shared): Use RTX_SIZE. (copy_insn_1): Use RTX_HDR_SIZE. Adjust for new rtx_def layout. * gengenrtl.c (gendef): Adjust ggc_alloc_rtx call. Use RTX_HDR_SIZE. * gengtype.c (write_rtx_next): Use RTX_HDR_SIZE. (adjust_field_rtx_def): Expect "rtx_def" to be a union rather than an array. Adjust output for new rtx_def layout. * ggc-page.c (RTL_SIZE): Use RTX_HDR_SIZE. * reload1.c (eliminate_regs): Use RTX_SIZE. * rtlanal.c (loc_mentioned_in_p): Adjust for new rtx_def layout. * gdbinit.in (pi): Likewise. From-SVN: r72647
2003-10-05c-pretty-print.c: Fix comment formatting.Kazu Hirata1-3/+3
* c-pretty-print.c: Fix comment formatting. * cfglayout.c: Likewise. * cfgloopanal.c: Likewise. * cppcharset.c: Likewise. * dbxout.c: Likewise. * ggc-page.c: Likewise. * ggc.h: Likewise. * target.h: Likewise. From-SVN: r72110
2003-10-03ggc-page.c: (ggc_pch_write_object) replace fseek() with fwrite() in PCH ↵Robert Bowdidge1-5/+25
generation... * ggc-page.c: (ggc_pch_write_object) replace fseek() with fwrite() in PCH generation, avoiding too-frequent flushes when writing to NFS file system From-SVN: r72085
2003-08-19builtins.c: Fix comment typos.Kazu Hirata1-1/+1
* builtins.c: Fix comment typos. * c-common.c: Likewise. * c-decl.c: Likewise. * c-pretty-print.c: Likewise. * cfgbuild.c: Likewise. * cfglayout.c: Likewise. * cfgloopanal.c: Likewise. * cgraphunit.c: Likewise. * cppfiles.c: Likewise. * dwarfout.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * gcse.c: Likewise. * ggc-page.c: Likewise. * haifa-sched.c: Likewise. * pretty-print.c: Likewise. * tree.c: Likewise. * tree.h: Likewise. * value-prof.c: Likewise. From-SVN: r70583