aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
AgeCommit message (Collapse)Author
2005-10-18This commit was manufactured by cvs2svn to create branchno-author
'apple-200511-release-branch'. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/apple-200511-release-branch@105574 138bc75d-0d04-0410-961f-82ee72b054a4
2005-01-23 * cgraph.c (cgraph_varpool_n_nodes): Remove.Kazu Hirata
(cgraph_varpool_node): Don't access cgraph_varpool_n_nodes. * cgraph.h: Remove the corresponding declaration. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@94121 138bc75d-0d04-0410-961f-82ee72b054a4
2005-01-18 * basic-block.h, c-common.c, c-cppbuiltin.c, c-lang.c,Kazu Hirata
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@93827 138bc75d-0d04-0410-961f-82ee72b054a4
2005-01-02 PR c/19031Richard Henderson
* c-decl.c (pop_file_scope): Call maybe_apply_pending_pragma_weaks. * c-lang.c (finish_file): Don't do it here. * objc/objc-act.c (objc_finish_file): Likewise. * cgraph.c (decl_assembler_name_equal): New. (cgraph_node_for_asm, cgraph_varpool_node_for_asm): New. (cgraph_varpool_node): Actually link up cgraph_varpool_nodes. * cgraph.h (struct cgraph_varpool_node): Add next. (cgraph_node_for_asm, cgraph_varpool_node_for_asm): Declare. * varasm.c (assemble_alias): Mark the target as needed. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@92803 138bc75d-0d04-0410-961f-82ee72b054a4
2004-11-18 * cgraph.h: Replace "it's" with "its" throughout.Ben Elliston
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@90833 138bc75d-0d04-0410-961f-82ee72b054a4
2004-11-08 * cgraph.h (cgraph_calls_p): Remove.Ben Elliston
* cgraph.c (cgraph_calls_p): Likewise. * varray.h (varray_copy): Remove. * varray.c (varray_copy): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@90261 138bc75d-0d04-0410-961f-82ee72b054a4
2004-10-25patch to remove the analysis of module level static variables.Kenneth Zadeck
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@89559 138bc75d-0d04-0410-961f-82ee72b054a4
2004-09-20 PR middle-end/16460Jan Hubicka
* cgraph.c (cgraph_unnest_node): New function. (c_finalize): Rename to .... (c_warn_unused_result_recursivly): ... this one; do only the warning (finish_function): Finalize the toplevel function; do not lower nested tree. * cgraph.h (cgraph_unnest_node): Declare. * cgraphunit.c (decide_is_function_needed): Do not use cgraph nestedness datastructure. * cse.c (cse_insn): Do not cprop nonlocal LABEL_REFs. * reload1.c (set_label_offsets): Fix call of set_label_offsets. * tree-nested.c (finlize_nesting_tree_1): Use un-nesting code. * utils.c (gnat_finalize): Remove. (end_subprog_body): Directly call cgraph_finalize_function; do not lower the nested functions. * trans-decl.c (build_entry_thunks): Finalize the function; do not lower tree. (gfc_generate_function_code): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@87770 138bc75d-0d04-0410-961f-82ee72b054a4
2004-09-14 * cgraph.h, cgraphunit.c, fold-const.c, lambda-mat.c,Kazu Hirata
lambda.h, profile.c, tree-optimize.c, tree-sra.c, vec.h: Fix comment typos. Follow spelling conventions. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@87490 138bc75d-0d04-0410-961f-82ee72b054a4
2004-09-13New code to analyze file level static variables and to determine ifKenneth Zadeck
they escape and also code to use this information to prune clobber lists. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@87455 138bc75d-0d04-0410-961f-82ee72b054a4
2004-09-102004-09-10 Paolo Bonzini <bonzini@gnu.org>Paolo Bonzini
* cgraph.h (cgraph_dump_file): Do not declare. * cgraphunit.c (cgraph_dump_file): Declare as static. (init_cgraph): New. * toplev.c (cgraph_dump_file): Do not declare. (compile_file): Call init_cgraph. * tree-dump.c (dump_files): Add IPA dump file, remove XML dump of call graph. (get_dump_file_name): Support IPA dump file naming scheme. * tree.h (enum tree_dump_index): Add IPA dump file, remove XML dump of call graph. * doc/invoke.texi (Debugging Options): Document the new options. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@87281 138bc75d-0d04-0410-961f-82ee72b054a4
2004-07-15* Fix for g++/15861Frank Ch. Eigler
2004-07-15 Frank Ch. Eigler <fche@redhat.com> g++/15861 * cgraphunit.c (cgraph_build_static_cdtor): Add priority argument. * cgraph.h: Update declaration. * c-decl.c (build_cdtor): Update call with default priority. * coverage.c (create_coverage): Ditto. * tree-mudflap.c (mf_init_fndecl): New tree. (mudflap_init): Set it. (mudflap_register_call): Arrange to call __mf_init before the first __mf_register call. (mudflap_finish_file): Mark the mudflap static initializer as extra high priority, to beat all C++ static constructors. 2004-07-15 Frank Ch. Eigler <fche@redhat.com> g++/15861 * jcf-parse.c (java_emit_static_constructor): Specify default priority. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@84760 138bc75d-0d04-0410-961f-82ee72b054a4
2004-07-01 * cgraph.h (cgraph_build_static_cdtor): Declare.Richard Henderson
* cgraphunit.c (cgraph_build_static_cdtor): New. * c-objc-common.c (build_cdtor): Use it. * coverage.c (create_coverage): Likewise. * libfuncs.h (LTI_gcov_init, gcov_init_libfunc): Remove. * optabs.c (init_optabs): Don't set gcov_init_libfunc. java/ * class.c (registerClass_libfunc): Remove. (init_class_processing): Don't set it. (emit_register_classes): Take list_p parameter. Fill it in with _Jv_RegisterClass calls. * decl.c (java_init_decl_processing): Don't call init_resource_processing. * jcf-parse.c (java_emit_static_constructor): New. (java_parse_file): Call it. * resource.c (registerResource_libfunc): Remove. (init_resource_processing): Remove. (write_resource_constructor): Take list_p parameter. Fill it in with _Jv_RegisterResource calls. * java-tree.h: Update prototypes. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@83958 138bc75d-0d04-0410-961f-82ee72b054a4
2004-05-222004-05-22 Andrew Pinski <pinskia@physics.uc.edu>Zack Weinberg
* c-common.c (c_common_truthvalue_conversion): Handle UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR, ORDERED_EXPR, and UNORDERED_EXPR as comparison operators, i.e. set the type to truthvalue_type_node and return. 2004-05-22 Zack Weinberg <zack@codesourcery.com> * tree.h (struct tree_decl): Add possibly_inlined bit. (DECL_POSSIBLY_INLINED): New accessor macro. * cgraph.h: Remove declaration of cgraph_inline_hash. * cgraph.c: Remove definition of cgraph_inline_hash. (hash_node): Revert to hashing DECL_UID. (eq_node): Take two pointers to cgraph_node structures. Compare DECL_UIDs. (cgraph_remove_node): Pass the node directly to htab_find_slot. (cgraph_varpool_hash_node): Rename hash_varpool_node; hash on DECL_UID. (eq_cgraph_varpool_node): Rename eq_varpool_node; take two pointers to cgraph_varpool_node structures; compare DECL_UIDs. (cgraph_node): Allocate a temporary node on the stack, fill in its DECL field, and pass that to htab_find_slot. (cgraph_varpool_node): Likewise. (cgraph_function_possibly_inlined_p): If global info is ready, return the DECL_POSSIBLY_INLINED bit. * cgraphunit.c (cgraph_mark_inline_edge): Set DECL_POSSIBLY_INLINED instead of mucking with cgraph_inline_hash. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@82140 138bc75d-0d04-0410-961f-82ee72b054a4
2004-05-19 * cgraph.c (hash_node, eq_node, cgraph_node, cgraph_remove_node)Zack Weinberg
(cgraph_varpool_hash_node, eq_cgraph_varpool_node) (cgraph_varpool_node): Use DECL_UID for the key, not DECL_ASSEMBLER_NAME. (cgraph_function_possibly_inlined_p): Use the decl itself for the key, not DECL_ASSEMBLER_NAME. (change_decl_assembler_name): No need to muck with the hash tables. (cgraph_node_for_identifier, cgraph_varpool_node_for_identifier): Delete. * cgraphunit.c (cgraph_mark_inline_edge): Use the decl itself for the key, not DECL_ASSEMBLER_NAME. * cgraph.h: Remove prototypes of deleted functions. * varasm.c (mark_referenced): Just set TREE_SYMBOL_REFERENCED. (mark_decl_referenced): New function. * tree.h: Prototype mark_decl_referenced. * final.c (output_addr_const) <case SYMBOL_REF>: Call mark_decl_referenced before assemble_name. * c-decl.c (finish_decl): Use mark_decl_referenced. cp: * decl.c (cp_finish_decl): Use mark_decl_referenced. * decl2.c (maybe_make_one_only): Likewise. * method.c (use_thunk): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@82015 138bc75d-0d04-0410-961f-82ee72b054a4
2004-05-13Merge tree-ssa-20020619-branch into mainline.Diego Novillo
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
2004-04-01 * cgraph.c: Add overall comment.Jan Hubicka
(cgraph_inline_hash): New global variable. (cgraph_create_node): Break out from ... (cgraph_node): ... here. (cgraph_edge): New function. (cgraph_create_edge): New CALL_EXPR argument; some sanity checking. (cgraph_remove_edge): Accept edge, intead of source and destination. (cgraph_redirect_edge_callee): New. (cgraph_remove_node): Update all new datastructures. (cgraph_record_call, cgraph_remove_call): Kill. (dump_cgraph_node): Break out from ... ; dump new datastructures. (dump_cgraph): ... here. (cgraph_function_possibly_inlined_p): Use new hashtable. (cgraph_clone_edge, cgraph_clone_node): New. * cgraph.h: Include hashtab.h (struct cgraph_global_info): Kill cloned_times, inline_once, will_be_output fields, add inlined_to pointer. (cgraph_node): Add pointer to next_clone. (cgraph_remove_edge, cgraph_create_edge): Update prototype. (cgraph_remove_call, cgraph_record_call): Kill. (cgraph_inline_hash): Declare. (dump_cgraph_node, cgraph_edge, cg4raph_clone_edge, cgraph_clone_node, cgraph_redirect_edge_callee): Declare. (cgraph_create_edges, cgraph_inline_p): Update prorotype. (cgraph_preserve_function_body_p, verify_cgraph, verify_cgraph_node, cgraph_mark_inline_edge, cgraph_clone_inlined_nodes): Declare. * cgraphunit.c: Add overall comment. (cgraph_optimize_function): Kill. (cgraph_assemble_pending_functions): Do not assemble inline clones. (cgraph_finalize_function): Update call of cgraph_remove_node (record_call_1): Record call sites. (cgraph_create_edges): Accept node instead of decl argument. (error_found): New static variable. (verify_cgraph_node_1, verify_cgraph_node, verify_cgraph): New functions. (cgraph_analyze_function): Update for new datastructures. (cgraph_finalize_compilation_unit): Plug memory leak. (cgraph_optimize_function): Kill. (cgraph_expand_function): Do not use cgraph_optimize_function. (INLINED_TIMES, SET_INLINED_TIMES, cgraph_inlined_into, cgraph_inlined_callees): Kill. (cgraph_remove_unreachable_nodes): Verify cgraph; update handling of clones. (estimate_growth): Simplify. (cgraph_clone_inlined_nodes): New function. (cgraph_mark_inline_edge): Re-implement. (cgraph_mark_inline): Likewise. (cgraph_check_inline_limits): Simplify. (cgraph_recursive_inlining_p): New. (update_callee_keys): Break out from ... (cgraph_decide_inlining_of_small_functions): ... here; simplify. (cgraph_decide_inlining, cgraph_decide_inlining_incrementally): Likewise. (cgraph_expand_all_functions): Remove inline clones from the ordered list. (cgraph_preserve_function_body_p): New predicate. (cgraph_optimize): Verify cgraph. * function.h (struct function): Add fields saved_tree/saved_args. * timevar.def (TV_CGRAPH_VERIFY): Use verifier. * toplev.c (rest_of_compilation): Do not free cfun. * tree-inline.c: Include function.h (struct inline_data): Add saving_p field; replace decl/current_decl by node/current_node. (insert_decl_map): New function. (copy_body_r): Handle saving; update cgraph datastructure. (copy_body): Handle recursive inlining. (initialize_inlined_parameters): Likewise. (expand_call_inline): Propagate node attributes; update cgraph. (optimize_inline_calls): Verify that datastructure still match. (save_body): New function. * tree-inline.h (save_body): New. * tree-optimize.c (tree_rest_of_compilation): preserve function body; do inlining. * langhooks-def.c (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): New. * langhooks.c (lang_hooks): Add update_decl_after_saving. * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define. * cp-tree.h (cp_update_decl_after_saving): Declare. * tree.c (cp_update_decl_after_saving): Define. * Make-lang.in (com.o): Add dependnecy on function.h * com.c: Include function.h (finish_function): Clear DECL_STRUCT_FUNCTION. * utils.c: Include function.h (end_subprog_body): Clear DECL_STRUCT_FUNCTION. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@80334 138bc75d-0d04-0410-961f-82ee72b054a4
2004-03-30 * gengtype.c (create_option): New function.Zack Weinberg
* gengtype.h: Prototype it. * gengtype-yacc.y (stringseq): New rule. (option): Use create_option. Add new bare ID production. Use stringseq, not STRING directly. * alias.c, bitmap.c, c-decl.c, cgraph.h, cpplib.h, cselib.h * dwarf2out.c, emit-rtl.c, function.h, lists.c, tree.h * varray.h, config/alpha/alpha.c, cp/name-lookup.c, cp/parser.c * f/com.c, java/builtins.c, java/expr.c, java/jcf.h, java/parse.h: Use new shorter form of GTY markers. * doc/gty.texi: Rewrite. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@80091 138bc75d-0d04-0410-961f-82ee72b054a4
2004-01-21 * alias.c, basic-block.h, c-common.c, c-common.h,Kazu Hirata
c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c, calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c, combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c, cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h, defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c, expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c, genautomata.c, genconditions.c, genemit.c, genflags.c, gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c, ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c, langhooks-def.h, langhooks.c, langhooks.h, line-map.c, line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c, ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c, rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h, target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h, unwind.h, varray.c, varray.h: Update copyright. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@76302 138bc75d-0d04-0410-961f-82ee72b054a4
2004-01-14 * cgraph.c (create_edge): Use local.redefined_extern_inline.Jan Hubicka
* cgraph.h (cgraph_local_info): Sort fields by size; add redefined_extern_inline (cgraph_global_info): Sort fields by size. (cgraph_node): Likewise. * cgraphunit.c (cgraph_finalize_function): Se local.redefined_extern_inline on redefinition. (cgraph_analyze_function): Use it; fix formating. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@75890 138bc75d-0d04-0410-961f-82ee72b054a4
2004-01-04 * Makefile.in (cgraph.o, cgraphunit.o): Add intl.h dependency.Jan Hubicka
* cgraph.c (create_edge, dump_cgraph): Update to use inline_failed * cgraph.h (cgraph_edge): Replace inline_call by inline_failed (cgraph_inline_p): Add extra argument reason. * cgraphunit.c: Minor formating fixes. cgraph_first_inlined_callee): New functions. (record_call_1): Record builtins too. (cgraph_analyze_function): Update inline_failed messages. (cgraph_mark_functions_to_output, cgraph_expand_function, cgraph_inlined_into, cgraph_inlined_callees, cgraph_estimate_growth): Update to use inline_failed. (cgraph_check_inline_limits): Likewise; Add argument reason. (cgraph_set_inline_failed): New static function. (cgraph_decide_inlining_of_small_function, cgraph_decide_inlining): Set reasons. (cgraph_inline_p): Add new argument reason. * tree-inline.c (expand_call_inline): Update warning. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@75391 138bc75d-0d04-0410-961f-82ee72b054a4
2003-12-13 * c-typeck.c: Fix comment typos.Kazu Hirata
* calls.c: Likewise. * cfgcleanup.c: Likewise. * cgraph.h: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * expr.c: Likewise. * flow.c: Likewise. * function.c: Likewise. * gcc.c: Likewise. * ggc-zone.c: Likewise. * ifcvt.c: Likewise. * local-alloc.c: Likewise. * predict.c: Likewise. * pretty-print.c: Likewise. * profile.c: Likewise. * ra-colorize.c: Likewise. * sched-vis.c: Likewise. * stor-layout.c: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@74594 138bc75d-0d04-0410-961f-82ee72b054a4
2003-10-22 PR debug/12389Jan Hubicka
* Makefile.in (dwarf2out.o): Depend on cgraph.h. * cgraph.c (cgraph_function_possibly_inlined_p): New function. * cgraph.h (cgraph_function_possibly_inlined_p): Declare. (cgraph_global_info): Add flag inlined * dwarf2out.c (gen_subprogram_die, gen_decl_die): Use cgraph_function_possibly_inded_p * cgraphunit.c (mark_inline): Set inlined flag. * toplev.c (rest_of_decl_compilation): Call outlining_inline_function only for possibly inlined functions. * c-decl.c (duplicate_decls): Never output abstract DIE representing old body of function. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@72795 138bc75d-0d04-0410-961f-82ee72b054a4
2003-09-25 * cgraph.h (cgraph_remove_edge): Declare.Richard Sandiford
* cgraph.c (cgraph_remove_edge): Make extern. * cgraphunit.c (cgraph_finalize_function): Call cgraph_remove_edge instead of cgraph_remove_call. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@71784 138bc75d-0d04-0410-961f-82ee72b054a4
2003-09-13 * cgraphunit.c (cgraph_assemble_pending_functions): Export.Richard Henderson
(cgraph_finalize_function): Revert TREE_ASM_WRITTEN check. * cgraph.h: Update. * decl2.c (finish_file): Check cgraph_assemble_pending_functions during relaxation loop. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@71360 138bc75d-0d04-0410-961f-82ee72b054a4
2003-09-11 * cgraphunit.c (cgraph_finalize_function): Add nested arg.Richard Henderson
Tweek tests for function already generated. (cgraph_expand_function): Don't double announce in !unit-at-a-time. * cgraph.h (cgraph_finalize_function): Update for extra arg. * c-decl.c (finish_function): Likewise. * semantics.c (expand_or_defer_fn): Update for new cgraph_finalize_function argument. * parse.y (source_end_java_method): Update for new cgraph_finalize_function argument. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@71298 138bc75d-0d04-0410-961f-82ee72b054a4
2003-09-10 * cgraph.h (struct cgraph_node): Rename lowered to analyzed.Richard Henderson
* cgraphunit.c: Update to match. (record_call_1): Rearrange. Call lang hook for language nodes. (cgraph_analyze_function): Don't call lower_function. * langhooks.h (struct lang_hooks_for_callgraph): Replace lower_function with analyze_expr. * langhooks-def.h: Update to match. * langhooks.c (lhd_callgraph_analyze_expr): New. * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of mark_member_pointers. (lower_function): Remove. * cp-tree.h: Update to match. * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New. (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@71277 138bc75d-0d04-0410-961f-82ee72b054a4
2003-09-10 * cgraphunit.c (cgraph_finalize_function): Remove unused argument.Richard Henderson
* cgraph.h (cgraph_finalize_function): Update. * c-decl.c (finish_function): Update. cp/ * semantics.c (expand_or_defer_fn): Update call to cgraph_finalize_function. java/ * parse.y (source_end_java_method): Update call to cgraph_finalize_function. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@71263 138bc75d-0d04-0410-961f-82ee72b054a4
2003-09-05 * cgraph.c (cgraph_mark_reachable_node): Split out from ...Richard Henderson
(cgraph_mark_needed_node): Remove needed argument. * cgraph.h: Update to match. * cgraphunit.c (decide_is_function_needed): Split out from ... (cgraph_finalize_function): Reorg. Avoid deferred_inline_function if we generated the function. (record_call_1): Update for cgraph_mark_reachable_node. * varasm.c (mark_referenced): Likewise. * objc/objc-act.c (mark_referenced_methods): Likewise. * decl2.c (mark_member_pointers_and_eh_handlers): Update for change in cgraph_mark_needed_node arguments. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@71104 138bc75d-0d04-0410-961f-82ee72b054a4
2003-08-16 * i386.c (ix86_fntype_regparm): Rename from ...Jan Hubicka
(ix86_function_regparm): ... this one; add fastcall and local functions. (ix86_function_ok_for_sibcall): Update. (ix86_return_pops_args): Likewise. (init_cumulative_args): Likewise. (x86_can_output_mi_thunk): Likewise. (function_arg): Fix formating. (x86_this_parameter): Fix fastcall. (x86_output_mi_thunk): Likewise. * cgraph.c (cgraph_mark_needed_node): Do not mark functions without body as reachable; mark nested functions as needed too. (dump_cgraph): Do not output global.calls. * cgraph.h (cgraph_global_info): Kill. * cgraphunit.c (cgraph_finalize_function): Enqueue needed functions. (record_call_1): Speedup. (cgraph_analyze_function): Break out from ...; compute inlining parameters. (cgraph_finalize_compilation_unit): ... here. (cgraph_mark_inline): Kill computation of calls. (cgraph_decide_inlining): Do not compute most of initial values. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@70504 138bc75d-0d04-0410-961f-82ee72b054a4
2003-08-052003-08-05 Steven Bosscher <steven@gcc.gnu.org>Steven Bosscher
* tree.h (DID_INLINE_FUNC): Remove macro. (DECL_DECLARED_INLINE_P): Move from c-tree.h and cp/cp-tree.h, add tree check for FUNCTION_DECL. (DECL_ESTIMATED_INSNS): Move from c-common.h and java/java-tree.h. (struct tree_decl): Rename inlined_function_flag to declared_inline_flag. * c-common.h (c_lang_decl): Remove. (DECL_ESTIMATED_INSNS): Remove. * c-tree.h (struct lang_decl): Don't include c_lang_decl. (DECL_DECLARED_INLINE_P): Remove. * c-decl.c (grokdeclarator): Update comment. With -finline-functions, do not reset DECL_DECLARED_INLINE_P. Don't use DID_INLINE_FUNC. (finish_function): Make uninlinable a bool. Fixup call to tree_inlinable_function_p() and fix some code style issues. * cgraph.h (disgread_inline_limits): Fix spelling: `disregard'. * cgraph.c (dump_cgraph): Likewise. * cgraphunit.c (cgraph_decide_inlining): Likewise (cgraph_finalize_compilation_unit): Likewise. Also update call to tree_inlinable_function_p(). (cgraph_default_inline_p): Don't use DID_INLINE_FUNC. Instead look at DECL_DECLARED_INLINE and reverse logic. * print-tree.c (print_node): Likewise. * toplev.c (rest_of_handle_inlining): Don't use DID_INLINE_FUNC. * tree-inline.h (tree_inlinable_function_p): Make a bool. Update prototype. * tree-inline.c (inlinable_function_p): Split up in this function to check for basic inlining inhibiting conditions, and new limits_allow_inlining() function. Warn if inlining is impossible because the inline candidate calls alloca or uses sjlj exceptions. (limits_allow_inlining): this new function to check if the inlining limits are satisfied. Throttle from currfn_max_inline_insns, not from MAX_INLINE_INSNS_SINGLE. The latter only makes sense if MAX_INLINE_INSNS_AUTO and MAX_INLINE_INSNS_SINGLE are equal. Update prototypes. (tree_inlinable_function_p): Make a bool. Update call to inlinable_function_p (expand_call_inline): Use limits_allow_inlining() when not in unit-at-a-time mode to decide on inlining. Don't use DID_INLINE_FUNC, instead see if the function was declared `inline'. cp/ * cp-tree.h (struct lang_decl): Don't include c_lang_decl. (DECL_DECLARED_INLINE_P): Remove. * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P if decl is a FUNCTION_DECL. This never made sense, but now it is required to avoid a tree check failure. * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC. * optimize.c (maybe_clone_body): Likewise. java/ * java-tree.h (DECL_ESTIMATED_INSNS): Remove. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@70174 138bc75d-0d04-0410-961f-82ee72b054a4
2003-07-12 * fp-test.c (main): Use ISO C90 prototype.Andreas Jaeger
* version.c: Remove unneded include of ansidecl.h. * cgraph.h: Convert prototypes to ISO C90. * cgraph.c: Likewise. * fix-header.c: Likewise. * ra.h: Likewise. * protoize.c: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@69265 138bc75d-0d04-0410-961f-82ee72b054a4
2003-07-12 * cgraph.c (cgraph_max_uid): New global variable.Jan Hubicka
(cgraph_node): Set uid field. (create_edge): Keep inline flags consistent. (dump_cgraph): Dump more info. * cgraph.h (struct cgraph_local_info): Remove inline_many and can_inline_once; add inlinable, disgread_inline_limits, and self_insn (struct cgraph_global_info): Add insns, calls, cloned_times, will_be_output. (struct cgraph_node): Add uid. (struct cgraph_edge): Add inline_call. (cgraph_max_uid, cgraph_inline_p): Declare. * cgraph.c: Include params.h and fibheap.h (cgraph_mark_functions_to_inline_once): Kill. (INSNS_PER_CALL): New constant. (ncalls_inlined, nfunctions_inlined, initial_insns, overall_insns): New static variables. (cgraph_finalize_function): Do not analyze inlining. (cgraph_finalize_compilation_unit): Set inlining attributes. (cgraph_mark_functions_to_output): More consistency checks. (cgraph_optimize_function): Set current_function_decl to NULL. (cgraph_expand_function): Use new inline flags. (cgraph_postorder): Expand from cgraph_expand_functions. (INLINED_TIMES, SET_INLINED_TIMES): New macros. (cgraph_inlined_into, cgraph_inlined_callees, cgraph_estimate_size_after_inlining, cgraph_estimate_growth, cgraph_mark_inline, cgraph_check_inline_limits, cgraph_default_inline_p, cgraph_decide_inling_of_small_functions, cgraph_decide_inlining, cgraph_inline_p): New functions. * params.def (PARAM_LARGE_FUNCTION_INSNS, PARAM_LARGE_FUNCTION_GROWTH, PARAM_INLINE_UNIT_GROWTH): New parameters. * tree-inline.c (struct inline_data): New field current_decl. (expand_call_inline): Avoid forward declarations; use inlinable_function_p. (optimize_inline_calls): Set id.current_decl. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@69262 138bc75d-0d04-0410-961f-82ee72b054a4
2003-07-11Index: ChangeLogGeoffrey Keating
2003-07-10 Geoffrey Keating <geoffk@apple.com> * c-decl.c (finish_decl): Handle 'used' here... * cgraphunit.c (cgraph_finalize_function): ... and here ... * c-common.c: (handle_used_attribute): ... not here. * configure.in (onstep): Support --enable-intermodule. * Makefile.in (OBJS-common): New. (OBJS-md): New. (OBJS-archive): New. (OBJS): Build from OBJS-common, OBJS-md, OBJS-archive. (OBJS-onestep): New. (libbackend.a): Support @onestep@. (libbackend.o): New. * configure: Regenerate. * c-common.h (c_reset_state): New prototype. (c_parse_file): New prototype. (finish_file): Move prototype from c-tree.h. * c-decl.c: Include <hashtab.h>. (builtin_decls): New. (current_file_decl): New. (duplicate_decls): Add extra parameter. Change all callers. Don't output duplicate common symbols. (link_hash_hash): New. (link_hash_eq): New. (poplevel): Handle popping of the top level. (warn_if_shadowing): Handle TRANSLATION_UNIT_DECL. (pushdecl): Set DECL_CONTEXT to TRANSLATION_UNIT_DECL if appropriate. (pushdecl_top_level): Likewise. (redeclaration_error_message): Handle TRANSLATION_UNIT_DECL. (c_init_decl_processing): Create TRANSLATION_UNIT_DECL. (finish_decl): Handle TRANSLATION_UNIT_DECL. (merge_translation_unit_decls): New. (c_write_global_declarations): New. (c_reset_state): New. (implicitly_declare): Handle TRANSLATION_UNIT_DECL. * c-lang.c (LANG_HOOKS_WRITE_GLOBALS): New. * c-objc-common.c (c_cannot_inline_tree_fn): Handle TRANSLATION_UNIT_DECL. (c_objc_common_finish_file): Call merge_translation_unit_decls. * c-opts.c (in_fnames): Rename from in_fname. (c_common_decode_option): Handle multiple input filenames. (c_common_post_options): Likewise. (c_common_parse_file): Likewise; also, call c_parse_file rather than yyparse. * c-parse.in: Move cleanup code to c_parse_file. (free_parser_stacks): Move contents to c_parse_file. (c_parse_file): New. * c-tree.h (union lang_tree_node): Chain along TYPE_NEXT_VARIANT for integer types. (C_DECL_FILE_SCOPE): New. (finish_file): Move prototype to c-common.h. (merge_translation_unit_decls): New prototype. (comptypes): Add extra parameter to prototype. (c_write_global_declarations): New prototype. * c-typeck.c (tagged_types_tu_compatible_p): New. (function_types_compatible_p): Add extra parameter, change all callers. (type_lists_compatible_p): Likewise. (comptypes): Likewise. (struct tagged_tu_seen): New. (tagged_tu_seen_base): New. (build_unary_op): Handle TRANSLATION_UNIT_DECL. (c_mark_addressable): Remove #if 0 code. * calls.c (special_function_p): Handle TRANSLATION_UNIT_DECL, add comment explaining why it shouldn't have to. * cgraph.h (struct cgraph_node): Add chain_next and chain_prev GTY options. * cppinit.c (cpp_read_next_file): New. (cpp_read_main_file): Use it. * cpplib.c (undefine_macros): New. (cpp_undef_all): New. * cpplib.h (cpp_read_next_file): Prototype. (cpp_undef_all): Prototype. * langhooks-def.h (write_global_declarations): Remove prototype. * toplev.h (write_global_declarations): Add prototype. * tree.c (decl_type_context): Use switch statement, handle TRANSLATION_UNIT_DECL. * tree.def: Update documentation for TRANSLATION_UNIT_DECL. (TRANSLATION_UNIT_DECL): New kind of tree. * tree.h: Update documentation for TRANSLATION_UNIT_DECL. * Makefile.in (c-decl.o): Add $(HASHTAB_H) to dependencies. * doc/invoke.texi: Make attempt to document new functionality. 2003-05-19 Per Bothner <bothner@apple.com> * gcc.c (combine_inputs): New. (process_command): Set combine_inputs. (do_spec_1): Handle combine_inputs. (main): Likewise. Index: cp/ChangeLog 2003-07-10 Geoffrey Keating <geoffk@apple.com> * decl.c (cp_finish_decl): Handle 'used' attribute. * cp-lang.c (c_reset_state): New dummy routine. * cp-tree.h (finish_file): Move prototype to c-common.h. * parser.c (c_parse_file): Rename from yyparse; don't call finish_file. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@69224 138bc75d-0d04-0410-961f-82ee72b054a4
2003-07-09 * cgraph.c (cgraph_node_name): New function.Jan Hubicka
(dump_cgraph): Use it. * cgraph.h (cgraph_dump_file): Declare. (cgraph_node_name): Declare. * cgraphunit.c: Include timevar.h (cgraph_finalize_compilation_unit): Use timevar; reorganize dumps. (cgraph_optimize_function): Use TV_INTEGRATION. (cgraph_mark_local_functions): reorganize dumps. (cgraph_mark_functions_to_inline_once): Likewise. (cgraph_optimize): Likewise; use timevar. * timevar.def (TV_CGRAPH, TV_CGRAPHOPT): New. * toplev.c (dump_file_index): Add DFI_cgraph. (dump_file_info): Likewise. (cgraph_dump_file): New global variable. (do_compile): Open and close cgraph dump. * invoke.texi (-d): Document new flag; renumber. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@69120 138bc75d-0d04-0410-961f-82ee72b054a4
2003-07-02 * cgraph.c (cgraph_mark_needed_node, cgraph_varpool_mark_needed_node,Jan Hubicka
cgraph_varpool_finalize_decl, cgraph_varpool_assemble_pending_decls): Use next_needed field instead of aux to maintain the queue. * cgraph.h (cgraph_node): Add next_needed. (cgraph_varpool_node): Add next_needed; remove aux. * cgraphunit.c (cgraph_finalize_compilation_unit): Use next_needed. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@68807 138bc75d-0d04-0410-961f-82ee72b054a4
2003-07-02 * cgraphunit.c (cgraph_finalize_function): Set finalized.Jan Hubicka
(cgraph_finalize_function): Do not examine inlinablility. (cgraph_finalize_compilation_unit): Do it here. * cgraph.h (cgraph_local_info): Add finalized field. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@68803 138bc75d-0d04-0410-961f-82ee72b054a4
2003-07-01 * basic-block.h: Fix comment typos.Kazu Hirata
* bb-reorder.c: Likewise. * c-format.c: Likewise. * cfgcleanup.c: Likewise. * cfghooks.h: Likewise. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.h: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * dbxout.c: Likewise. * df.c: Likewise. * df.h: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * et-forest.h: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.h: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genautomata.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * loop.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * ra-build.c: Likewise. * ra-colorize.c: Likewise. * ra-rewrite.c: Likewise. * ra.h: Likewise. * regmove.c: Likewise. * reload.c: Likewise. * rtlanal.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-vis.c: Likewise. * sreal.c: Likewise. * ssa-ccp.c: Likewise. * ssa.c: Likewise. * toplev.c: Likewise. * tree-inline.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@68770 138bc75d-0d04-0410-961f-82ee72b054a4
2003-06-30 * Makefile.in (GTFILES): Add cgraph.h.Jan Hubicka
* cgraph.c (known_decls): Remove. (cgraph_hash, cgraph_nodes, cgraph_nodes_queue, cgraph_varpool_hash, cgraph_varpool_nodes_queue): GTYize. (cgraph_node): Do not allocate known_decls; use polutate hashtable. (cgraph_varpool_node): Likewise; add next pointer. (cgraph_varpool_nodes): New static variable. * cgraph.h (cgraph_local_info, cgraph_global_info, cgraph_rtl_info, cgraph_node, cgraph_edge, cgraph_varpool_node, cgraph_nodes, cgraph_n_nodes, cgraph_varpool_n_nodes, cgraph_varpool_nodes_queue): GTYize. * gengtype.c (open_base_files): Include cgraph.h git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@68742 138bc75d-0d04-0410-961f-82ee72b054a4
2003-06-24 * Makefile.in (cgraph.o): Depend on output.h, not depend onJan Hubicka
tree-inline.h * cgraph.c: Do not include tree-inline.h; include output.h (known_fns): Rename to ... (known_decls): ... this one; update all uses. (cgraph_varpool_hash): New static variable. (cgraph_varpool_n_nodes, cgraph_varpool_nodes_queue): New global variables. (cgraph_varpool_hash_node, eq_cgraph_varpool_node, cgraph_varpool_node, cgraph_varpool_node_for_identifier, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_assemble_pending_decls): New functions. * cgraph.h (cgraph_varpool_node): New structure. (cgraph_varpool_n_nodes, cgraph_varpool_nodes_queue): Declare. (cgraph_varpool_node, cgraph_varpool_node_for_identifier, cgraph_varpool_finalize_decl, cgraph_varpool_mark_needed_node, cgraph_varpool_asemble_pending_decls): Declare. * cgraphunit.c (record_call_1): Notice variable references. (cgraph_finalize_compilation_unit): Assemble pending variables. * toplev.c (wrapup_global_declarations): Use varpool. (compile_file): Assemble pending declarations. (rest_of_decl_compilation): Use varpool in unit-at-a-time mode. * varasm.c (assemble_name): Notice varpool references. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@68426 138bc75d-0d04-0410-961f-82ee72b054a4
2003-06-23 * cgraph.c (cgraph_nodes_queue): Declare.Jan Hubicka
(eq_node): Take identifier as p2. (cgraph_node): Update htab_find_slot_with_hash call. (cgraph_node_for_identifier): New. (cgraph_mark_needed_node): Move here from cgraphunit.c. * cgraph.h (cgraph_nodes_queue): Declare. (cgraph_node_for_identifier): Declare. * cgraphunit.c (cgraph_finalize_function): Collect entry points here instead of in cgraph_finalize_compilation_unit; constructors and destructors are entry points. (cgraph_finalize_compilation_unit): Reorganize debug outout; examine nested functions after lowerng; call collect_functions hook. (cgraph_mark_local_functions): DECL_COMDAT functions are not local. (cgraph_finalize_compilation_unit): Do not collect entry points. * varasm.c: Include cgraph.h (assemble_name): Mark referenced identifier as needed. * cgraphunit.c (record_call_1): Use get_callee_fndecl. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@68390 138bc75d-0d04-0410-961f-82ee72b054a4
2003-03-08 * gcc.dg/inline-3.c: New test.Jan Hubicka
* c-decl.c: (finish_function): Update call of tree_inlinable_function_p. * cgraph.h: (cgraph_local_info): Add can_inline_once (cgraph_global_info): Add inline_once. (cgraph_node): Add previous. (cgraph_remove_node): New. * cgraphunit.c (cgraph_mark_functions_to_inline_once): New static function. (cgraph_optimize): Call it. (cgraph_finalize_function): Set inlinable flags. (cgraph_finalize_compilation_unit): Actually remove the reclaimed nodes. (cgraph_mark_functions_to_output): Use new inlining heuristics flags. (cgraph_expand_function): Likewise. * cgraph.c (cgraph_node): Put nodes into doubly linked chain. (cgraph_remove_node): New function. * flags.h (flag_inline_functions_called_once): Declare. * tree-inline.c: Include cgraph.h (inlinable_functions_p): Add extra argument to bypass limits. (expand_call_inline): Obey cgraph flag. * tree-inline.h (tree_inlinable_function_p): Update prototype. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@63983 138bc75d-0d04-0410-961f-82ee72b054a4
2003-03-05 * Makefile.in (calls.o, toplev.o alias.o): Depend on cgraph.hJan Hubicka
* alias.c: Include cgraph.h (mark_constant_function): Use cgraph_rtl_info. * calls.c: Include cgraph.h (flags_from_decl_or_type): Use cgraph_rtl_info to find pure and const calls. (expand_call): Use cgraph_rtl_info to set preferred stack boundary. * cgraph.c (cgraph_rtl_info): New function. * cgraph.h (cgraph_rtl_info): Declare (cgraph_rtl_info): Likewise. * function.h (struct function): Add recursive_call_emit. * toplev.c: Include cgraph.h. (rest_of_compilation): Set preferred_incoming_stack_boundary. * gcc.dg/i386-local2.c: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@63868 138bc75d-0d04-0410-961f-82ee72b054a4
2003-03-05 * gcc.dg/i386-local.c: New.Jan Hubicka
* toplev.c (rest_of_compilation): Deffer RTL compilation only when RTL inlining is done. * cgraphunit.c (cgraph_mark_local_functions): New local function. (cgraph_optimize): Mark local functions. * i386-protos.h (init_cumulative_args): Update prototype. * i386.c (init_cumulative_args): Use register passing convention for local functions. * cgraph.c (cgraph_global_info_ready): New global variable (cgraph_local_info, cgraph_global_info): New functions. * cgraph.h (struct cgraph_local_info, cgraph_global_info): New structures. (cgraph_local_info, cgraph_global_info, cgraph_global_info_ready): Declare. * cgraphunit.c (cgraph_finalize_function): Set inline_many. (cgraph_mark_functions_to_output): Use inline_many. (cgraph_expand_function): Free DECL_SAVED_TREE uncondtionally. (cgraph_expand_functions): Expand inline functions last. (cgraph_optimize): Do not emit uneeded functions. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@63822 138bc75d-0d04-0410-961f-82ee72b054a4
2003-02-22 * expmed.c (expand_divmod): Undo sign extensions for unsigned operandsJan Hubicka
* cfgcleanup.c (try_forward_edges): Don't check loop structures when not optimizing. (cleanup_cfg): Do not iterate trought delete_trivially_dead_insns when not expensive. * toplev.c (rest_of_compilation): Duplicate loop headers only when optimizing; Delete trivially dead insns early; fix optimize check. * Makefile.in (c-decl.o, c-objc-common.o, cgraph.o, tree-inline.o): Add dependency on cgraph.h * c-decl.c: Include cgraph.h (finish_function): Update call of tree_inlinable_function_p. * c-objc-common.c: Include cgraph.h * cgraph.h: New file. * cgraphunit.c: New file. * cgraph.c (cgraph_node, cgraph_edge): Move into cgraph.h (cgraph_nodes, cgraph_n_nodes): Globalize. (cgraph_finalize_function, cgraph_finalize_compilation_unit cgraph_create_edges, cgraph_optimize, cgraph_mark_needed_node): Move into cgraphunit.c * tree-inline.c: Include cgraph.h * tree-inline.c: Include cgraph.h git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@63281 138bc75d-0d04-0410-961f-82ee72b054a4