summaryrefslogtreecommitdiffstats
path: root/gcc/cgraph.c
Commit message (Collapse)AuthorAgeFilesLines
* * c-common.c, calls.c, cfgcleanup.c, cgraph.c, cgraphunit.c,kazu2004-05-301-1/+1
| | | | | | | | | | | | ddg.c, ddg.h, df.c, df.h, except.c, expr.c, flags.h, fold-const.c, gcc.c, gimplify.c, haifa-sched.c, modulo-sched.c, tree-inline.c, tree-into-ssa.c, tree-nested.c, tree-nrv.c, tree-ssa-ccp.c, tree-ssa-dom.c, tree-ssa-live.c, tree-ssa-loop.c, tree-ssa-pre.c, tree-tailcall.c, tree.h: Fix comment typos. Follow spelling conventions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82439 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-05-22 Andrew Pinski <pinskia@physics.uc.edu>zack2004-05-221-28/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82140 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (hash_node, eq_node, cgraph_node, cgraph_remove_node)zack2004-05-201-18/+10
| | | | | | | | | (cgraph_varpool_hash_node, eq_cgraph_varpool_node) (cgraph_varpool_node): Hash on the pointer to the decl, not the DECL_UID. Fixes 64-bit bootstrap failure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82059 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (hash_node, eq_node, cgraph_node, cgraph_remove_node)zack2004-05-191-122/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82015 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge tree-ssa-20020619-branch into mainline.dnovillo2004-05-131-10/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
* * bb-reorder.c, c-opts.c, cfglayout.c, cgraph.c, cgraphunit.c,kazu2004-04-301-8/+8
| | | | | | | | | | | | | | | | | cppfiles.c, fold-const.c, ggc-zone.c, loop-doloop.c, optabs.c, reg-stack.c, varasm.c, config/alpha/ev4.md, config/alpha/ev5.md, config/alpha/ev6.md, config/arm/arm.c, config/c4x/c4x.c, config/c4x/c4x.md, config/cris/cris.c, config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.c, config/frv/frv.h, config/frv/frv.md, config/h8300/h8300.c, config/i386/i386.c, config/i386/i386.md, config/i386/winnt.c, config/ia64/itanium2.md, config/ip2k/ip2k.c, config/mips/mips.c, config/mips/mips.h, config/mips/sr71k.md, config/pa/pa.c, config/s390/s390.c, config/sh/sh.c: Fix comment typos. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81345 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c, cgraph.c, cgraphunit.c, final.c, fold-const.c:kazu2004-04-291-5/+5
| | | | | | | Fix comment typos. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81291 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c: Add overall comment.hubicka2004-04-011-95/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80334 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) ()sayle2004-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with lang_hooks.foo (). * builtins.c (expand_builtin_va_arg): Likewise. * c-common.c (fname_as_string, c_common_truthvalue_conversion, c_common_type_for_mode, c_common_nodes_and_builtins, handle_mode_attribute, handle_vector_size_attribute): Likewise. * c-convert.c (convert): Likewise. * c-format.c (check_format_types): Likewise. * c-objc-common.c (c_tree_printer): Likewise. * c-typeck.c (build_unary_op, build_conditional_expr, build_binary_op): Likewise. * calls.c (try_to_integrate, expand_call, emit_library_call_value_1): Likewise. * cgraph.c (cgraph_node_name, cgraph_function_possibly_inlined_p): Likewise. * cgraphunit.c (record_call_1, cgraph_analyze_function, cgraph_expand_function): Likewise. * convert.c (convert_to_pointer, convert_to_integer): Likewise. * coverage.c (build_fn_info_type, build_ctr_info_type, build_gcov_info, create_coverage): Likewise. * dbxout.c (dbxout_init): Likewise. * diagnostic.c (diagnostic_report_current_function): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2_name): Likewise. * except.c (init_eh): Likewise. * explow.c (expr_size, int_expr_size): Likewise. * expmed.c (make_tree, const_mult_add_overflow_p, expand_mult_add): Likewise. * expr.c (store_expr, store_constructor, safe_from_p, expand_expr_real, do_store_flag, try_casesi): Likewise. * function.c (push_function_context_to, pop_function_context_from, free_after_parsing, assign_stack_local_1, assign_stack_temp_for_type, put_var_into_stack, allocate_struct_function, current_function_name): Likewise. * integrate.c (copy_decl_for_inlining, expand_inline_function): Likewise. * langhooks.c (lhd_clear_binding_stack, write_global_declarations, lhd_print_error_function): Likewise. * opts.c (handle_option, decode_options): Likewise. * passes.c (open_dump_file): Likewise. * print-tree.c (print_node): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_asm_operands, expand_decl_cleanup, emit_case_nodes): Likewise. * stor-layout.c (variable_size): Likewise. * toplev.c (announce_function, wrapup_global_declarations, check_global_declarations, compile_file, default_tree_printer, process_options, lang_dependent_init, finalize): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-inline.c (remap_decl, remap_block, copy_body_r, initialize_inlined_parameters, declare_return_variable, inlinable_function_p, expand_call_inline, optimize_inline_calls, walk_tree, copy_tree_r): Likewise. * tree-optimize.c (tree_rest_of_compilation): Likewise. * tree.c (decl_assembler_name, tree_size, size_in_bytes, staticp, unsafe_for_reeval, get_unwidened, get_narrower, get_callee_fndecl, variably_modified_type_p, dump_tree_statistics): Likewise. * varasm.c (assemble_variable, compare_constant, copy_constant, force_const_mem, compute_reloc_for_constant, output_constant, output_addressed_constants, initializer_constant_valid_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79481 138bc75d-0d04-0410-961f-82ee72b054a4
* * (c-decl.c, c-semantics.c, calls.c, cgraph.c, cgraphunit.c,steven2004-02-171-1/+1
| | | | | | | | | | | | function.c, integrate.c, print-tree.c, toplev.c, tree-optimize.c, tree.h): Replace DECL_SAVED_INSNS with DECL_STRUCT_FUNCTION. * ada/utils.c: Likewise. * cp/decl.c: Likewise. * f/com.c: Likewise. * java/class.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77985 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/12850hubicka2004-01-291-0/+3
| | | | | | | | | | | | | | | | * cgraph.c (cgraph_remove_node): Clear out saved/insns/arguments and initial pointers. * cgraphunit.c (cgraph_finalize_function): Clear out DECL_SAVED_INSNS for functions that will be only inlined. (cgraph_mark_function_to_output): Likewise. (cgraph_expand_function): Sanity check that DECL_DEFER_OUTPUT is clear; do not clear function body. * tree-optimize.c (clear_decl_rtl): Use decl_function_context. (tree_rest_of_compilation): Reorganize the logic releasing function body to use callgraph datastructure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76822 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_remove_node): Fix removal from linked list.hubicka2004-01-191-1/+1
| | | | | | | | | | | | * cgraphunit.c (cgraph_finalize_compilation_unit): Clear next_needed list. (cgraph_remove_unreachable_nodes): New function (cgraph_decide_inlining_of_small_function): Fix pasto. (cgraph_decide_inlining_incrementally): Fix pasto. (cgrpah_decide_inlining): Likewise; remove unreachable nodes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76142 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (create_edge): Use local.redefined_extern_inline.hubicka2004-01-141-0/+3
| | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75890 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (cgraph.o, cgraphunit.o): Add intl.h dependency.hubicka2004-01-041-4/+11
| | | | | | | | | | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75391 138bc75d-0d04-0410-961f-82ee72b054a4
* PR opt/13473hubicka2004-01-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * recog.c (validate_replace_rtx_1): Take care for RTL sharing inside ASM input operands PR opt/12617 * toplev.c (dump_file_index): Reorder ce3 and bbro. (dump_file): Likewise. (rest_of_compilation): Likewise. PR debug/13367 * cgraph.c (cgraph_function_possibly_inlined): Even with flag_really_no_inline we inline always_inline functions. * cgraphunit.c (cgraph_analyze_function): Clear inlinable flag for non-always_inline functions when there is flag_really_no_inline. (cgraph_decide_inlining): Limit work done when not inlining. (cgraph_decide_inlining_incrementally): Likewise. (cgraph_optimize_function): Check whether something got inlined. * c-objc-common.c (c_disregard_inline_limits): Do not always inline extern inline functions when not inlining. * opts.c (decode_options): Disable crossjumping at -O1 * invoke.texi (-O1): Document change. * gcc.dg/debug/20031231-1.c: New. * gcc.c-torture/compile/20040101-1.c: New. * gcc.dg/dwarf-die-[1-7].c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75303 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c: Fix comment formatting.kazu2003-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloc-pool.c: Likewise. * bitmap.c: Likewise. * bitmap.h: Likewise. * bt-load.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-opts.c: Likewise. * c-pretty-print.c: Likewise. * caller-save.c: Likewise. * cfghooks.h: Likewise. * cgraph.c: Likewise. * collect2.c: Likewise. * cppfiles.c: Likewise. * cpplib.h: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * final.c: Likewise. * function.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genemit.c: Likewise. * ggc.h: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * libgcc2.h: Likewise. * loop.c: Likewise. * predict.h: Likewise. * unwind-libunwind.c: Likewise. * varasm.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74907 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (change_decl_assembler_name): Avoid bogus warnings.hubicka2003-11-181-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73703 138bc75d-0d04-0410-961f-82ee72b054a4
* PR opt/12275hubicka2003-11-131-2/+78
| | | | | | | | | | | | | | | * c-decl.c (finish_decl): Use change_decl_assembler_name. * c-pragma.c (handle_pragma_redefine_extname): Likewise. * varasm.c (make_decl_rtl): Likewise. * cgraph.c (change_decl_assembler_name): New function. * tree.h (set_decl_assembler_name): Kill dead declaration. (change_decl_assembler_name): Declare. * decl.c (make_rtl_for_nonlocal_decl): Use change_decl_assembler_name. * decl2.c (make_rtl_for_nonlocal_decl): Use change_decl_assembler_name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73532 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraphunit.c (cgraph_function_possibly_inlined_p): Usehubicka2003-11-111-1/+1
| | | | | | | really_no_inline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73454 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_function_possibly_inlined_p): Be conservative whenhubicka2003-10-221-3/+1
| | | | | | | global info is not ready. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72816 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/12389hubicka2003-10-221-0/+10
| | | | | | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72795 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_node): Use INSERT instead of 1 inzlomek2003-10-021-5/+5
| | | | | | | | | | | htab_find_slot_with_hash. (cgraph_node_for_identifier): Use NO_INSERT. (cgraph_remove_node): Use NO_INSERT. (cgraph_varpool_node): Use INSERT. (cgraph_varpool_node_for_identifier): Use NO_INSERT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72031 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-09-23 Kelley Cook <kelleycook@wideopenwest.com>kcook2003-09-261-4/+6
| | | | | | | | | | | | | * cgraph.c (dump_cgraph): Don't output newline before dump. Add in "local" to the callgraph dump. Output "after inlining" earlier. * cgraphunit.c: Fix dumpfile whitespace and commonize headers of the callgraph dumps. Correct misspellings. (cgraph_decide_inlining): Output number of insns before inlining. Output the calling function into which a function is inlined. (cgraph_decide_small_functions): Format dump file like always_inline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71804 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.h (cgraph_remove_edge): Declare.rsandifo2003-09-251-2/+1
| | | | | | | | | * cgraph.c (cgraph_remove_edge): Make extern. * cgraphunit.c (cgraph_finalize_function): Call cgraph_remove_edge instead of cgraph_remove_call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71784 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c: Fix typo in debugging output.kcook2003-09-191-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71567 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_varpool_finalize_decl): Sanity check duplicatedhubicka2003-09-091-2/+8
| | | | | | | | | | | | | | | | finalization. * cgraphunit.c (decide_is_fnction_needed): Avoid special case of nested functions, check for COMDAT. (cgraph_assemble_pending_functions): Break out from... (cgraph_finalize_function): ... here; allow redefinig of extern inline functions. (record_call_1): Record function references only in non-unit-at-a-time mode. (cgraph_analyze_function): Reset current_function_decl. (cgraph_finalize_compilation_unit): Assemble pending functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71221 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_mark_reachable_node): Only enqueue finalizedhubicka2003-09-061-2/+3
| | | | | | | | functions. (cgraph_varpool_finalize_decl): Notice global symbol when needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71149 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_mark_reachable_node): Split out from ...rth2003-09-051-7/+13
| | | | | | | | | | | | | | | | | (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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71104 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_mark_needed_node): Call notice_global_symbol.hubicka2003-08-191-0/+2
| | | | | | | | | | | (cgraph_varpool_mark_needed_node): Likewise. * cgraph.h (notice_global_symbol): Declare * varasm.c (notice_global_symbol): Break out from ... (assemble_start_function): ... here; update for variables. (assemble_variable): Use notice_global_symbol. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70559 138bc75d-0d04-0410-961f-82ee72b054a4
* * i386.c (ix86_fntype_regparm): Rename from ...hubicka2003-08-161-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70504 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>steven2003-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70174 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (create_edge): Fix typo.hubicka2003-07-311-1/+1
| | | | | | | * i386.c (pic_symbolic_operand): Reorder tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70006 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_remove_node): Clear the hash table slot.hubicka2003-07-181-0/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69562 138bc75d-0d04-0410-961f-82ee72b054a4
* * fp-test.c (main): Use ISO C90 prototype.aj2003-07-121-43/+25
| | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69265 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_max_uid): New global variable.hubicka2003-07-121-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69262 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_node_name): New function.hubicka2003-07-091-7/+11
| | | | | | | | | | | | | | | | | | | | | (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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69120 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_mark_needed_node, cgraph_varpool_mark_needed_node,hubicka2003-07-021-5/+5
| | | | | | | | | | | 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68807 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (GTFILES): Add cgraph.h.hubicka2003-06-301-47/+33
| | | | | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68742 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c: Follow spelling conventions.kazu2003-06-281-1/+1
| | | | | | | | | | | | | | | | * cgraph.c: Likewise. * cpplex.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/iwmmxt.md: Likewise. * config/c4x/c4x-modes.def: Likewise. * config/c4x/c4x.c: Likewise. * config/c4x/c4x.h: Likewise. * config/c4x/c4x.md: Likewise. * config/i386/i386-interix.h: Likewise. * config/mips/mips.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68648 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_node, cgraph_varpool_node): Avoid re-initializinghubicka2003-06-271-2/+4
| | | | | | | of known_decls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68573 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (cgraph.o): Depend on output.h, not depend onhubicka2003-06-241-8/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68426 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_nodes_queue): Declare.hubicka2003-06-231-2/+52
| | | | | | | | | | | | | | | | | | | | | | | (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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68390 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:ghazi2003-06-161-5/+5
| | | | | | | | | | | | | | | | | | | * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR macro. gcc: * bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c, config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c, dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c, function.c, gcc.c, genoutput.c, gensupport.c, global.c, haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c, loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c, read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c, stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use the PTR macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68043 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog: Follow spelling conventions.kazu2003-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog.2: Likewise. * c-decl.c: Likewise. * cfgloop.h: Likewise. * cgraph.c: Likewise. * coverage.c: Likewise. * cppcharset.c: Likewise. * cpphash.h: Likewise. * cpplex.c: Likewise. * cpplib.c: Likewise. * dbxout.c: Likewise. * df.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gengtype.c: Likewise. * ggc.h: Likewise. * opts.c: Likewise. * real.c: Likewise. * reload.c: Likewise. * stmt.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67849 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (cgraph.o): Depend on gt-cgraph.h and varray.h.hubicka2003-03-081-1/+18
| | | | | | | | | * gt-cgraph.h: New GC file. * cgraph.c (known_fns): New static variable. (cgraph_node): Add the decl into varray. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63998 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc.dg/inline-3.c: New test.hubicka2003-03-081-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63983 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_node): Do not confuse nested functions and methods.hubicka2003-03-061-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63889 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (calls.o, toplev.o alias.o): Depend on cgraph.hhubicka2003-03-051-0/+16
| | | | | | | | | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63868 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc.dg/i386-local.c: New.hubicka2003-03-051-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63822 138bc75d-0d04-0410-961f-82ee72b054a4
* * expmed.c (expand_divmod): Undo sign extensions for unsigned operandshubicka2003-02-221-371/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63281 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud