summaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
Commit message (Collapse)AuthorAgeFilesLines
* gcc/ChangeLog:dodji2008-11-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | 2008-11-12 Dodji Seketeli <dodji@redhat.com> PR debug/27574 * cgraph.h: New abstract_and_needed member to struct cgraph_node. * cgraphunit.c (cgraph_analyze_functions): Flag abstract functions - which clones are reachable - as "abstract and needed". * cgraph.c (cgraph_release_function_body): If a node is "abstract and needed", do not release its DECL_INITIAL() content because that will be needed to emit debug info. gcc/testsuite/ChangeLog: 2008-11-12 Dodji Seketeli <dodji@redhat.com> PR debug/27574 * g++.dg/debug/dwarf2/local-var-in-contructor.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141807 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-09-11 Martin Jambor <mjambor@suse.cz>jamborm2008-09-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140293 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_remove_node): Do not remove nested nodes.hubicka2008-08-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139772 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.c (build_function_type_skip_args, build_function_decl_skip_args):hubicka2008-08-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | New functions. * tree.h (build_function_type_skip_args, build_function_decl_skip_args): Declare. * gimple.c (giple_copy_call_skip_args): New function. (giple_copy_call_skip_args): Declare. * cgraph.h (cgraph_function_versioning): Add skip_args arugmnet * ipa-cp.c (ipcp_node_not_modifiable_p): Rename to ... (ipcp_node_modifiable_p): ... this one; use tree_versionable_function_p. (ipcp_create_replace_map): Improve debug output. (ipcp_need_redirect_p): Return false when not clonning. (ipcp_update_callgraph): Skip args. (ipcp_insert_stage): UPdate call of !ipcp_node_modifiable_p; skip args. * cgraphunit.c (cgraph_function_versioning): Add skip_args argument. (save_inline_function_body): Update call of tree_function_versioning. * ipa-prop.c (ipa_edge_removal_hook): Do not ICE on unanalyzed nodes. * tree-inline.c (copy_arguments_for_versioning): Add skip_args argument. (tree_function_versioning): Likewise. * tree-inline.h (tree_function_versioning): Update prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139761 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (first_cgraph_function_insertion_hook): New variable.hubicka2008-08-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): New functions. * cgraph.h (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): Declare. * ipa-reference.c (function_insertion_hook_holder): New variable. (check_operand, look_for_address_of): When checking late, do not care about module bitmaps. (add_new_function): New function. (generate_summary): Register hooks; zero module bitmaps. (propagate): Unregister hooks. * ipa-pure-const.c (function_insertion_hook_holder): New variable. (add_new_function): New function. (generate_summary): Register hook. (propagate): Remove hook. * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0. * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass. * ipa-cp.c (ipcp_update_cloned_node): New function. (build_const_val): Handle functions correctly; bring type logic into sync with tree-inline.c (ipcp_init_stage): Take care of computing stuff needed by indirect inlining; update clones. (ipcp_generate_summary): Break out of ipcp_driver. (ipcp_driver): Do only execution and transformation. (pass_ipa_cp): Make IPA_PASS. * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold offset to address. * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing ipcp, some info is already available. * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed. * tree-inline.c (remap_ssa_name): Unshare expression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139389 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-07-28 Richard Guenther <rguenther@suse.de>rguenth2008-07-281-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138207 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-07-23 Martin Jambor <mjambor@suse.cz>jamborm2008-07-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138092 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.h (varpool_empty_needed_queue): Declare.hubicka2008-07-161-0/+1
| | | | | | | | | | | * cgraphunit.c (output_in_order): Mark all variables as needed; empty the queue. * varpool.c (varpool_assemble_node): Update debug queue. (varpool_assemble_pending_decls): Don't do it here. (varpool_empty_needed_queue): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137903 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (assembler_name_hash): New static var.hubicka2008-07-131-1/+1
| | | | | | | | | | | | | | | | (hash_node_by_assembler_name, eq_assembler_name): New. (cgraph_node_for_asm): Use hashtable. (cgraph_remove_node): Maintain hashtable. (change_decl_assembler_name): Sanity check that names are not changing after aliasing was processed. * cgraph.h (varpoon_node): Add next GGC marker. * tree.c (decl_assembler_name_equal): Constify. (decl_assembler_name_hash): New. * tree.h (decl_assembler_name_equal): Constify. (decl_assembler_name_hash): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137753 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-07-07 Martin Jambor <mjambor@suse.cz>jamborm2008-07-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cgraph.c (cgraph_edge_max_uid): New variable. (struct cgraph_edge_hook_list): New type. (struct cgraph_node_hook_list): New type. (struct cgraph_2edge_hook_list): New type. (struct cgraph_2node_hook_list): New type. (first_cgraph_edge_removal_hook): New variable. (first_cgraph_node_removal_hook): New variable. (first_cgraph_edge_duplicated_hook): New variable. (first_cgraph_node_duplicated_hook): New variable. (cgraph_add_edge_removal_hook): New function. (cgraph_remove_edge_removal_hook): New function. (cgraph_call_edge_removal_hooks): New function. (cgraph_add_node_removal_hook): New function. (cgraph_remove_node_removal_hook): New function. (cgraph_call_node_removal_hooks): New function. (cgraph_add_edge_duplication_hook): New function. (cgraph_remove_edge_duplication_hook): New function. (cgraph_call_edge_duplication_hooks): New function. (cgraph_add_node_duplication_hook): New function. (cgraph_remove_node_duplication_hook): New function. (cgraph_call_node_duplication_hooks): New function. (cgraph_create_edge): Assign to edge uid. (cgraph_remove_edge): Call edge removal hooks. (cgraph_node_remove_callees): Call edge removal hooks. (cgraph_node_remove_callers): Call edge removal hooks. (cgraph_remove_node): Call node removal hooks. (cgraph_clone_edge): Call edge duplication hooks. (cgraph_clone_node): Call node duplication hooks. * cgraph.h (cgraph_edge): New field uid. (cgraph_edge_hook): New type. (cgraph_node_hook): New type. (cgraph_2edge_hook): New type. (cgraph_2node_hook): New type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137591 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.h (cgraph_mark_if_needed): New function.hubicka2008-06-181-0/+1
| | | | | | | | * cgraphunit.c (cgraph_mark_if_needed): New function. * c-decl.c (duplicate_decl): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136893 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-05-15 Kenneth Zadeck <zadeck@naturalbridge.com>zadeck2008-05-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * cgraph.h (compute_inline_parameters): Made public. * tree-pass.h (ipa_opt_pass): Removed function_generate_summary, variable_generate_summary, function_write_summary, variable_write_summary, variable_read_summary. Added generate_summary, write_summary, read_summary. * cgraphunit.c (cgraph_process_new_functions): Changed call from pass_ipa_inline.function_generate_summary, to compute_inline_parameters. * ipa-inline.c (compute_inline_parameters): Made public and added node parameter. (compute_inline_parameters_for_current): New function. (pass_inline_param): Now calls compute_inline_parameters_for_current. (inline_generate_summary): Removed parameter and made to loop over all cgraph nodes. (pass_ipa_inline): Updated for new IPA_PASS structure. * passes.c (execute_ipa_summary_passes): Now is called once per pass rather than once per node*pass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135401 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-05-09 H.J. Lu <hongjiu.lu@intel.com>hjl2008-05-101-1/+1
| | | | | | | | | | | | | | * calls.c (expand_call): Don't use callgraph to increase preferred_stack_boundary. * cgraph.h (cgraph_rtl_info): Use unsigned on preferred_incoming_stack_boundary. * final.c (rest_of_clean_state): Use unsigned on preferred_stack_boundary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135134 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (dump_cgraph_node): Update.hubicka2008-05-071-4/+6
| | | | | | | | | | | | | * cgraph.h (cgraph_local_info): Break out inline summary. * cgraphunit.c (cgraph_process_new_functions): Use inliner analysis hook. * ipa-inline (inline_summary): New accestor function. (cgraph_clone_inlined_nodes, cgraph_check_inline_limits, cgraph_decide_inlining, compute_inline_parameters): Update. * ipa.c (cgraph_remove_unreachable_nodes): Remove statistics. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135037 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/34969jakub2008-01-291-1/+3
| | | | | | | | | | | | | | * cgraph.h (cgraph_update_edges_for_call_stmt): New prototype. * cgraph.c (cgraph_update_edges_for_call_stmt): New function. * tree-inline.c (fold_marked_statements): Call cgraph_update_edges_for_call_stmt if folding a call statement. * cgraphunit.c (verify_cgraph_node): Set cfun to this_cfun for debug_generic_stmt calls, reset it back afterwards. * gcc.dg/pr34969.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131946 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks.h (struct lang_hooks_for_callgraph): Remove thirddnovillo2007-11-021-0/+2
| | | | | | | | | | | argument from function pointer ANALYZE_EXPR. Update all users. * cgraph.c (debug_cgraph_node): New. (debug_cgraph): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129845 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraphbuild.c (rebuild_cgraph_edges): Export.rakdver2007-09-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cgraph.h (rebuild_cgraph_edges): Declare. * tree-pass.h (pass_expand_omp_ssa): New. * omp-low.c (find_omp_clause): Export. (copy_var_decl): Split from omp_copy_decl_2. (build_omp_barrier): Return the call to emit instead of emitting it directly. (lower_rec_input_clauses, expand_omp_single): Gimplify the result of build_omp_barrier. (extract_omp_for_data, expand_parallel_call, expand_omp_parallel, expand_omp_for_generic, expand_omp_for_static_nochunk, expand_omp_for_static_chunk, expand_omp_for, expand_omp_sections): Adapted to work on SSA form. (execute_expand_omp): Do not invalidate dominance information. (gate_expand_omp): Do not run with -fopenmp-ssa flag. (gate_expand_omp_ssa, pass_expand_omp_ssa): New. * gimplify.c (gimplify_omp_for): Ensure that the control variable is a gimple_reg. (force_gimple_operand): Allow gimplifying code expressions without value. * tree-predcom.c (mark_virtual_ops_for_renaming): Handle phi nodes. * common.opt (fopenmp-ssa): New. * tree-flow.h (find_omp_clause, copy_var_decl): Declare. * Makefile.in (tree-cfg.o): Add TREE_INLINE_H dependency. * tree-cfg.c: Include tree-inline.h. (struct move_stmt_d): Replace vars_to_remove by vars_map field. (replace_by_duplicate_decl, replace_ssa_name, mark_virtual_ops_in_region): New functions. (move_stmt_r, move_block_to_fn, move_sese_region_to_fn): Adapted to work on SSA form. * passes.c (init_optimization_passes): Add pass_expand_omp_ssa pass. * tree-ssa-operands.c (get_expr_operands): Handle operands of OMP constructs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128223 138bc75d-0d04-0410-961f-82ee72b054a4
* Change copyright header to refer to version 3 of the GNU General Public ↵nickc2007-07-261-5/+4
| | | | | | License and to point readers at the COPYING3 file and the FSF's license web page. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126948 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-07 Razya Ladelsky <razya@il.ibm.com> razya2007-05-281-0/+5
| | | | | | | | | | | | | | | | | * matrix-reorg.c: New file. Implement matrix flattening and transposing optimization. * tree-pass.h: Add matrix reorg pass. * common.opt: Add fipa-mreorg flag. * Makefile.in: Add matrix-reorg.c. * passes.c: Add matrix reorg pass. * varpool.c (add_new_static_var): New function. * cgraph.h (add_new_static_var): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125126 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (passes.o, ipa-inline.o): Add dependencies.hubicka2007-02-091-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cgraphbuild.c (build_cgraph_edges): Compute frequencies. (rebuild_cgraph_edges): Likewise. * cgraph.c (cgraph_set_call_stmt): Add new argument frequency. (dump_cgraph_node): Dump frequencies. (cgraph_clone_edge): Add frequency scales. (cgraph_clone_node): Add freuqnecy. * cgraph.h (cgraph_edge): Add freuqnecy argument. (CGRAPH_FREQ_BASE, CGRAPH_FREQ_MAX): New constants. (cgraph_create_edge, cgraph_clone_edge, cgraph_clone_node): Update. * tree-pass.h (TODO_rebuild_frequencies): New constant. * cgraphunit.c (verify_cgraph_node): Verify frequencies. (cgraph_copy_node_for_versioning): Update call of cgraph_clone_edge. (save_inline_function_body): Likewise. * ipa-inline.c: inluce rtl.h (cgraph_clone_inlined_nods): Update call of cgraph_clone_node. (cgraph_edge_badness): Use frequencies. (cgraph_decide_recursive_inlining): Update clonning. (cgraph_decide_inlining_of_small_function): Dump frequency. * predict.c (estimate_bb_frequencies): Export. * predict.h (estimate_bb_frequencies): Declare. * tree-inline.c (copy_bb): Watch overflows. (expand_call_inline): Update call of cgraph_create_edge. (optimize_inline_calls): Use TODO flags to update frequnecies. * passes.h: Include predict.h (init_optimization_passes): Move profile ahead. (execute_function_todo): Handle TODO_rebuild_frequencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121780 138bc75d-0d04-0410-961f-82ee72b054a4
* Patch by Tomas Bily <tbily@suse.cz>hubicka2007-01-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cgraphunit.c (cgraph_finalize_function): Updating of pid * tree-profile.c: (tree_init_ic_make_global_vars): New function (tree_init_edge_profiler): call of tree_init_ic_make_global_vars (tree_gen_ic_profiler): New function (tree_gen_ic_func_profiler): New function (tree_profiling): Added calling of tree_gen_ic_func_profiler (tree_profile_hooks): Added hook for indirec/virtual calls * value-prof.c (tree_find_values_to_profile): New case for indirect calls (tree_values_to_profile): Call for determining indirect/virtual counters (tree_indirect_call_to_profile): New function (tree_ic_transform): New function (tree_ic): New function (find_func_by_pid): New function (init_pid_map): New function (tree_value_profile_transformations): Added check for indirect/virtual call transformation * value-prof.h (enum hist_type): New counter type for indirect/virtual calls (profile_hooks): Added new hook for profiling indirect/virtual calls * profile.c (instrument_values): New case for indirect/virtual call added * gcov-io.h (GCOV_LAST_VALUE_COUNTER): Changed to 6 (GCOV_COUNTER_V_INDIR): New counter type (GCOV_COUNTER_NAMES): New name of counter "indirect" added (GCOV_MERGE_FUNCTIONS): New merge function for indirect/virtual call added * cgraph.c: Definition of cgraph_max_pid (cgraph_create_node): Default init of pid attribute * cgraph.h: Declaration of cgraph_max_pid (struct cgraph_node): Added pid attribute * libgcov.c (__gcov_indirect_call_profiler): New function (__gcov_one_value_profiler_body): New function (__gcov_one_value_profiler): Body was moved to __gcov_one_value_profiler_body and calls it gcc.dg/tree-prof/indir-call-prof.c: New. g++.dg/dg.exp: Add tree-prof subdirectory. g++.dg/tree-prof/indir-call-prof.C: New. g++.dg/tree-prof/tree-prof.exp: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120975 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.h (cgraph_decide_inlining_incrementally): Kill.hubicka2007-01-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree-pass.h: Reorder to make IPA passes appear toegher. (pass_early_inline, pass_inline_parameters, pass_apply_inline): Declare. * cgraphunit.c (cgraph_finalize_function): Do not compute inling parameters, do not call early inliner. * ipa-inline.c: Update comments. Include tree-flow.h (cgraph_decide_inlining): Do not compute inlining parameters. (cgraph_decide_inlining_incrementally): Return TODOs; assume to be called with function context set up. (pass_ipa_inline): Remove unreachable functions before pass. (cgraph_early_inlining): Simplify assuming to be called from the PM as local pass. (pass_early_inline): New pass. (cgraph_gate_ipa_early_inlining): New gate. (pass_ipa_early_inline): Turn into simple wrapper. (compute_inline_parameters): New function. (gate_inline_passes): New gate. (pass_inline_parameters): New pass. (apply_inline): Move here from tree-optimize.c (pass_apply_inline): New pass. * ipa.c (cgraph_remove_unreachable_nodes): Verify cgraph after transforming. * tree-inline.c (optimize_inline_calls): Return TODOs rather than doing them by hand. (tree_function_versioning): Do not allocate dummy struct function. * tree-inline.h (optimize_inline_calls): Update prototype. * tree-optimize.c (execute_fixup_cfg): Export. (pass_fixup_cfg): Remove (tree_rest_of_compilation): Do not apply inlines. * tree-flow.h (execute_fixup_cfg): Declare. * Makefile.in (gt-passes.c): New. * passes.c: Include gt-passes.h (init_optimization_passes): New passes. (nnodes, order): New static vars. (do_per_function_toporder): New function. (execute_one_pass): Dump current pass here. (execute_ipa_pass_list): Don't dump current pass here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120835 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_release_function_body): New function.hubicka2007-01-041-0/+1
| | | | | | | | | | | | | | | (cgraph_remove_node): Use it. * cgraph.h (cgraph_release_function_body): Declare. * cgraphunit.c (cgraph_expand_function): Use it. * ipa.c (cgraph_remove_unreahchable_nodes): Use it. * tree-ssa.c (delete_tree_ssa): Allow to be called before aliasing is initialized and while compilation of other function is running. * tree-optimize.c (execute_free_cfg_annotations): Move code to clear statement CFG annotations from here to ... * tree-cfg.c (delete_tree_cfg_annotations): ... here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120437 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc.dg/pr16194.c: We now output error on all three functions, not justhubicka2007-01-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | first one. * cgraph.c: Include tree-flow.h (cgraph_add_new-function): Handle IPA_SSA mode; execute early_local_passes. * cgraph.h (enum cgraph_state): Add CGRAPH_STATE_IPA_SSA. * tree-pass.h (pass_all_early_optimizations): Declare. * cgraphunit.c (cgraph_process_new_functions): Add IPA_SSA; execute early_local_passes. (cgraph_analyze_function): Do early_local_passes. * tree-mudflap.c (mf_decl_cache_locals, mf_build_check_statement_for): Do not add referenced vars. * tree-optimize.c (gate_all_optimizations): Do not execute when not in SSA form. (gate_all_early_local_passes): New gate. (pass_early_local_passes): Use new gate. (execute_early_local_optimizations): New functions. (gate_all_early_optimizations): New gate. (pass_all_early_optimizations): New pass. (execute_free_datastructures): Free SSA only when initialized. (gate_init_datastructures): Init only when optimizing. (tree_lowering_passes): Do early local passes when called late. * tree-profile.c (do_tree_profiling): Don't profile functions added late. (do_early_tree_profiling, pass_early_tree_profile): Kill. * tree-cfg.c (update_modified_stmts): Do not update when operands are not active. * passes.c (init_optimizations_passes): Reorder so we go into SSA during early_local_passes. * Makefile.in (cgraph.o): Add dependency on tree-flow.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120373 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_exapnd_queue): Rename to...hubicka2006-12-301-2/+15
| | | | | | | | | | | | | | | | | | | | | | (cgraph_new_nodes): ... this one. (cgraph_state): New global variable. (cgraph_add_new_function): Work in more cases. * cgraph.h (cgraph_expand_queue): Rename to ... (cgraph_new_nodes): ... this one. (cgraph_state): New enum and static variable. (cgraph_add_new_function): Update prototype. (cgraph_process_new_functions): New. * omp-low.c (expand_omp_parallel): Update. * cgraphunit.c (initialize_inline_failed): Declare early. (cgraph_process_new_functions): New function. (cgraph_assemble_pending_functions): Use it. (cgraph_expand_all_functions): Use it. (cgraph_optimize): Use it; set cgraph_state. * passes.c (execute_one_pass, execute_ipa_pass_list): Process new functions git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120282 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.h (FOR_EACH_STATIC_VARIABLE, FOR_EACH_STATIC_INITIALIZER): Newhubicka2006-12-201-0/+36
| | | | | | | | | | | | macros. (varpool_first_static_initializer, varpol_next_static_initializer): New inline functions. * ipa-reference.c (analyze_variable): Simplify. (static_execute): Use FOR_EACH_STATIC_INITIALIZER. * ipa-type-escape.c (type_escape_execute): Use FOR_EACH_STATIC_VARIABLE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120070 138bc75d-0d04-0410-961f-82ee72b054a4
* Move all varpool routines out of cgraph/cgraphunit to varpool.chubicka2006-12-111-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119731 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c: Update copyright.hubicka2006-12-091-2/+1
| | | | | | | | | | * cgraph.h: Likewise (cgraph_update_pending_function): Remove prototype. * cgraphunit.c: Update copyright; update overall comment. (cgraph_assemble_pending_functions): Make local. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119691 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c, cfgloop.h, cgraph.h, config/arm/arm.c,kazu2006-12-021-1/+1
| | | | | | | | | | | | | | | | | config/i386/i386.c, config/i386/i386.h, config/mips/mips.h, config/rs6000/cell.md, config/rs6000/rs6000.c, config/sh/sh.c, config/sh/sh4-300.md, config/spu/spu-builtins.def, config/spu/spu-c.c, config/spu/spu-modes.def, config/spu/spu.c, config/spu/spu.md, config/spu/spu_internals.h, config/spu/vmx2spu.h, fold-const.c, fwprop.c, predict.c, tree-data-ref.h, tree-flow.h, tree-ssa-loop-manip.c, tree-ssa-loop-niter.c, tree-ssa-pre.c, tree-vect-analyze.c, tree-vect-transform.c, tree-vectorizer.c, tree-vrp.c: Fix comment typos. Follow spelling conventions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119442 138bc75d-0d04-0410-961f-82ee72b054a4
* * invoke.texi (large-stack-frame, large-stack-frame-growth): New params.hubicka2006-11-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | * cgraph.c (dump_cgraph_node): Dump stack usage. * cgraph.h (cgraph_local_info): Add estimated_self_stack_size. (cgraph_global_info): Add estimated_stack_size and stack_frame_offset. * cgraphunit.c (cgraph_analyze_function): Analyze stack sizes. * ipa-inline.c (cgraph_clone_inlined_nodes): Propagate stack usage. (cgraph_check_inline_limits): Limit stack growth. * cfgexpand.c: Include tree-inline.h. (account_stack_vars): New function. (expand_one_var): New param to just account the stack; return estimated size. (expand_used_vars_for_block): Update call of expand_one_var. (account_used_vars_for_block): New function. (estimated_stack_frame_size): Likewise. (init_vars_expansion, fini_vars_expansion): Break out from.. (expand_used_vars): ... here. * tree-inline.h (estimated_stack_frame_size): Declare. * params.def (PARAM_LARGE_STACK_FRAME, PARAM_STACK_FRAME_GROWTH): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119281 138bc75d-0d04-0410-961f-82ee72b054a4
* PR rtl-optimization/28071hubicka2006-08-211-0/+4
| | | | | | | | | | | | | | | | | | | * tree-optimize.c (tree_rest_of_compilation): Do not remove edges twice. * tree-inline.c (copy_bb): Use cgraph_set_call_stmt. * ipa-inline.c (cgraph_check_inline_limits): Add one_only argument. (cgraph_decide_inlining, cgraph_decide_inlining_of_small_function, cgraph_decide_inlining_incrementally): Update use of cgraph_check_inline_limits. * cgraph.c (edge_hash, edge_eq): New function. (cgraph_edge, cgraph_set_call_stmt, cgraph_create_edge, cgraph_edge_remove_caller, cgraph_node_remove_callees, cgraph_remove_node): Maintain call site hash. * cgraph.h (struct cgraph_node): Add call_site_hash. (cgraph_set_call_stmt): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116284 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/28744jakub2006-08-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | * cgraph.h (struct cgraph_node): Remove externally_visible bitfield. * cgraphunit.c (process_function_and_variable_attributes): Set local.externally_visible rather than externally_visible. PR c/28744 * c-common.c (handle_externally_visible_attribute): First look at TREE_CODE and only if it is function or var decl, check for non-public objects. Don't warn for DECL_EXTERNAL. * cgraphunit.c (process_function_and_variable_attributes): Warn if externally_visible attribute is used on non-public object. * gcc.dg/attr-externally-visible-1.c: New test. * gcc.dg/attr-externally-visible-2.c: New test. * g++.dg/parse/attr-externally-visible-1.C: New test. * g++.dg/parse/attr-externally-visible-2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116222 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/25795hubicka2006-07-241-0/+1
| | | | | | | | | | | | | | | | | PR c++/27369 * cgraph.c (cgraph_varpool_nodes): Export. (decide_is_variable_needed): Ignored "used" attribute in unit-at-a-time mode. * cgraph.h (cgraph_varpool_nodes): Declare. * cgraphunit.c (decide_is_function_needed): Ignored "used" attribute in unit-at-a-time mode. * gcc.dg/pr25795.c: New test. * gcc.dg/pr25795-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115693 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-06-16 Richard Guenther <rguenther@suse.de>rguenth2006-06-161-22/+23
| | | | | | | | | | * cgraph.h (struct cgraph_local_info): Turn bool elements into a bitfield. (struct cgraph_node): Likewise. (struct cgraph_varpool_node): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114711 138bc75d-0d04-0410-961f-82ee72b054a4
* Whitespace fixupsmrs2006-05-181-6/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113893 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.h (cgraph_edge_p): New.kazu2006-04-171-1/+7
| | | | | | | | | | Update the prototype of cgraph_function_versioning. * cgraphunit.c (cgraph_copy_node_for_versioning, cgraph_function_versioning): Use VEC instead of VARRAY. * ipa-cp.c (ipcp_insert_stage): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113006 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-pretty-print.c (dump_generic_node): Handlednovillo2006-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OMP_PARALLEL_FN, OMP_PARALLEL_DATA_ARG and OMP_RETURN_EXPR. * cgraph.c (cgraph_expand_queue): Rename from cgraph_analyze_queue. Update all users. * cgraphunit.c (cgraph_assemble_pending_functions): Process cgraph_expand_queue. (cgraph_expand_all_functions): Likewise. (cgraph_finalize_pending_functions): Remove. Update callers. * tree.h (OMP_DIRECTIVE_P): Define. (OMP_PARALLEL_FN): Define. (OMP_PARALLEL_DATA_ARG): Define. (OMP_SECTIONS_SECTIONS): Define. * tree-pass.h (pass_expand_omp): Declare. * omp-low.c (struct omp_region): Declare. (struct omp_context): Remove fields 'parallel_type', 'parallel_start_ix' and 'parallel_start_additional_args'. Update all users. (struct omp_for_data): Rename from struct expand_omp_for_data. (omp_regions): New static variable. (root_omp_region): New static variable. (find_omp_clause): Make static. (is_in_combined_parallel_ctx): Remove. (is_combined_parallel): New. (extract_omp_for_data): Move earlier in the file. (workshare_safe_to_combine_p): New. (get_ws_args_for): New. (determine_parallel_type): Move earlier in the file. (omp_copy_decl_2): Do not set DECL_CONTEXT of new local to the child function. (omp_copy_decl): Likewise. (create_omp_child_function): Likewise. (lookup_omp_region): New. (dump_omp_region): New. (debug_omp_region): New. (debug_all_omp_regions): New. (new_omp_region): New. (scan_omp_parallel): If parallel_nesting_level > 1, the directive is nested within another parallel directive. Set OMP_PARALLEL_FN. (scan_omp_for): Do not try to handle combined parallel+for cases. Remove FIXME comment. (scan_omp_nested): Remove. (scan_omp_1): Do not call scan_omp_nested when parallel_nesting_level is > 1. Do not change the DECL_CONTEXT of local variables found. (lookup_decl_in_outer_ctx): New. (lower_rec_input_clauses): Rename from expand_rec_input_clauses. (lower_lastprivate_clauses): Rename from expand_lastprivate_clauses. (lower_reduction_clauses): Rename from expand_reduction_clauses. (lower_copyprivate_clauses): Rename from expand_copyprivate_clauses. If CTX is nested, lookup VAR in the outer context when building copy assignment. (lower_send_clauses): Rename from expand_send_clauses. If CTX is nested, lookup VAR in the outer context when building copy assignments. (lower_send_shared_vars): Rename from expand_send_shared_vars. If CTX is nested, lookup VAR in the outer context when building copy assignments. (expand_parallel_call): Rename from build_parallel_call. Handle combined parallel+workshare cases. Re-implement to emit code into the CFG. (list2chain): New. (expand_omp_parallel): Re-implement to emit code into the CFG. Call move_sese_region_to_fn to outline the sub-graph containing the parallel region. (expand_omp_for_1): Remove. (expand_omp_for_generic): Re-implement to emit code into the CFG. (expand_omp_for_static_nochunk): Likewise. (expand_omp_for_static_chunk): Likewise. (expand_omp_for): Likewise. (expand_omp_sections): Likewise. (remove_exit_barriers): New. (expand_omp_synch): New. (expand_omp): New. (build_omp_regions_1): New. (build_omp_regions): New. (execute_expand_omp): New. (gate_expand_omp): New. (pass_expand_omp): Define. (lower_omp_sections): Rename from expand_omp_sections. Set OMP_SECTIONS_SECTIONS. (lower_omp_single_simple): Rename from expand_omp_single_simple. (lower_omp_single_copy): Rename from expand_omp_single_copy. (lower_omp_single): Rename from expand_omp_simple. (lower_omp_master): Rename from expand_omp_master. (lower_omp_ordered): Rename from expand_omp_ordered. (lower_omp_critical): Rename from expand_omp_critical. (lower_omp_for_lastprivate): Rename from expand_omp_for_lastprivate. (lower_omp_for): Re-implement. (lower_omp_parallel): Re-implement. (lower_regimplify): Rename from expand_regimplify. (lower_omp_1): Rename from expand_omp_1. If there are syntax errors in the program, replace every OpenMP directive with NOP. Call lower_omp_* instead of expand_omp_*. (lower_omp): Rename from expand_omp. * tree-gimple.c (is_gimple_stmt): Handle OMP_RETURN_EXPR. * tree-gimple.h (enum omp_parallel_type): Remove. (gimple_boolify): Declare extern. (find_omp_clause, determine_parallel_type): Remove. * gimple-low.c (lower_omp_directive): New. (lower_stmt): Call it. (record_vars_into): Move from ... (record_vars): ... here. Call record_vars_into with current_function_decl. * gimplify.c (struct gimplify_ctx): Remove fields combined_pre_p and combined_ctxp. Update users. (get_formal_tmp_var): Add documentation. (gimple_boolify): Make extern. (gimplify_expr_in_ctx): Remove. Update callers. (gimplify_omp_parallel): Do not assume that OMP_PARALLEL_BODY will always be a BIND_EXPR. (gimplify_expr): Handle OMP_RETURN_EXPR. * tree.def (BLOCK): Remove documentation about BLOCK_TYPE_TAGS. (OMP_PARALLEL): Add 3 operands. (OMP_SECTIONS): Add 1 operand. (OMP_RETURN_EXPR): Define. * tree-inline.c (estimate_num_insns_1): Handle OpenMP directives. (copy_tree_r): Restore TREE_CHAIN in OMP_CLAUSE_*. * tree-iterator.c (alloc_stmt_list): Assert that we are not creating a circular free list. (free_stmt_list): Assert that we are not freeing stmt_list_cache. * tree-flow.h (move_sese_region_to_fn): Declare. (record_vars_into): Declare. * tree-cfg.c (make_omp_sections_edges): New. (make_exit_edges): Handle OMP_PARALLEL, OMP_FOR, OMP_SINGLE, OMP_MASTER, OMP_ORDERED, OMP_CRITICAL, OMP_RETURN_EXPR, OMP_SECTIONS and OMP_SECTION. (is_ctrl_altering_stmt): Return true for OMP_DIRECTIVE_P. (set_bb_for_stmt): Undo change to check currently_expanding_to_rtl. (verify_stmt): Do not handle OMP_DIRECTIVE_P. (gather_blocks_in_sese_region): New. (struct move_stmt_d): Declare. (move_stmt_r): New. (move_block_to_fn): New. (move_sese_region_to_fn): New. * passes.c (init_optimization_passes): Schedule pass_expand_omp after pass_init_datastructures. * tree-ssa-operands.c (get_expr_operands): Handle OMP_PARALLEL, OMP_SECTIONS, OMP_FOR, OMP_RETURN_EXPR, OMP_SINGLE, OMP_MASTER, OMP_ORDERED, OMP_CRITICAL. testsuite/ * testsuite/gcc.dg/gomp/for-13.c: Use -fdump-tree-ompexp. * testsuite/gcc.dg/gomp/critical-1.c: Likewise. * testsuite/gcc.dg/gomp/critical-3.c: Likewise. * testsuite/gcc.dg/gomp/empty.c: Likewise. * testsuite/gcc.dg/gomp/ordered-1.c: Likewise. * testsuite/gcc.dg/gomp/for-4.c: Likewise. * testsuite/gcc.dg/gomp/for-6.c: Likewise. * testsuite/gcc.dg/gomp/master-3.c: Likewise. * testsuite/gcc.dg/gomp/for-8.c: Likewise. * testsuite/gcc.dg/gomp/for-10.c: Likewise. * testsuite/gcc.dg/gomp/for-18.c: Likewise. * testsuite/gcc.dg/gomp/for-5.c: Likewise. * testsuite/gcc.dg/gomp/for-7.c: Likewise. * testsuite/gcc.dg/gomp/for-9.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109969 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-01-18 Richard Henderson <rth@redhat.com>dnovillo2006-01-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> * libgomp: New directory. * Makefile.def: Add target_module libgomp. * Makefile.in: Regenerate. * configure.in (target_libraries): Add target-libgomp. * configure: Regenerate. contrib/ 2006-01-18 Richard Henderson <rth@redhat.com> Diego Novillo <dnovillo@redhat.com> * gcc_update (files_and_dependencies): Add libgomp files. gcc/ 2006-01-18 Richard Henderson <rth@redhat.com> Aldy Hernandez <aldyh@redhat.com> Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> * omp-low.c: New file. * c-omp.c: New file. 2006-01-18 Richard Henderson <rth@redhat.com> Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> * doc/invoke.texi: Document -fopenmp. * tree-dump.h (debug_function): Declare. * hooks.c (hook_bool_tree_bool_false): New function. (hook_tree_tree_null): Remove. (hook_tree_tree_tree_null): New. * hooks.h: Update to match. * tree-pretty-print.c (debug_tree_chain): New. (print_generic_expr): Handle TDF_CHAIN. (dump_generic_node): Handle BLOCK. Do not abort with incomplete SWITCH_EXPRs. Do not dump body of an OpenMP directive if TDF_SLIM is given. <case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't print space after directive name. <OMP_FOR>: Handle printing OMP_FOR_PRE_BODY. Handle OMP_MASTER and OMP_ORDERED. Handle printing of OMP_BODY just in one place, goto dump_omp_body in the rest of OMP_* nodes that have OMP_BODY. Don't handle clause nodes here. Update omp statements to use dump_omp_clauses. Handle OMP_SINGLE, OMP_SECTIONS, OMP_SECTION, OMP_CLAUSE_ORDERED, OMP_CLAUSE_SCHEDULE, OMP_ATOMIC, OMP_CRITICAL, OMP_CLAUSE_NOWAIT, GOMP_CLAUSE_IF, GOMP_CLAUSE_NUM_THREADS, GOMP_FOR, GOMP_CLAUSE_SHARED, GOMP_CLAUSE_FIRSTPRIVATE, GOMP_CLAUSE_LASTPRIVATE, GOMP_CLAUSE_COPYIN and GOMP_CLAUSE_COPYPRIVATE. Adjust output for GOMP_PARALLEL. (dump_omp_clauses): New. (print_declaration): Dump DECL_VALUE_EXPR. (op_symbol_1): Split out of op_symbol. (dumping_stmts): Remove. Update all users. * cgraph.c (cgraph_analyze_queue): New. (cgraph_add_new_function): New. * cgraph.h (cgraph_analyze_queue): Declare. (cgraph_add_new_function): Declare. (cgraph_lower_function): Remove. * tree.c (walk_tree): Walk OMP_CLAUSE_CHAIN of OMP_CLAUSE_* nodes. Use switch for all nodes, handle most of IS_EXPR_CODE_CLASS and TYPE_P nodes in its default clause. (empty_body_p): New. (tree_range_check_failed): New. (build5_stat): New. * tree.h (OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER, OMP_CLAUSE_PRIVATE_DEBUG, OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_FOR_PRE_BODY, OMP_MASTER_BODY, OMP_ORDERED_BODY OMP_BODY, OMP_CLAUSES, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT_KIND, OMP_CLAUSE_CHAIN, OMP_CLAUSE_OUTER_DECL, OMP_CLAUSE_INNER_DECL, OMP_CLAUSE_NUM_THREADS_EXPR, OMP_CLAUSE_IF_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_SIZE. OMP_PARALLEL_VAR_INIT, OMP_PARALLEL_VAR_REDUC, OMP_FOR_VAR_INIT, OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC, OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST, OMP_SECTIONS_VAR_REDUC, OMP_CLAUSE_REDUCTION_CODE OMP_SINGLE_CLAUSES, OMP_SINGLE_BODY, OMP_CLAUSE_SCHEDULE_CHUNK_SIZE, OMP_SECTION_BODY, OMP_CRITICAL_NAME, OMP_CRITICAL_BODY): New. (TREE_RANGE_CHECK): New. (empty_body_p): Declare. (enum omp_clause_default_kind): New. (build_string_literal): Declare. (enum omp_clause_schedule_kind, OMP_CLAUSE_SCHEDULE_KIND): New. (build5_stat, build5): Declare. * tree-pass.h (TDF_CHAIN): Define. * tree-pass.h (PROP_gimple_lomp): Define. (pass_lower_omp): Declare. * diagnostic.h (debug_tree_chain): Declare. * builtins.c (get_builtin_sync_mode): Use 0 as last argument to mode_for_size. (expand_builtin): Handle sync BUILT_IN_*_16 builtins. * builtins.c (build_string_literal): Make extern. * gcc.c (include_spec_function): New. (static_spec_functions): Add it. (main): Move load of libgomp.spec ... (LINK_COMMAND_SPEC): ... here. (link_gomp_spec): New. (static_specs): Include it. (LINK_COMMAND_SPEC): Add link_gomp. (GOMP_SELF_SPECS): New. (driver_self_specs): Include it. (switch_matches): Don't mark inline. (main): Load libgomp.spec. * tree-gimple.c (is_gimple_stmt): True for OMP_MASTER, OMP_ORDERED, OMP_CRITICAL, OMP_SECTIONS, OMP_SECTION, and OMP_SINGLE, OMP_FOR and OMP_PARALLEL. * tree-gimple.h (enum omp_parallel): Declare. (determine_parallel_type): Declare. (omp_firstprivatize_variable): Declare. (omp_reduction_init): Declare. (diagnose_omp_structured_block_errors): Declare. (struct walk_stmt_info): Add want_return_expr. (struct walk_stmt_info): Add want_bind_expr, want_locations. (find_omp_clause): Declare. (insert_field_into_struct): Declare. (struct walk_stmt_info): Move from tree-nested.c (walk_stmts): Declare. * c-cppbuiltin.c (c_cpp_builtins): If -fopenmp, #define _OPENMP to 200505. * cgraphunit.c (cgraph_lower_function): Make static. (cgraph_finalize_pending_functions): New. (cgraph_finalize_function): Call it. (cgraph_finalize_compilation_unit): Likewise. * builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16, BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add. (BT_FN_UINT_UINT): New. (DEF_FUNCTION_TYPE_6, DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_VAR_4): Document. (BT_PTR_LONG, BT_PTR_PTR, BT_FN_BOOL, BT_FN_INT, BT_FN_VOID_PTRPTR, BT_PTR_FN_VOID_PTR, BT_FN_BOOL_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_UINT, BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR, BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): New. * builtins.def: Update DEF_BUILTIN comment to include COND argument. Move all DEF_SYNC_BUILTIN () and DEF_GOMP_BUILTIN () builtins into separate files. (DEF_GOMP_BUILTIN): New. (BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_GOMP_BARRIER, BUILT_IN_GOMP_CRITICAL_START, BUILT_IN_GOMP_CRITICAL_END, BUILT_IN_GOMP_CRITICAL_NAME_START, BUILT_IN_GOMP_CRITICAL_NAME_END, BUILT_IN_GOMP_LOOP_STATIC_START, BUILT_IN_GOMP_LOOP_DYNAMIC_START, BUILT_IN_GOMP_LOOP_GUIDED_START, BUILT_IN_GOMP_LOOP_RUNTIME_START, BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START, BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START, BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START, BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START, BUILT_IN_GOMP_LOOP_STATIC_NEXT, BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_RUNTIME_NEXT, BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT, BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT, BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START, BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START, BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START, BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START, BUILT_IN_GOMP_LOOP_END, BUILT_IN_GOMP_LOOP_END_NOWAIT, BUILT_IN_GOMP_ORDERED_START, BUILT_IN_GOMP_ORDERED_END, BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END, BUILT_IN_GOMP_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_NEXT, BUILT_IN_GOMP_PARALLEL_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_END, BUILT_IN_GOMP_SECTIONS_END_NOWAIT, BUILT_IN_GOMP_SINGLE_START, BUILT_IN_GOMP_SINGLE_COPY_START, BUILT_IN_GOMP_SINGLE_COPY_END): New. * sync-builtins.def: New file, moved from builtins.def. * omp-builtins.def: New file, moved from builtins.def. * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine. * gimple-low.c (lower_function_body): Clear data. (lower_stmt): Do not handle COMPOUND_EXPR. Remove call to print_node_brief. * c-tree.h (c_finish_omp_clauses): New prototype. (C_DECL_THREADPRIVATE_P): Define. (lookup_name_no_remap, c_omp_remap_private): Remove (c_begin_omp_parallel, c_finish_omp_parallel): Update. (check_for_loop_decls): Update decl. (lookup_name_no_remap, c_omp_remap_private): Declare. (build_indirect_ref, build_modify_expr, pushdecl, pushdecl_top_level): Move to c-common.h. * dwarf2out.c (loc_descriptor_from_tree_1): Don't set unsignedp before the switch, but just in the 2 places that need it. * c-decl.c (diagnose_mismatched_decls): Do not check for mismatched thread-local attributes when OLDDECL is marked threadprivate and NEWDECL has no thread-local attributes. (merge_decls): Merge C_DECL_THREADPRIVATE_P. (c_gimple_diagnostics_recursively): Rename from c_warn_unused_result_recursively. Invoke diagnose_omp_structured_block_errors. (check_for_loop_decls): Return a singular decl found. * langhooks.c (lhd_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED for DECL_ARTIFICIAL decls. (lhd_omp_firstprivatize_type_sizes): New. (lhd_omp_assignment): New. (lhd_omp_predetermined_sharing): New. * langhooks.h (struct gimplify_omp_ctx): Forward declare. (struct lang_hooks_for_types): Add omp_firstprivatize_type_sizes, omp_privatize_by_reference, omp_predetermined_sharing, omp_disregard_value_expr, omp_private_debug_clause, omp_clause_default_ctor, omp_clause_copy_ctor, omp_clause_assign_op, omp_clause_dtor. (c_finish_omp_clauses): New. (c_finish_bc_stmt): Diagnose break within omp for. (c_begin_omp_parallel, c_finish_omp_parallel): New. (build_unary_op): Return error_mark after reporting a readonly_error. (build_modify_expr): Likewise. * gimplify.c: Include optabs.h and pointer-set.h. (enum gimplify_omp_var_data): Declare. (struct gimplify_omp_ctx): Declare. (struct gimplify_ctx): Add fields prev_context, combined_pre_p and combined_ctxp. (gimplify_ctxp, gimplify_omp_ctxp): New local variables. (push_gimplify_context, pop_gimplify_context): Allow nesting. (splay_tree_compare_decl_uid): New. (new_omp_context): New. (delete_omp_context): New. (gimple_add_tmp_var): Call omp_add_variable. (gimplify_bind_expr): Likewise. (gimplify_var_or_parm_decl): If omp_notice_variable returned true, disregard DECL_VALUE_EXPR on the decl if any. (gimplify_expr_in_ctx): New. (omp_firstprivatize_variable, omp_firstprivatize_type_sizes omp_add_variable, omp_notice_variable, omp_is_private gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1 gimplify_adjust_omp_clauses, gimplify_omp_parallel gimplify_omp_for, gimplify_omp_workshare, goa_lhs_expr_p gimplify_omp_atomic_fetch_op, goa_stabilize_expr gimplify_omp_atomic_pipeline, gimplify_omp_atomic_mutex gimplify_omp_atomic): New. (gimplify_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS, OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED, OMP_CRITICAL and OMP_ATOMIC. (gimplify_body): Verify gimplify_ctxp is empty after gimplification. * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ATOMIC, PRAGMA_OMP_BARRIER, PRAGMA_OMP_CRITICAL, PRAGMA_OMP_FLUSH, PRAGMA_OMP_FOR, PRAGMA_OMP_MASTER, PRAGMA_OMP_ORDERED, PRAGMA_OMP_PARALLEL, PRAGMA_OMP_PARALLEL_FOR, PRAGMA_OMP_PARALLEL_SECTIONS, PRAGMA_OMP_SECTION, PRAGMA_OMP_SECTIONS, PRAGMA_OMP_SINGLE, PRAGMA_OMP_THREADPRIVATE. * tree.def (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS, OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED, OMP_CRITICAL, OMP_ATOMIC, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_NOWAIT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT): Define. * print-tree.c (print_node): Dump DECL_VALUE_EXPR. * tree-ssa-dce.c (find_control_dependence): Do not assume that ENTRY_BLOCK_PTR->next_bb == single_succ (ENTRY_BLOCK_PTR). * tree-nested.c (convert_call_expr): Call walk_body on OMP_BODY for OpenMP directives. (struct nesting_info): Add field_map, suppress_expansion, debug_var_chain. (create_nesting_tree): Initialize them. (lookup_field_for_decl): Use field_map. (get_nonlocal_debug_decl, get_local_debug_decl): New. (convert_local_omp_clauses): New. (finalize_nesting_tree_1): Add debug_var_chain to toplevel block. (walk_body): Split out of walk_function. (convert_nonlocal_omp_clauses, convert_local_omp_clauses): New. (convert_nonlocal_reference): Handle omp statements. (convert_local_reference): Likewise. (unnest_nesting_tree_1): Split out of finalize_nesting_tree_1. (unnest_nesting_tree): New. (lower_nested_functions): Call it. (insert_field_into_struct): Make extern. (struct walk_stmt_info): Move to tree-gimple.h. (walk_stmts): Make extern. * omp-builtins.def: New file. * tree-iterator.c (expr_only): Clarify comment. * c-common.h (pushdecl_top_level, pushdecl, build_modify_expr, build_indirect_ref, c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered, c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush, c_finish_omp_for, c_split_parallel_clauses, omp_clause_default_kind, c_omp_sharing_predetermined, c_omp_remap_decl): Declare. * Makefile.in (BUILTINS_DEF): Add omp-builtins.def. (OBJS-common): Add omp-low.o. (c-omp.o, omp-low.o): Add. (gimplify.o): Add dependency on $(OPTABS_H). (GTFILES): Add omp-low.c. (gt-stringpool.h): Add. * tree-cfg.c (set_bb_for_stmt): Do not update the block-to-labels map if we are currently expanding to RTL. (tree_node_can_be_shared): Remove unnecessary CONSTANT_CLASS_P checks. Handle IDENTIFIER_NODE. (tree_verify_flow_info): Do not ICE when emitting error messages about invalid labels. (dump_function_to_file): Reset CFUN before emitting the body of the function. (debug_function): New. * passes.c (init_optimization_passes): Schedule pass_lower_omp. * langhooks-def.h (lhd_omp_predetermined_sharing, lhd_omp_assignment, lhd_omp_firstprivatize_type_sizes): Declare. (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it. (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE, LANG_HOOKS_OMP_PREDETERMINED_SHARING, LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR, LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE, LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR, LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR): Define. (LANG_HOOK_DECLS): Use them. 2006-01-18 Dmitry Kurochkin <dmitry.kurochkin@gmail.com> Richard Henderson <rth@redhat.com> Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> * c-parser.c (pragma_omp_clause): Define. (c_parser_declaration_or_fndef): Document OpenMP syntax. (c_parser_compound_statement): Likewise. (c_parser_statement): Likewise. (c_parser_pragma): Handle omp pragmas. (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Define. (c_parser_omp_clause_name, check_no_duplicate_clause, c_parser_omp_variable_list, c_parser_omp_var_list_parens, c_parser_omp_clause_copyin, c_parser_omp_clause_copyprivate, c_parser_omp_clause_default, c_parser_omp_clause_firstprivate, c_parser_omp_clause_if, c_parser_omp_clause_lastprivate, c_parser_omp_clause_nowait, c_parser_omp_clause_num_threads, c_parser_omp_clause_ordered, c_parser_omp_clause_private, c_parser_omp_clause_reduction, c_parser_omp_clause_schedule, c_parser_omp_clause_shared, c_parser_omp_all_clauses, c_parser_omp_structured_block, c_parser_omp_atomic, c_parser_omp_barrier, c_parser_omp_critical, c_parser_omp_flush, c_parser_omp_for_loop, c_parser_omp_for, c_parser_omp_master, c_parser_omp_ordered, c_parser_omp_sections_scope, c_parser_omp_sections, c_parser_omp_parallel, c_parser_omp_single, c_parser_omp_construct, c_parser_omp_threadprivate): New. * c-pragma.c (init_pragma): Do omp pragma registration here. * c.opt (fopenmp): New flag. 2006-01-18 Eric Christopher <echristo@apple.com> * gcc.c (GOMP_SELF_SPECS): Bracket in #ifndef/#endif. * config/darwin.h (GOMP_SELF_SPECS): Define. testsuite/ 2006-01-18 Richard Henderson <rth@redhat.com> Aldy Hernandez <aldyh@redhat.com> Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> Uros Bizjak <uros@kss-loka.si> * testsuite/gcc.dg/gomp: New directory. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109902 138bc75d-0d04-0410-961f-82ee72b054a4
* ./:ian2006-01-171-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common.opt (ftoplevel-reorder): New option. * cgraph.c (cgraph_asm_nodes): New global variable. (cgraph_asm_last_node): New static variable. (cgraph_order): New global variable. (cgraph_create_node): Set new order field. (cgraph_varpool_node): Likewise. (decide_is_variable_needed): Return true if not flag_toplevel_reorder. (cgraph_add_asm_node): New function. * cgraph.h (struct cgraph_node): Add order field. (struct cgraph_varpool_node): Add order field. (struct cgraph_asm_node): Define. (cgraph_asm_nodes, cgraph_order): Declare. (cgraph_add_asm_node): Declare. * cgraphunit.c (cgraph_varpool_assemble_decl): New static function. (cgraph_varpool_assemble_pending_decls): Call it. (cgraph_output_pending_asms): New static function. (cgraph_finalize_compilation_unit): Call it. (struct cgraph_order_sort): Define. (cgraph_output_in_order): New static function. (cgraph_optimize): Call cgraph_output_pending_asms. Add code for !flag_toplevel_reorder case. * c-parser.c: Include "cgraph.h". (c_parser_asm_definition): Call cgraph_add_asm_node rather than assemble_asm. * Makefile.in (CRTSTUFF_CFLAGS): Use -fno-toplevel-reorder rather than -fno-unit-at-a-time. * doc/invoke.texi (Option Summary): Mention -fno-toplevel-reorder. (Optimize Options): Document -fno-toplevel-reorder. Mention it in -funit-at-a-time documentation. cp/: * parser.c: Include "cgraph.h". (cp_parser_asm_definition): Call cgraph_add_asm_node rather than assemble_asm. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109811 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_insert_node_to_hashtable): New function.hubicka2006-01-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cgraph.h (cgraph_node): Add inline_decl. (cgraph_insert_node_to_hashtable): Declare. (save_inline_function_body): Declare. * cgraphunit.c (verify_cgraph_node): Inline edges might point to inline clones. (cgraph_preserve_function_body_p): Do not presrve when dump is enabled. (cgraph_function_versioning): Update call of tree_function_versioning. (save_inline_function_body): New function. * function.h (struct function): Kill saved_eh, saved_cfg, saved_args, saved_static_chain_decl, saved_blocks and saved-unexpanded_var_list. * ipa-inline.c (cgraph_mark_inline_edge): Look for inline clones. (cgraph_default_inline_p): Likewise. (cgraph_decide_inlining_incrementally): Likewise. * tree-inline.c (inline_data): Kill saving_p add update_clones_p. (copy_bb): Kill saving; do updating of clones. (copy_cfg_body): Kill saving. (initialize_inlined-parameters): Likewise. (expand_call_inline): Likewise. (save_body): Kill. (tree_function_versioning): New parameter "update_clones". (inlining_p): Kill saving. * tree-inline.h (tree_function_versioning): Update prototype. * tree-optimize.c (tree_rest_of_compilation): Use clonning instead of saving. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109580 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_clone_edge): Make the scale gcov_type.hubicka2005-09-241-5/+3
| | | | | | | | | | | | | | | | | | | (cgraph_clone_node): Likewise. * cgraph.h (cgraph_clone_edge): Update prototype. (cgraph_mark_inline_edge, cgraph_clone_inlined_nodes): Remove duplicated prototypes; add updating argument. * cgraphunit.c (verify_cgraph_node): Verify that counts are non-negative. * ipa-inline.c (cgraph_clone_inlined_nodes): Allow clonning without updating profile. (cgraph_mark_inline_edge): Likewise. (cgraph_mark_inline): Update use of cgraph_mark_inline_edge. (cgraph_flatten_node): Likewise. (cgraph_decide_recursive_inlining): Likewise. (cgraph_decide_inlining_of_small_function): Likewise. * tree-optimize.c (tree_rest_of_compilation): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104601 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Add ipcp.c, ipa-prop.h, ipa-prop.c. Remove integrate.hrazya2005-08-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dependency from tree-inline.o. Add ipa-prop.h dependency to tree-inline.o and cgraphunit.o. * common.opt: Add ipa-cp flag. * timevar.def: Add IPCP optimization. * tree-optimize.c (init_tree_optimization_passes): Schedule pass_ipa_cp. * tree-pass.h (pass_ipa_cp): Declare. * cgraph.h (update_call_expr, cgraph_copy_node_for_versioning, cgraph_function_versioning): New declarations. * cgraphunit.c: Add include to ipa-prop.h. (update_call_expr, cgraph_copy_node_for_versioning, cgraph_function_versioning): New functions. * integrate.c (copy_decl_for_inlining): Remove. * tree-inline.c: Remove include to integrate.h, Add include ipa-prop.h. (struct inline_data): Add versioning_p, ipa_info, new fields. (remap_decl, mark_local_for_remap_r, setup_one_parameter, declare_return_variable): Replace calls to copy_decl_for_inlining with copy_decl_for_dup. (copy_body_r, copy_bb, copy_cfg_body, copy_tree_r, inlining_p): Add versioning support. (copy_decl_for_dup): Rename from copy_decl_for_inlining. Add argument VERSIONING. (copy_arguments_for_versioning, copy_static_chain, function_versionable_p, tree_versionable_function_p, tree_function_versioning, replace_ref_tree): New functions. * tree-inline.h: Include varray.h. (tree_versionable_function_p, tree_function_versioning, tree copy_decl_for_dup): New declarations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102625 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_clone_edge): New UPDATE_ORIGINAL argument.hubicka2005-07-281-2/+5
| | | | | | | | | | | | | | | | | | | (cgraph_clone_node): Likewise. * cgraph.h (cgraph_clone_edge): Update prototype. (cgraph_clone_node): Likewise. * ipa-inline.c (cgraph_clone_inlined_nodes): Update call of cgraph_clone_node. (lookup_recursive_calls): Consider profile. (cgraph_decide_recursive_inlining): Fix updating; use new probability argument; use profile. * params.def (PARAM_MIN_INLINE_RECURSIVE_PROBABILITY): New. * tree-inline.c (copy_bb): Update clal of clone_edge. * tree-optimize.c (tree_rest_of_compilation): UPdate cal of clone_node. * invoke.texi (min-inline-recursive-probability): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102521 138bc75d-0d04-0410-961f-82ee72b054a4
* * ipa-inline.c (cgraph_edge_badness): Update comments. Invert shiftjconner2005-07-281-1/+1
| | | | | | | | | | | | | | direction of badness if negative. (cgraph_default_inline_p): Add reason to parameters, and assign it a value. (cgraph_decide_inlining_of_small_functions): New parameter in call to cgraph_default_inline_p. (cgraph_decide_inlining_incrementally): Likewise. * cgraphunit.c (decide_is_function_needed): Likewise. * cgraph.h (cgraph_default_inline_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102497 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-07-16 Danny Berlin <dberlin@dberlin.org>zadeck2005-07-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kenneth Zadeck <zadeck@naturalbridge.com> * Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h, tree-promote-statics.c * ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h, tree-promote-statics.c: new files. * alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p, nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1, int nonlocal_set_p, mark_constant_function): Deleted. (rest_of_handle_cfg): Removed call to mark_constant_function. (nonoverlapping_component_refs_p): Added calls to support type based aliasing. * tree-ssa-alias.c (may_alias_p, compute_flow_insensitive_aliasing): Ditto. * calls.c (flags_from_decl_or_type): Removed reference to cgraph_rtl_info. (flags_from_decl_or_type): Support ECF_POINTER_NO_CAPTURE attribute. * c-common.c (handle_pointer_no_capture_attribute): New function and added pointer_no_capture attribute. * c-typeck.c (convert_arguments): Make builtins tolerant of having too many arguments. This is necessary for Spec 2000. * cgraph.h (const_function, pure_function): Removed. * common.opt: Added "fipa-pure-const", "fipa-reference", "fipa-type-escape", and "ftree-promote-static". * opts.c: Ditto. * passes.c: Added ipa and tree-promote-statics passes. * timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE, TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS. * tree.h: Support ECF_POINTER_NO_CAPTURE attribute. * tree-dfa.c (referenced_var_lookup_if_exists): New function. * tree-flow.h: Added exposed sra calls and addition of reference_vars_info field for FUNCTION_DECLS. * tree-pass.h: Added passes. * tree-sra.c: (sra_init_cache): New function. (sra_insert_before, sra_insert_after) Made public. (type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p and made public. * tree-ssa-alias.c (dump_alias_stats): Added stats for type based aliasing. (may_alias_p): Added code to use type escape analysis to improve alias sets. * tree-ssa-operands.c (add_call_clobber_ops): Added parameter and code to prune clobbers of static variables based on information produced in ipa-reference pass. Changed call clobbering so that statics are not marked as clobbered if the call does not clobber them. 2005-07-16 Danny Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> * gcc.dg/tree-ssa/ssa-dce-2.c: Changed dg-options to run at -O2 since pure const detection cannot run at -O1 in c compiler. * gcc.dg/tree-ssa/20030714-1.c Changed scanning patterns because we can now optimize this case properly. * gcc.dg/tree-ssa/sra-2.c: Changed to -O3 and removed xfail because we now pass. * gcc.dg/vect/vect-92.c: Removed out of bounds array access. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102098 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_remove_node): Do not release function bodies untilhubicka2005-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | full cgraph is built. * cgraph.h (cgraph_decide_inlining_incrementally): Add early argument. * cgraphunit.c (cgraph_finalize_function): Update call of cgraph_decide_inlining_incrementally. (initialize_inline_failed): Break out of ... (cgraph_analyze_function): ... here. (rebuild_cgraph_edges): New function. (pass_rebuild_cgraph_edges): New pass. * common.opt (fearly-inlining): New flag. * ipa-inline.c: Include ggc.h (cgraph_clone_inlined_nodes): Avoid re-using of original copy when cgraph is not fully built. (cgraph_decide_inlining_incrementally): Add early mode. (cgraph_early_inlining): New function. (cgraph_gate_early_inlining): Likewise. (pass_early_ipa_inline): New pass. * ipa.c (cgraph_postorder): NULLify aux pointer. * tree-inline.c (expand_call_inline): Avoid warning early. * tree-optimize.c (pass_early_local_passes): New. (execute_cleanup_cfg_pre_ipa): New. (pass_cleanup_cfg): New. (register_dump_files): Fix handling subpasses of IPA pass. (init_tree_optimization_passes): Add early passes. (execute_ipa_pass_list): Fix handling of subpasses of IPA pass. * passes.h (pass_early_tree_profile, pass_rebuild_cgraph_edges, pass_early_ipa_inline): New passes. * tree-profile.c (do_early_tree_profiling, pass_early_tree_profile): New. * invoke.texi: Document early-inlining. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101369 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kcook2005-06-251-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101317 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-optimize.c (init_tree_optimization_passes): Fix flags ofhubicka2005-06-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | all_passes and all_ipa_passes. * c-common.c: Include cgraph.h (handle_externally_visible_attribute): New function. (c_common_att): Add "externally_visible" attribute. * cgraph.c (decide_is_variable_needed): Obey externally visible flag. (cgraph_varpool_finalize_decl): Avoid redundant checking. * cgraph.h (struct cgraph_node): New flag externally_visible. (decide_is_function_needed): Obey externally visible flag. (cgraph_finalize_function): Avoid redundant checks. (cgraph_function_and_variable_visibility): Bring symbols local when asked for. * common.opt (fwhole-program): New flag. * doc/invoke.texi (-fwhole-program): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101295 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_node): Maintain master clones.hubicka2005-06-021-1/+32
| | | | | | | | | | | | | | | | | | | | | | (cgraph_remove_node): Likewise. (availability_names): New static variable. (dump_cgraph_node): Dump availability. (dump_cgraph_varpool_node): Likewise. (cgraph_is_master_clone, cgraph_master_clone, cgraph_function_body_availability, cgraph_variable_initializer_availability): New functions. * cgraph.h (availability): New enum. (struct cgraph_node): Add master_clone. (cgraph_is_master_clone, cgraph_master_clone, cgraph_function_body_availability, cgraph_variable_initializer_availability): Declare. * cgraphunit.c (cgraph_expand_function): Setcgraph_function_flags_ready. (cgraph_remove_unreachable_nodes): Remove unreachable nodes. * ipa-inline.c (cgraph_decide_inlining): Do not call cgraph_remove_unreachable_nodes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100507 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (dump_cgraph_node): Print new flags.hubicka2005-06-021-0/+6
| | | | | | | | | | | | | | | | | | (dump_cgraph_varpool_node): Likewise. (decide_variable_is_needed): Initialize externally_visible flag. * cgraph.h (cgraph_local_info): Add externally_visible flag. (cgraph_varpool_node): Likewise. (cgraph_function_flags_ready): Declare. * cgraph.c (cgraph_mark_local_functions): Rename to ... (cgraph_function_and_variable_visibility) ... this one; handle externally_visible flags. (decide_is_function_needed): Set externally_visible flag. (cgraph_finalize_function): Deal properly with early cleanups. (cgraph_optimize): Update call of cgraph_function_and_variable_visibility. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100491 138bc75d-0d04-0410-961f-82ee72b054a4