Age | Commit message (Collapse) | Author | Files | Lines |
|
* cgraph.c: Fix comment typos.
* cgraph.h: Likewise.
* cgraphunit.c: Likewise.
* ipa-cp.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-ref.c: Likewise.
* ipa-reference.c: Likewise.
From-SVN: r170052
|
|
PR target/47237
* cgraph.h (cgraph_local_info): New field can_change_signature.
* ipa-cp.c (ipcp_update_callgraph): Only compute args_to_skip if callee
signature can change.
(ipcp_estimate_growth): Call sequence simplify only if calle signature
can change.
(ipcp_insert_stage): Only compute args_to_skip if signature can change.
(cgraph_function_versioning): We can not change signature of functions
that don't allow that.
* lto-cgraph.c (lto_output_node): Stream local.can_change_signature.
(lto_input_node): Likewise.
* ipa-inline.c (compute_inline_parameters): Compute local.can_change_signature.
* ipa-split.c (visit_bb): Never split away APPLY_ARGS.
* tree-sra.c (ipa_sra_preliminary_function_checks): Give up on functions
that can not change signature.
* i386.c (ix86_function_regparm, ix86_function_sseregparm,
init_cumulative_args): Do not use local calling conventions for functions
that can not change signature.
From-SVN: r169290
|
|
-fno-early-inlining -flto)
2011-01-03 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/46984
* cgraph.h (cgraph_indirect_call_info): make field thunk_delta
HOST_WIDE_INT.
(cgraph_create_indirect_edge): Fixed line length.
(cgraph_indirect_call_info): Declare.
(cgraph_make_edge_direct) Update declaration.
* cgraph.c (cgraph_allocate_init_indirect_info): New function.
(cgraph_create_indirect_edge): Use it.
(cgraph_make_edge_direct): Made delta HOST_WIDE_INT. Updated all
callees.
* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Update for
the new thunk_delta representation.
* ipa-prop.c (ipa_make_edge_direct_to_target): Convert delta to
HOST_WIDE_INT.
(ipa_write_indirect_edge_info): Remove streaming of thunk_delta.
(ipa_read_indirect_edge_info): Likewise.
* lto-cgraph.c (output_edge_opt_summary): New function.
(output_node_opt_summary): Call it on all outgoing edges.
(input_edge_opt_summary): New function.
(input_node_opt_summary): Call it on all outgoing edges.
* testsuite/g++.dg/ipa/pr46984.C: New test.
From-SVN: r168420
|
|
-fno-early-inlining)
2010-12-15 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/46053
PR middle-end/46287
PR middle-end/46242
* cgraph.h (cgraph_indirect_call_info): New field thunk_delta.
* gimple.h (gimple_fold_obj_type_ref): Declaration removed.
(gimple_fold_call): Declare.
(gimple_adjust_this_by_delta): Likewise.
* cgraph.c (cgraph_make_edge_direct): New parameter delta. Updated
all users.
(cgraph_clone_edge): Create a copy of indirect_info also for direct
edges.
* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Adjust this
parameters.
* gimple-fold.c (gimple_fold_obj_type_ref_known_binfo): Renamed to
gimple_get_virt_mehtod_for_binfo, new parameter delta. Do not search
through thunks, in fact bail out if we encounter one, check that
BINFO_VIRTUALS is not NULL.
(gimple_adjust_this_by_delta): New function.
(gimple_fold_obj_type_ref): Removed.
(gimple_fold_obj_type_ref_call): New function.
(fold_gimple_call): Renamed to gimple_fold_call, made external.
Updated users. Call gimple_fold_obj_type_ref_call instead of
gimple_fold_obj_type_ref.
* ipa-cp.c (ipcp_process_devirtualization_opportunities): Process
thunk deltas.
(ipcp_discover_new_direct_edges): Likewise.
* ipa-prop.c (ipa_make_edge_direct_to_target): New parameter delta.
Updated callers.
(ipa_write_indirect_edge_info): Stream thunk_delta.
(ipa_read_indirect_edge_info): Likewise.
* tree-ssa-ccp.c (ccp_fold_stmt): Use gimple_fold_call instead of
gimple_fold_obj_type_ref.
* testsuite/g++.dg/ipa/pr46053.C: New test.
* testsuite/g++.dg/ipa/pr46287-1.C: Likewise.
* testsuite/g++.dg/ipa/pr46287-2.C: Likewise.
* testsuite/g++.dg/ipa/pr46287-3.C: Likewise.
* testsuite/g++.dg/torture/covariant-1.C: Likewise.
* testsuite/g++.dg/torture/pr46287.C: Likewise.
From-SVN: r167855
|
|
PR tree-optimization/46760
* cgraph.c (cgraph_create_node): Initialize count_materialization_scale.
* cgraph.h (struct cgraph_node): Add count_materialization_scale.
* lto-cgraph.c (lto_output_edge): Fix assert.
(lto_output_node): Output count_materialization_scale.
(output_profile_summary): Output only runs and sum_max.
(input_node): Input count_materialization_scale.
(input_profile_summary): Read data into file specific gcov summary.
(merge_profile_summaries): New function.
(input_cgraph): Update call of input_profile_summary;
call merge_profile_summaries.
* lto-streamer-in.c (input_cfg): Add count_materialization_scale arg;
rescale counts at read in.
(intput_bb): Likewise.
(input_function): Update call of input_bb.
(lto_read_body): Update call of input_cfg.
* lto-streamer.h: Inlclude gcov-io.h
(lto_file_decl_data): Add gcov_ctr_summary.
From-SVN: r167458
|
|
2010-11-26 Richard Guenther <rguenther@suse.de>
PR lto/46560
* cgraph.c (cgraph_clone_edge): Clone call_stmt dependent
flags manually.
From-SVN: r167178
|
|
* cgraph.c (ld_plugin_symbol_resolution_names): New.
(dump_cgraph_node): Dump resolution.
* cgraph.h (ld_plugin_symbol_resolution_names): Declare.
(cgraph_comdat_can_be_unshared_p): Dclare.
* lto-streamer-out.c (produce_symtab): Use
cgraph_comdat_can_be_unshared_p.
* ipa.c (cgraph_address_taken_from_non_vtable_p): New function.
(cgraph_comdat_can_be_unshared_p): New function based on logic
in cgraph_externally_visible_p.
(cgraph_externally_visible_p): Use it.
(varpool_externally_visible_p): Virtual tables can be unshared.
* varpool.c (dump_varpool_node): Dump resolution.
From-SVN: r166984
|
|
4.5.1 than in 4.4.5)
PR tree-optimize/46228
* cgraph.c (cgraph_propagate_frequency): Fix typo.
From-SVN: r166553
|
|
-flto and attribute((constructor)))
PR middle-end/45736
* cgraph.c (cgraph_set_readonly_flag): Rename to...
(cgraph_set_const_flags) ... this one; get also looping argument;
clear constructor/destructor flags.
(cgraph_set_pure_flag): Likewise.
(cgraph_set_looping_const_or_pure_flag): Remove.
(cgraph_can_remove_if_no_direct_calls_and_refs): Do not try
to optimize away static ctors/dtors; it does not work on inline clones;
external functions can always be rmeoved.
(cgraph_will_be_removed_from_program_if_no_direct_calls): Assert on inline
clones; in LTO external functions always can go.
(cgraph_used_from_object_file_p): Handle EXTERNAL functions correctly.
(cgraph_mark_address_taken_node): Assert that we are not taking address of
inline clone.
(cgraph_can_remove_if_no_direct_calls_p): We always eventually remove
external functions.
* ipa-cp.c (ipcp_cloning_candidate_p): Do not clone functions with address taken.
(ipcp_initialize_node_lattices): Only local functions can be handled without cloning.
* cgraph.h (cgraph_set_readonly_flag,
cgraph_set_looping_const_or_pure_flag): Remove.
(cgraph_set_const_flag): Declare.
(cgraph_set_pure_flag): Update.
* ipa-pure-const (propagate_pure_const, local_pure_const): Update
flags setting code.
* ipa.c (cgraph_remove_unreachable_nodes): Fix formating; do not look at inline
clones; fix handling of external definitions.
(cgraph_postorder): Do not look at inline clones in the first pass.
(function_and_variable_visibility): Drop constructors/destructor
flags at pure and const functions.
* tree-profile.c (tree_profiling): Update.
* ipa-inline.c (cgraph_clone_inlined_nodes): Always clone functions with
address taken; external functions do not account to whole program size.
(cgraph_decide_inlining): Likewise; do not try to inline functions already
inlined.
* testsuite/gcc.dg/lto/pr45736_0.c: New function.
From-SVN: r165972
|
|
* basic-block.h (single_succ_edge): Use gcc_checking_assert.
(single_pred_edge, ei_container, ei_next, ei_prev): Likewise.
* cfghooks.c (fixup_reorder_chain): Likewise.
* cfgrtl.c (cfg_layout_merge_blocks): Likewise.
* cgraph.c (cgraph_add_thunk): Likewise.
(cgraph_create_edge_1): Likewise.
(cgraph_create_virtual_clone): Likewise.
* ddg.c (add_cross_iteration_register_deps): Likewise.
* dwarf2out.c (modified_type_die): Likewise.
* emit-rtl.c (set_mem_alias_set): Likewise.
* ggc-zone.c (zone_allocate_marks): Likewise.
* gimple-iterator.c (gsi_move_to_bb_end): Likewise.
* gimple.c (iterative_hash_gimple_type): Likewise.
* graphite-scop-detection.c (create_single_entry_edge): Likewise.
(create_single_exit_edge): Likewise.
* haifa-sched.c (choose_ready): Likewise.
* lto-streamer-in.c (input_gimple_stmt): Likewise.
* passes.c (execute_todo): Likewise.
* sched-ebb.c (begin_schedule_ready): Likewise.
* sel-sched.c (code_motion_process_successors): Likewise.
* tree-call-cdce.c (gen_conditions_for_pow): Likewise.
* tree-cfg-cleanup.c (tree_forwarder_block_p): Likewise.
* tree-flow-inline.h (link_imm_use, move_use_after_head): Likewise.
(phi_arg_index_from_use, phi_ssa_name_p): Likewise.
* tree-into-ssa.c (insert_updated_phi_nodes_for): Likewise.
* tree-ssa-coalesce.c (ssa_conflicts_test_p): Likewise.
(ssa_conflicts_add): Likewise.
* tree-ssa-copy.c (replace_exp): Likewise.
* tree-ssa-dom.c (eliminate_redundant_computations): Likewise.
* tree-ssa-forwprop.c (simple_gimple_switch): Likewise.
* tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
* tree-ssa-pre.c (bitmap_value_insert_into_set): Likewise.
(compute_antic): Likewise.
* tree-ssa-ter.c (add_to_partition_kill_list): Likewise.
(add_dependence): Likewise.
(process_replaceable, kill_expr, find_replaceable_exprs): Likewise.
* tree-vrp.c (supports_overflow_infinity): Likewise.
(make_overflow_infinity, negative_overflow_infinity): Likewise.
(avoid_overflow_infinity, register_new_assert_for): Likewise.
(process_assert_insertions_for): Likewise.
* var-tracking.c (dv_is_value_p, dv_as_decl, dv_from_decl): Likewise.
(dv_from_value, variable_union, find_loc_in_1pdv): Likewise.
(intersect_loc_chains, variable_merge_over_cur): Likewise.
From-SVN: r165774
|
|
and only_called_at_exit.
* cgraph.c (dump_cgraph_node): Dump same_comdat_group,
only_called_at_startup and only_called_at_exit.
(cgraph_propagate_frequency): Compute only_called_at_startup and
only_called_at_exit.
* cgraph.h (struct cgraph_node): New fileds only_called_at_startup and
only_called_at_exit.
* lto-cgraph.c (lto_output_node, input_overwrite_node): Stream the new
flags.
* predict.c (compute_function_frequency): Initialize the new flags.
From-SVN: r165560
|
|
pointer is set but no predecessors found with -fipa-cp-clone -flto)
PR middle-end/45621
* g++.dg/lto/pr45621.h : New.
* g++.dg/lto/pr45621_0.C: New.
* g++.dg/lto/pr45621_1.C: New.
* cgraph.c (cgraph_update_edges_for_call_stmt_node): When new call is
redirected to clone, be happy.
* cgraph.h (cgraph node): Enable former_clone_of unconditinally.
* cgraphunit.c (verify_cgraph_node, cgraph_materialize_clone): Handle
former_clone_of unconditinally.
From-SVN: r165492
|
|
* lto-symtab.c (lto_symtab_entry_def): Add guessed field.
(lto_symtab_resolve_symbols): Set it.
(lto_symtab_merge_decls_1): Do not compute used_from_object_file;
store resolution field in cgraph/varpool.
* cgraph.c (cgraph_same_body_alias, cgraph_add_thunk): Return node.
(cgraph_get_node_or_alias, cgraph_get_node_or_alias): Constify.
(cgraph_dump_node): Drop used_from_object_file.
(cgraph_clone_node, cgraph_create_virtual_clone): Likewise.
(cgraph_function_body_availability): Use decl_replaceable_p.
(cgraph_make_node_local): Set resolution to LDPR_PREVAILING_DEF_IRONLY.
(cgraph_can_remove_if_no_direct_calls_and_refs): Use
cgraph_used_from_object_file_p.
(cgraph_will_be_removed_from_program_if_no_direct_calls): Use
cgraph_used_from_object_file_p.
(resolution_used_from_other_file_p): New functoin.
(cgraph_used_from_object_file_p): New predicate.
* cgraph.h: Include plugin-api.h
(struct cgraph_local_info): Remove used_from_object_file.
(struct cgraph_node): Add resolution field.
(struct varpool_node): Likewise; remove used_from_object_file;
reove const_value_known.
(cgraph_get_node, cgraph_get_node_or_alias, cgraph_node,
cgraph_same_body_alias, cgraph_add_thunk): Update prototypes.
(resolution_used_from_other_file_p, cgraph_used_from_object_file_p,
varpool_used_from_object_file_p): Declare.
(varpool_get_node, varpool_extra_name_alias): Update prototype.
* tree.h (DECL_REPLACEABLE_P): Remove.
(decl_replaceable_p, decl_binds_to_current_def_p): Declare.
* final.c (rest_of_clean_state): Use decl_binds_to_current_def_p.
* lto-cgraph.c (lto_output_node, lto_output_varpool_node,
input_overwrite_node, input_node, input_varpool_node): Stream
resolution.
* expr.c (expand_expr_real_1): Use const_value_known_p
* ipa.c (ipa_discover_readonly_nonaddressable_var): Do not set
const_value_known.
(cgraph_externally_visible_p): Use cgraph_used_from_object_file_p.
(function_and_variable_visibility): Set resolution for local vars
and functions.
use varpool_used_from_object_file_p.
* varasm.c (resolution_to_local_definition_p, resolution_local_p): New
static functions.
(default_binds_local_p_1): Use resolutoin info.
(decl_binds_to_current_def_p, decl_replaceable_p): New functions.
* varpool.c (varpool_get_node): Constify.
(const_value_known_p): Do not use vnode->const_value_known;
use decl_replaceable_p.
(varpool_finalize_decl): Do not set const_value_known.
(cgraph_variable_initializer_availability): Use decl_replaceable_p
(varpool_extra_name_alias): Return new node.
(varpool_used_from_object_file_p): New function.
* decl.c (finish_function): Use decl_replaceable_p
* method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias.
* lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
From-SVN: r164610
|
|
optimizers, Empty ctors/dtors not eliminated)
PR c++/45307
PR c++/17736
* cgraph.h (cgraph_only_called_directly_p,
cgraph_can_remove_if_no_direct_calls_and_refs_p): Handle
static cdtors.
* cgraphunit.c (cgraph_decide_is_function_needed): Static cdtors
are not needed.
(cgraph_finalize_function): Static cdtors are reachable.
(cgraph_mark_functions_to_output): Use cgraph_only_called_directly_p.
* gcc.dg/ipa/ctor-empty-1.c: Add testcase.
* g++.dg/tree-ssa/empty-2.C: Check that constructor got optimized out.
From-SVN: r163439
|
|
gcc/
* vec.h (FOR_EACH_VEC_ELT): Define.
* c-decl.c: Use it.
* cfgloop.c: Likewise.
* cfgloopmanip.c: Likewise.
* cgraph.c: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/mips/mips.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* dbxout.c: Likewise.
* df-scan.c: Likewise.
* dominance.c: Likewise.
* dse.c: Likewise.
* dwarf2out.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* function.c: Likewise.
* gcse.c: Likewise.
* genattr.c: Likewise.
* ggc-common.c: Likewise.
* gimplify.c: Likewise.
* graphite-blocking.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* haifa-sched.c: Likewise.
* ifcvt.c: Likewise.
* implicit-zee.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-emit.c: Likewise.
* lambda-code.c: Likewise.
* loop-invariant.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-opts.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.c: Likewise.
* lto-symtab.c: Likewise.
* matrix-reorg.c: Likewise.
* opts.c: Likewise.
* predict.c: Likewise.
* print-tree.c: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched.c: Likewise.
* sese.c: Likewise.
* stor-layout.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-chrec.c: Likewise.
* tree-data-ref.c: Likewise.
* tree-emutls.c: Likewise.
* tree-inline.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-loop-linear.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-loop-manip.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-slp.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* value-prof.c: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* vmsdbgout.c: Likewise.
gcc/ada/
* gcc-interface/decl.c: Use FOR_EACH_VEC_ELT.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
gcc/c-family/
* c-common.c: Use FOR_EACH_VEC_ELT.
* c-gimplify.c: Likewise.
* c-pragma.c: Likewise.
gcc/cp/
* call.c: Use FOR_EACH_VEC_ELT.
* class.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* error.c: Likewise.
* except.c: Likewise.
* mangle.c: Likewise.
* method.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* semantics.c: Likewise.
* typeck2.c: Likewise.
gcc/fortran/
* trans-openmp.c: Use FOR_EACH_VEC_ELT.
gcc/java/
* class.c: Use FOR_EACH_VEC_ELT.
* expr.c: Likewise.
* jcf-parse.c: Likewise.
* resource.c: Likewise.
gcc/lto/
* lto.c: Use FOR_EACH_VEC_ELT.
From-SVN: r163401
|
|
gcc/
* tree.h (DECL_CHAIN): Define.
* alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
* c-decl.c: Likewise.
* c-parser.c: Likewise.
* c-typeck.c: Likewise.
* cfgexpand.c: Likewise.
* cgraph.c: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/arm/arm.c: Likewise.
* config/frv/frv.c: Likewise.
* config/i386/i386.c: Likewise.
* config/i386/winnt-cxx.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/iq2000/iq2000.c: Likewise.
* config/mep/mep.c: Likewise.
* config/mips/mips.c: Likewise.
* config/pa/som.h: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/s390/s390.c: Likewise.
* config/sh/sh.c: Likewise.
* config/sh/symbian-cxx.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/spu/spu.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/vxworks.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
* coverage.c: Likewise.
* dbxout.c: Likewise.
* dwarf2out.c: Likewise.
* emit-rtl.c: Likewise.
* expr.c: Likewise.
* function.c: Likewise.
* gimple-low.c: Likewise.
* gimple-pretty-print.c: Likewise.
* gimplify.c: Likewise.
* integrate.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-split.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-type-escape.c: Likewise.
* langhooks.c: Likewise.
* lto-cgraph.c: Likewise.
* omp-low.c: Likewise.
* stor-layout.c: Likewise.
* tree-cfg.c: Likewise.
* tree-complex.c: Likewise.
* tree-dfa.c: Likewise.
* tree-dump.c: Likewise.
* tree-inline.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-nested.c: Likewise.
* tree-object-size.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-tailcall.c: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
gcc/ada/
* gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
* gcc-interface/utils2.c: Likewise.
gcc/c-family/
* c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
* c-format.c: Likewise.
gcc/cp/
* cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
* call.c: Likewise.
* class.c: Likewise.
* cp-gimplify.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* init.c: Likewise.
* mangle.c: Likewise.
* name-lookup.c: Likewise.
* optimize.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
gcc/fortran/
* f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
* trans-common.c: Likewise.
* trans-decl.c: Likewise.
* trans-types.c: Likewise.
* trans.c: Likewise.
gcc/java/
* java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
* boehm.c: Likewise.
* class.c: Likewise.
* decl.c: Likewise.
* expr.c: Likewise.
* jcf-parse.c: Likewise.
* typeck.c: Likewise.
* verify-glue.c: Likewise.
gcc/objc/
* objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
gcc/testsuite/
* g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN
with DECL_CHAIN.
From-SVN: r162223
|
|
* cgraph.c: Include lto-streamer.h
(change_decl_assembler_name): Work when assembler name hash is at place.
(cgraph_make_decl_local): When localizing COMDAT symbol at WPA stage, be
sure to rename it to avoid name clash.
* ipa.c (cgraph_externally_visible_p, function_and_variable_visibility):
Localize hidden symbols only when locally defined.
From-SVN: r162211
|
|
* cgraph.c (cgraph_will_be_removed_from_program_if_no_direct_calls):
New function.
* cgraph.h (cgraph_will_be_removed_from_program_if_no_direct_calls):
Declare.
* ipa-cp.c (ipcp_estimate_growth): Use it.
* ipa-inline.c (cgraph_estimate_growth, cgraph_decide_inlining):
Likewise.
From-SVN: r161966
|
|
* ipa.c: Include pointer-set.h
(cgraph_externally_visible_p): New attribute ALIASED;
when in LTO, hidden symbols are local unless they are aliased.
(function_and_variable_visibility): Compute aliased nodes;
handle LTO and hidden symbol on functions and vars.
* cgraph.c (cgraph_make_decl_local): Clear NAMED_SECTION
for COMDAT symbols; handle COMDAT_GROUPS also at vars.
From-SVN: r161957
|
|
* lto-symtab.c (lto_cgraph_replace_node): Handle aliases.
(lto_symtab_resolve_can_prevail_p): Also alias of cgraph node
with body can prevail.
(lto_symtab_resolve_symbols): Use cgraph_get_node_or_alias.
(lto_symtab_merge_cgraph_nodes_1): Do not remove nodes from aliases.
* cgraph.c (cgraph_get_node_or_alias): New function.
* cgraph.h (cgraph_get_node_or_alias): Declare.
From-SVN: r161877
|
|
conflict with -fipa-cp -fipa-cp-clone)
PR tree-optimization/43801
* cgraph.c (cgraph_create_virtual_clone): Clear DECL_SECTION_NAME
if old_decl was DECL_ONE_ONLY.
* g++.dg/torture/pr43801.C: New test.
From-SVN: r161564
|
|
2010-06-28 Bingfeng Mei <bmei@broadcom.com>
* cgraph.h (struct varpool_node): new used_from_object_file flag.
(struct cgraph_local_info): new used_from_object_file flag.
* cgraph.c (dump_cgraph_node): dump used_from_object_file flag.
(cgraph_clone_node): initialize used_from_object_file.
(cgraph_create_virtual_clone): initialize used_from_object_file.
* lto-symbtab.c (lto_symtab_merge_decls_1): Set
used_from_object_file flags for symbols of LDPR_PREVAILING_DEF
when compiling with -fwhole-program.
(lto_symtab_resolve_symbols) Use LDPR_PREVAILING_DEF_IRONLY for
internal resolver.
* ipa.c (function_and_variable_visibility): Set externally_visible
flag of varpool_node if used_from_object_file flag is set.
(cgraph_externally_visible_p): check used_from_object_file flag.
* doc/invoke.texi (-fwhole-program option): Change description of
externally_visible attribute accordingly.
* doc/extend.texi (externally_visible): Ditto.
From-SVN: r161483
|
|
gcc/ada:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC
allocation.
(init_dummy_type): Likewise.
(gnat_pushlevel): Likewise.
* gcc-interface/trans.c (Attribute_to_gnu): Likewise.
(Subprogram_Body_to_gnu): Likewise.
(Compilation_Unit_to_gnu): Likewise.
(start_stmt_group): Likewise.
(extract_encoding): Likewise.
(decode_name): Likewise.
* gcc-interface/misc.c (gnat_printable_name): Likewise.
* gcc-interface/decl.c (annotate_value): Likewise.
* gcc-interface/ada-tree.h (struct lang_type): Add variable_size
GTY option.
(struct lang_decl): Likewise.
(SET_TYPE_LANG_SPECIFIC): Use typed GC allocation.
(SET_DECL_LANG_SPECIFIC): Likewise.
gcc/c-family:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* c-pragma.c (push_alignment): Use typed GC allocation.
(handle_pragma_push_options): Likewise.
* c-common.c (parse_optimize_options): Likewise.
* c-common.h (struct sorted_fields_type): Add variable_size GTY
option.
gcc/cp:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* typeck2.c (abstract_virtuals_error): Likewise.
* pt.c (maybe_process_partial_specialization): Likewise.
(register_specialization): Likewise.
(add_pending_template): Likewise.
(lookup_template_class): Likewise.
(push_tinst_level): Likewise.
* parser.c (cp_lexer_new_main): Likewise.
(cp_lexer_new_from_tokens): Likewise.
(cp_token_cache_new): Likewise.
(cp_parser_context_new): Likewise.
(cp_parser_new): Likewise.
(cp_parser_nested_name_specifier_opt): Likewise.
(cp_parser_template_id): Likewise.
* name-lookup.c (binding_entry_make): Likewise.
(binding_table_construct): Likewise.
(binding_table_new): Likewise.
(cxx_binding_make): Likewise.
(pushdecl_maybe_friend): Likewise.
(begin_scope): Likewise.
(push_to_top_level): Likewise.
* lex.c (init_reswords): Likewise.
(retrofit_lang_decl): Likewise.
(cxx_dup_lang_specific_decl): Likewise.
(copy_lang_type): Likewise.
(cxx_make_type): Likewise.
* decl.c (make_label_decl): Likewise.
(check_goto): Likewise.
(start_preparsed_function): Likewise.
(save_function_data): Likewise.
* cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
* cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
* class.c (finish_struct_1): Likewise.
* cp-tree.h (struct lang_type): Add variable_size GTY option.
(struct lang_decl): Likewise.
* parser.c (cp_parser_new): Update comment to not reference
ggc_alloc.
gcc/fortran:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* trans-types.c (gfc_get_nodesc_array_type): Use typed GC
allocation.
(gfc_get_array_type_bounds): Likewise.
* trans-decl.c (gfc_allocate_lang_decl): Likewise.
(gfc_find_module): Likewise.
* f95-lang.c (pushlevel): Likewise.
* trans.h (struct lang_type): Add variable_size GTY option.
(struct lang_decl): Likewise.
gcc/java:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
* jcf-parse.c (java_parse_file): Likewise.
(process_zip_dir): Likewise.
* java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
(MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
* expr.c (add_type_assertion): Likewise.
* decl.c (make_binding_level): Likewise.
(java_dup_lang_specific_decl): Likewise.
* constants.c (set_constant_entry): Likewise.
(cpool_for_class): Likewise.
* class.c (add_method_1): Likewise.
(java_treetreehash_new): Likewise.
* java-tree.h (struct lang_type): Add variable_size GTY option.
(struct lang_decl): Likewise.
* jch.h (struct cpool_entry): Likewise.
* java-tree.h (java_treetreehash_create): Remove parameter ggc.
* except.c (prepare_eh_table_type): Update
java_treetreehash_create call.
* class.c (add_method_1): Update java_treetreehash_create call.
(java_treetreehash_create): Remove parameter gc. Use
htab_create_ggc.
gcc/lto:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* lto.c (lto_read_in_decl_state): Use typed GC allocation.
(lto_file_read): Likewise.
(new_partition): Likewise.
(read_cgraph_and_symbols): Likewise.
gcc/objc:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
allocation.
* objc-act.c (objc_volatilize_decl): Likewise.
(objc_build_string_object): Likewise.
(hash_init): Likewise.
(hash_enter): Likewise.
(hash_add_attr): Likewise.
(add_class): Likewise.
(start_class): Likewise.
gcc/objcp:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
allocation.
gcc:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* doc/tm.texi (Per-Function Data): Do not reference ggc_alloc.
* doc/gty.texi (GTY Options): Document typed GC allocation and
variable_size GTY option.
* ggc-internal.h: New.
* ggc.h: Update copyright year.
(digit_string): Move to stringpool.c.
(ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots)
(gt_pch_save_stringpool, gt_pch_fixup_stringpool)
(gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object)
(init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size)
(ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write)
(ggc_pch_write_object, ggc_pch_finish, ggc_pch_read)
(ggc_force_collect, ggc_get_size, ggc_statistics)
(ggc_print_common_statistics): Move to ggc-internal.h.
(digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat)
(ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW)
(GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec)
(ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic)
(ggc_min_heapsize_heuristic, ggc_alloc_zone)
(ggc_alloc_zone_pass_stat): Remove.
(ggc_internal_alloc_stat, ggc_internal_alloc)
(ggc_internal_cleared_alloc_stat): New.
(GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine.
(ggc_internal_vec_alloc_stat)
(ggc_internal_cleared_vec_alloc_stat)
(ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc)
(ggc_alloc_atomic_stat, ggc_alloc_atomic)
(ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args)
(ggc_cleared_alloc_ptr_array_two_args): New.
(htab_create_ggc, splay_tree_new_ggc): Redefine.
(ggc_splay_alloc): Change the type of the first argument to
enum gt_types_enum.
(ggc_alloc_string): Make macro.
(ggc_alloc_string_stat): New.
(ggc_strdup): Redefine.
(rtl_zone, tree_zone, tree_id_zone): Declare unconditionally.
(ggc_alloc_rtvec_sized): New.
(ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat.
(ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat)
(ggc_internal_cleared_alloc_zone_stat)
(ggc_internal_zone_alloc_stat)
(ggc_internal_zone_cleared_alloc_stat)
(ggc_internal_zone_vec_alloc_stat)
(ggc_alloc_zone_rtx_def_stat)
(ggc_alloc_zone_tree_node_stat)
(ggc_alloc_zone_cleared_tree_node_stat)
(ggc_alloc_cleared_gimple_statement_d_stat): New.
* ggc-common.c: Include ggc-internal.h.
(ggc_internal_cleared_alloc_stat): Rename from
ggc_alloc_cleared_stat.
(ggc_realloc_stat): Use ggc_internal_alloc_stat.
(ggc_calloc): Remove.
(ggc_cleared_alloc_htab_ignore_args): New.
(ggc_cleared_alloc_ptr_array_two_args): New.
(ggc_splay_alloc): Add obj_type parameter.
(init_ggc_heuristics): Formatting fixes.
* ggc-none.c: Update copyright year.
(ggc_alloc_stat): Rename to ggc_alloc_stat.
(ggc_alloc_cleared_stat): Rename to
ggc_internal_cleared_alloc_stat.
(struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New.
* ggc-page.c: Update copyright year. Include ggc-internal.h.
Remove references to ggc_alloc in comments.
(ggc_alloc_typed_stat): Call ggc_internal_alloc_stat.
(ggc_alloc_stat): Rename to ggc_internal_alloc_stat.
(new_ggc_zone, destroy_ggc_zone): Remove.
(struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New.
* ggc-zone.c: Include ggc-internal.h. Remove references to
ggc_alloc in comments.
(ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat.
(ggc_internal_alloc_zone_pass_stat): New.
(ggc_internal_cleared_alloc_zone_stat): New.
(ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat.
(ggc_alloc_stat): Rename ggc_internal_alloc_stat.
(new_ggc_zone, destroy_ggc_zone): Remove.
* stringpool.c: Update copyright year. Include ggc-internal.h
(digit_vector): Make static.
(digit_string): Moved from ggc.h.
(stringpool_ggc_alloc): Use ggc_alloc_atomic.
(ggc_alloc_string): Rename to ggc_alloc_string_stat.
* Makefile.in (GGC_INTERNAL_H): New.
(ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add
$(GGC_INTERNAL_H) to dependencies.
* gentype.c: Update copyright year.
(walk_type): Accept variable_size GTY option.
(USED_BY_TYPED_GC_P): New macro.
(write_enum_defn): Use USED_BY_TYPED_GC_P. Do not output
whitespace at the end of strings.
(get_type_specifier, variable_size_p): New functions.
(alloc_quantity, alloc_zone): New enums.
(write_typed_alloc_def): New function.
(write_typed_struct_alloc_def): Likewise.
(write_typed_typed_typedef_alloc_def): Likewise.
(write_typed_alloc_defns): Likewise.
(output_typename, write_splay_tree_allocator_def): Likewise.
(write_splay_tree_allocators): Likewise.
(main): Call write_typed_alloc_defns and
write_splay_tree_allocators.
* lto-streamer.h (lto_file_decl_data_ptr): New.
* passes.c (order): Define using cgraph_node_ptr.
* strinpool.c (struct string_pool_data): Declare nested_ptr using
ht_identifier_ptr.
* gimple.h (union gimple_statement_d): Likewise.
* rtl.h (struct rtx_def): Likewise.
(struct rtvec_def): Likewise.
* tree.h (union tree_node): Likewise.
* tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise.
* cfgloop.c (record_loop_exits): Use htab_create_ggc.
* tree-scalar-evolution.c (scev_initialize): Likewise.
* alias.c (record_alias_subset): Update splay_tree_new_ggc call.
* dwarf2asm.c (dw2_force_const_mem): Likewise.
* omp-low.c (lower_omp_critical): Likewise.
* bitmap.h (struct bitmap_head_def): Update comment to not
reference ggc_alloc.
* config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC.
* ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC.
* ipa-prop.c (duplicate_ggc_array): Rename to
duplicate_ipa_jump_func_array. Use typed GC allocation.
(ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array.
* gimple.c (gimple_alloc_stat): Use
ggc_alloc_cleared_gimple_statement_d_stat.
* varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def.
* tree.c (make_node_stat): Use
ggc_alloc_zone_cleared_tree_node_stat.
(make_tree_vec_stat): Likewise.
(build_vl_exp_stat): Likewise.
(copy_node_stat): Use ggc_alloc_zone_tree_node_stat.
(make_tree_binfo_stat): Likewise.
(tree_cons_stat): Likewise.
* rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat.
(shallow_copy_rtx_stat): Likewise.
(make_node_stat): Likewise.
* lto-symtab.c: Fix comment.
* tree-cfg.c (create_bb): Update comment to not reference
ggc_alloc_cleared.
* tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is
value.
* varpool.c (varpool_node): Use typed GC allocation.
(varpool_extra_name_alias): Likewise.
* varasm.c (emutls_decl): Likewise.
(get_unnamed_section): Likewise.
(get_noswitch_section): Likewise.
(get_section): Likewise.
(get_block_for_section): Likewise.
(build_constant_desc): Likewise.
(create_constant_pool): Likewise.
(force_const_mem): Likewise.
* tree.c (build_vl_exp_stat): Likewise.
(build_real): Likewise.
(build_string): Likewise.
(decl_debug_expr_insert): Likewise.
(decl_value_expr_insert): Likewise.
(type_hash_add): Likewise.
(build_omp_clause): Likewise.
* tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise.
* tree-ssa.c (init_tree_ssa): Likewise.
* tree-ssa-structalias.c (heapvar_insert): Likewise.
* tree-ssa-operands.c (ssa_operand_alloc): Likewise.
* tree-ssa-loop-niter.c (record_estimate): Likewise.
* tree-ssa-alias.c (get_ptr_info): Likewise.
* tree-scalar-evolution.c (new_scev_info_str): Likewise.
* tree-phinodes.c (allocate_phi_node): Likewise.
* tree-iterator.c (tsi_link_before): Likewise.
(tsi_link_after): Likewise.
* tree-eh.c (add_stmt_to_eh_lp_fn): Likewise.
* tree-dfa.c (create_var_ann): Likewise.
* tree-cfg.c (create_bb): Likewise.
* toplev.c (alloc_for_identifier_to_locale): Likewise.
(general_init): Likewise.
* stringpool.c (stringpool_ggc_alloc): Likewise.
(gt_pch_save_stringpool): Likewise.
* sese.c (if_region_set_false_region): Likewise.
* passes.c (do_per_function_toporder): Likewise.
* optabs.c (set_optab_libfunc): Likewise.
(set_conv_libfunc): Likewise.
* lto-symtab.c (lto_symtab_register_decl): Likewise.
* lto-streamer-in.c (lto_input_eh_catch_list): Likewise.
(input_eh_region): Likewise.
(input_eh_lp): Likewise.
(make_new_block): Likewise.
(unpack_ts_real_cst_value_fields): Likewise.
* lto-section-in.c (lto_new_in_decl_state): Likewise.
* lto-cgraph.c (input_node_opt_summary): Likewise.
* loop-init.c (loop_optimizer_init): Likewise.
* lambda.h (lambda_vector_new): Likewise.
* lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise.
* ira.c (update_equiv_regs): Likewise.
* ipa.c (cgraph_node_set_new): Likewise.
(cgraph_node_set_add): Likewise.
(varpool_node_set_new): Likewise.
(varpool_node_set_add): Likewise.
* ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
(duplicate_ipa_jump_func_array): Likewise.
(ipa_read_node_info): Likewise.
* ipa-cp.c (ipcp_create_replace_map): Likewise.
* integrate.c (get_hard_reg_initial_val): Likewise.
* gimple.c (gimple_alloc_stat): Likewise.
(gimple_build_omp_for): Likewise.
(gimple_seq_alloc): Likewise.
(gimple_copy): Likewise.
* gimple-iterator.c (gsi_insert_before_without_update): Likewise.
(gsi_insert_after_without_update): Likewise.
* function.c (add_frame_space): Likewise.
(insert_temp_slot_address): Likewise.
(assign_stack_temp_for_type): Likewise.
(allocate_struct_function): Likewise.
(types_used_by_var_decl_insert): Likewise.
* except.c (init_eh_for_function): Likewise.
(gen_eh_region): Likewise.
(gen_eh_region_catch): Likewise.
(gen_eh_landing_pad): Likewise.
(add_call_site): Likewise.
* emit-rtl.c (get_mem_attrs): Likewise.
(get_reg_attrs): Likewise.
(start_sequence): Likewise.
(init_emit): Likewise.
* dwarf2out.c (new_cfi): Likewise.
(queue_reg_save): Likewise.
(dwarf2out_frame_init): Likewise.
(new_loc_descr): Likewise.
(find_AT_string): Likewise.
(new_die): Likewise.
(add_var_loc_to_decl): Likewise.
(clone_die): Likewise.
(clone_as_declaration): Likewise.
(break_out_comdat_types): Likewise.
(new_loc_list): Likewise.
(loc_descriptor): Likewise.
(add_loc_descr_to_each): Likewise.
(add_const_value_attribute): Likewise.
(tree_add_const_value_attribute): Likewise.
(add_comp_dir_attribute): Likewise.
(add_name_and_src_coords_attributes): Likewise.
(lookup_filename): Likewise.
(store_vcall_insn): Likewise.
(dwarf2out_init): Likewise.
* dbxout.c (dbxout_init): Likewise.
* config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise.
* config/sparc/sparc.c (sparc_init_machine_status): Likewise.
* config/score/score7.c (score7_output_external): Likewise.
* config/score/score3.c (score3_output_external): Likewise.
* config/s390/s390.c (s390_init_machine_status): Likewise.
* config/rs6000/rs6000.c (builtin_function_type): Likewise.
(rs6000_init_machine_status): Likewise.
(output_toc): Likewise.
* config/pa/pa.c (pa_init_machine_status): Likewise.
(get_deferred_plabel): Likewise.
* config/moxie/moxie.c (moxie_init_machine_status): Likewise.
* config/mmix/mmix.c (mmix_init_machine_status): Likewise.
* config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise.
* config/mep/mep.c (mep_init_machine_status): Likewise.
(mep_note_pragma_flag): Likewise.
* config/m32c/m32c.c (m32c_init_machine_status): Likewise.
* config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise.
* config/ia64/ia64.c (ia64_init_machine_status): Likewise.
* config/i386/winnt.c (i386_pe_record_external_function): Likewise.
(i386_pe_maybe_record_exported_symbol): Likewise.
* config/i386/i386.c (get_dllimport_decl): Likewise.
(ix86_init_machine_status): Likewise.
(assign_386_stack_local): Likewise.
* config/frv/frv.c (frv_init_machine_status): Likewise.
* config/darwin.c (machopic_indirection_name): Likewise.
* config/cris/cris.c (cris_init_machine_status): Likewise.
* config/bfin/bfin.c (bfin_init_machine_status): Likewise.
* config/avr/avr.c (avr_init_machine_status): Likewise.
* config/arm/arm.c (arm_init_machine_status): Likewise.
* config/alpha/alpha.c (alpha_init_machine_status): Likewise.
(alpha_need_linkage): Likewise.
(alpha_use_linkage): Likewise.
* cgraph.c (cgraph_allocate_node): Likewise.
(cgraph_create_edge_1): Likewise.
(cgraph_create_indirect_edge): Likewise.
(cgraph_add_asm_node): Likewise.
* cfgrtl.c (init_rtl_bb_info): Likewise.
* cfgloop.c (alloc_loop): Likewise.
(rescan_loop_exit): Likewise.
* cfg.c (init_flow): Likewise.
(alloc_block): Likewise.
(unchecked_make_edge): Likewise.
* c-parser.c (c_parse_init): Likewise.
(c_parse_file): Likewise.
* c-decl.c (bind): Likewise.
(record_inline_static): Likewise.
(push_scope): Likewise.
(make_label): Likewise.
(lookup_label_for_goto): Likewise.
(finish_struct): Likewise.
(finish_enum): Likewise.
(c_push_function_context): Likewise.
* bitmap.c (bitmap_element_allocate): Likewise.
(bitmap_gc_alloc_stat): Likewise.
* alias.c (record_alias_subset): Likewise.
(init_alias_analysis): Likewise.
include:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* splay-tree.h: Update copyright years.
(splay_tree_s): Document fields.
(splay_tree_new_typed_alloc): New.
* hashtab.h: Update copyright years.
(htab_create_typed_alloc): New.
libcpp:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* include/symtab.h (ht_identifier_ptr): New.
libiberty:
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* splay-tree.c: Update copyright years.
(splay_tree_new_typed_alloc): New.
(splay_tree_new_with_allocator): Use it.
* hashtab.c: Update copyright years.
(htab_create_typed_alloc): New.
(htab_create_alloc): Use it.
* functions.texi: Regenerate.
From-SVN: r160425
|
|
* cgraph.c (cgraph_edge_cannot_lead_to_return): Also check
if caller is noreturn.
* ipa-reference.c (analyze_function): Use ipa_ref_cannot_lead_to_return
* ipa-ref.h (ipa_ref_cannot_lead_to_return): New function.
* ipa-ref.c (ipa_ref_cannot_lead_to_return): New function.
* ipa-pure-const.c (check_decl): Add IPA parameter.
(state_from_flags): New function.
(better_state, worse_state): New functions.
(check_call): When in IPA mode, do not care about callees.
(check_load, check_store): Update.
(check_ipa_load, check_ipa_store): New.
(check_stmt): When in IPA mode, use IPA checkers.
(analyze_function): Use state_from_flags.
(propagate): Check indirect edges and references.
From-SVN: r160380
|
|
* cgraph.h (cgraph_node_cannot_return,
cgraph_edge_cannot_lead_to_return): New functions.
* cgraph.c (cgraph_node_cannot_return,
cgraph_edge_cannot_lead_to_return): Use them.
* ipa-pure-const.c (pure_const_names): New static var.
(check_call): Handle calls not leading to return.
(pure_const_read_summary): Dump info read.
(propagate): Dump info about propagation process; ignore side
effects of functions not leading to exit; fix handling of
pure functions.
From-SVN: r160051
|
|
From-SVN: r160040
|
|
* tree-vrp.c (debug_value_range, debug_all_value_ranges,
debug_asserts_for, debug_all_asserts): Annotate with DEBUG_FUNCTION.
* tree-into-ssa.c (debug_decl_set, debug_defs_stack, debug_currdefs,
debug_tree_ssa, debug_tree_ssa_stats, debug_def_blocks,
debug_names_replaced_by, debug_update_ssa): Likewise.
* sbitmap.c (debug_sbitmap): Likewise.
* genrecog.c (debug_decision, debug_decision_list): Likewise.
* tree-pretty-print.c (debug_generic_expr, debug_generic_stmt,
debug_tree_chain): Likewise.
* tree-loop-distribution.c (debug_rdg_partitions): Likewise.
* cgraph.c (debug_cgraph_node, debug_cgraph): Likewise.
* optabs.c (debug_optab_libfuncs): Likewise.
(verify_loop_closed_ssa): Likewise.
* value-prof.c (verify_histograms): Likewise.
* reload.c (debug_reload_to_stream, debug_reload): Likewise.
* bitmap.c (debug_bitmap_file, debug_bitmap, bitmap_print): Likewise.
* cfghooks.c (verify_flow_info): Likewise.
* fold-const.c (debug_fold_checksum): Likewise.
* omp-low.c (debug_omp_region, debug_all_omp_regions): Likewise.
* cfg.c (debug_regset, debug_flow_info, debug_bb, debug_bb_n):
Likewise.
* omega.c (debug_omega_problem): Likewise.
* cgraphunit.c (verify_cgraph_node, verify_cgraph): Likewise.
* tree-ssa-ccp.c (debug_lattice_value): Likewise.
* dominance.c (verify_dominators, debug_dominance_info,
debug_dominance_tree): Likewise.
* df-core.c (df_insn_uid_debug, df_insn_debug, df_insn_debug_regno,
* df_regno_debug, df_ref_debug,
debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref,
debug_df_defno, debug_df_useno, debug_df_chain): Likewise.
* tree-ssa-dom.c (debug_dominator_optimization_stats): Likewise.
* sel-sched.c (debug_state): Likewise.
* tree-ssa-alias.c (debug_alias_info, debug_points_to_info_for): Likewise.
* cfganal.c (print_edge_list, verify_edge_list): Likewise.
* dwarf2out.c (debug_dwarf_die, debug_dwarf): Likewise.
* tree-eh.c (verify_eh_edges, verify_eh_dispatch_edge): Likewise.
* gimple-pretty-print.c (debug_gimple_stmt, debug_gimple_seq): Likewise.
* c-pretty-print.c (debug_c_tree): Likewise.
* sel-sched-dump.c (debug_insn_rtx, debug_vinsn, debug_expr, debug_insn
debug_av_set, debug_lv_set, debug_ilist, debug_blist, debug_insn_vector,
debug_hard_reg_set, debug_mem_addr_value): Likewise.
* ebitmap.c (debug_ebitmap): Likewise.
* function.c (debug_find_var_in_block_tree): Likewise.
* print-rtl.c (debug_rtx): Likewise.
(debug_rtx_count): Likewise.
(debug_rtx_list, debug_rtx_range, debug_rtx_find): Likewise.
* stor-layout.c (debug_rli): Likewise.
* ipa.c (debug_cgraph_node_set, debug_varpool_node_set): Likewise.
* tree-data-ref.c (debug_data_references, debug_data_dependence_relations,
debug_data_reference, debug_data_dependence_relation, debug_rdg_vertex,
debug_rdg_component, debug_rdg): Likewise.
* tree-affine.c (debug_aff): Likewise.
* tree-dfa.c (debug_referenced_vars, debug_variable, debug_dfa_stats): Likewise.
* except.c (debug_eh_tree, verify_eh_tree): Likewise.
* emit-rtl.c (verify_rtl_sharing): Likewise.
* tree-ssa-pre.c (debug_pre_expr, debug_bitmap_set,
debug_value_expressions): Likewise.
* tree-ssa-live.c (debug_scope_block, debug_scope_blocks): Likewise.
* sese.c (debug_rename_map, debug_ivtype_map): Likewise.
* print-tree.c (debug_tree, debug_vec_tree): Likewise.
* cfglayout.c (verify_insn_chain): Likewise.
* graphite-clast-to-gimple.c (debug_clast_name_indexes,
debug_clast_stmt, debug_generated_program): Likewise.
* ggc-page.c (debug_print_page_list): Likewise.
* tree-ssa-ter.c (debug_ter): Likewise.
* graphite-dependences.c (debug_pddr): Likewise.
* sched-deps.c (debug_ds): Likewise.
* tree-ssa.c (verify_ssa): Likewise.
* graphite-poly.c (debug_scattering_function, debug_iteration_domain,
debug_scattering_functions, debug_iteration_domains, debug_pdr,
debug_pdrs, debug_pbb_domain, debug_pbb, debug_scop_context, debug_scop,
debug_cloog, debug_scop_params, debug_lst): Likewise.
* tree-inline.c (debug_find_tree): Likewise.
* graphite-ppl.c (debug_ppl_linear_expr, debug_ppl_polyhedron_matrix,
debug_ppl_powerset_matrix): Likewise.
* var-tracking.c (debug_dv): Likewise.
* system.h (DEBUG_FUNCTION, DEBUG_VARIABLE): Define.
* cfgloop.c (verify_loop_structure): Likewise.
* plugin.c (dump_active_plugins, debug_active_plugins): Likewise.
* c-common.c (verify_sequence_points): Likewise.
* sched-rgn.c (debug_regions, debug_region, debug_candidate,
debug_candidates, debug_rgn_dependencies): Likewise.
* tree-ssa-structalias.c (debug_constraint, debug_constraints,
* debug_constraint_graph, debug_solution_for_var,
debug_sa_points_to_info): Likewise.
* sched-vis.c (debug_insn_slim, debug_bb_slim, debug_bb_n_slim):
Likewie.
* tree-cfg.c (debug_cfg_stats, verify_stmts, debug_function,
debug_loops, debug_loop, debug_loop_num): Likewise.
* passes.c (debug_pass): Likewise.
(dump_properties): Likewise; add cfglayout property.
(debug_properties): Likewise.
* tree-ssa-reassoc.c (debug_ops_vector): Likewise.
* varpool.c (debug_varpool): Likewise.
* regcprop.c (debug_value_data): Likewise.
* tree-ssa-operands.c (verify_imm_links, debug_immediate_uses,
debug_immediate_uses_for): Likewise.
From-SVN: r160036
|
|
* cgraph.c (clone_function_name): Take SUFFIX argument; export.
(cgraph_create_virtual_clone): Take SUFFIX argument; udpate
use of clone_function_name.
* cgraph.h (cgraph_create_virtual_clone,
cgraph_function_versioning): update prototypes.
(clone_function_name): Declare.
* ipa-cp.c (ipcp_insert_stage): Update call of
cgraph_create_virtual_clone.
* omp-low.c (create_omp_child_function_name): Use
cgraph_create_virtual_clone.
* cgraphunit.c (cgraph_copy_node_for_versioning): Fix edges updating.
(cgraph_function_versioning): Take SUFFIX argument; produce new name
and make decl local.
* gcc.dg/tree-ssa/ipa-cp-1.c: Update testcase.
From-SVN: r160016
|
|
* diagnostic-core.h: New. Contents moved from diagnostic.h and
toplev.h.
* diagnostic.c: Don't include toplev.h.
(progname): Define. Moved from toplev.c.
(seen_error): New function.
* diagnostic.h: Include diagnostic-core.h.
(diagnostic_t, emit_diagnostic): Don't declare here.
* toplev.c (progname): Move to toplev.c.
(emit_debug_global_declarations, compile_file, finalize,
do_compile, toplev_main): Use seen_error.
* toplev.h: Include diagnostic-core.h.
(trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG,
internal_error, warning, warning_at, error, error_n, error_at,
fatal_error, pedwarn, permerror, sorry, inform, inform_n,
verbatim, fnotice, progname): Move to diagnostic-core.h.
* builtins.c: Include diagnostic-core.h instead of diagnostic.h.
(expand_builtin_expect): Use seen_error.
* c-decl.c: Include diagnostic-core.h instead of diagnostic.h.
(c_make_fname_decl, c_write_global_declarations): Use seen_error.
* c-format.c: Include diagnostic-core.h instead of diagnostic.h.
* c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h.
* c-lang.c: Include diagnostic-core.h instead of diagnostic.h.
* c-lex.c (c_lex_with_flags, interpret_float): Don't increment
errorcount for errors.
* c-opts.c (c_common_finish): Use seen_error.
* cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
* cgraphunit.c (verify_cgraph_node, verify_cgraph,
cgraph_output_pending_asms, cgraph_optimize): Use seen_error.
* coverage.c: Include diagnostic-core.h instead of diagnostic.h.
(get_coverage_counts): Use seen_error.
* dwarf2out.c (dwarf2out_finish): Use seen_error.
* gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup,
gimplify_body): Use seen_error.
* ipa-inline.c (cgraph_early_inlining): Use seen_error.
* ipa-pure-const.c (gate_pure_const): Use seen_error.
* ipa-reference.c (gate_reference): Use seen_error.
* jump.c: Include diagnostic-core.h instead of diagnostic.h.
* lambda-code.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
* lto-compress.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-section-in.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-streamer-out.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-streamer.c: Include diagnostic-core.h instead of
diagnostic.h.
(gate_lto_out): Use seen_error.
* matrix-reorg.c: Include diagnostic-core.h instead of
diagnostic.h.
* omega.c: Include diagnostic-core.h instead of diagnostic.h.
* omp-low.c: Include diagnostic-core.h instead of diagnostic.h.
(gate_expand_omp, lower_omp_1): Use seen_error.
* passes.c: Include diagnostic-core.h instead of diagnostic.h.
(rest_of_decl_compilation, rest_of_type_compilation,
gate_rest_of_compilation, ipa_write_summaries): Use seen_error.
* tree-cfg.c (label_to_block_fn): Use seen_error.
* tree-inline.c (optimize_inline_calls): Use seen_error.
* tree-mudflap.c (mudflap_finish_file): Use
seen_error.
* tree-optimize.c (gate_all_optimizations,
gate_all_early_local_passes, gate_all_early_optimizations): Use
seen_error.
* tree-ssa-structalias.c (gate_ipa_pta): Use seen_error.
* varpool.c: Include diagnostic-core.h instead of diagnostic.h.
(varpool_remove_unreferenced_decls,
varpool_assemble_pending_decls): Use seen_error.
* Makefile.in (DIAGNOSTIC_CORE_H): Define.
(TOPLEV_H, DIAGNOSTIC_H): Update.
(c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o,
lto-streamer-out.o, lto-section-in.o, lto-streamer.o,
c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o,
builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o,
coverage.o, lambda-code.o): Update dependencies.
cp:
* call.c: Include diagnostic-core.h instead of diagnostic.h.
* cp-lang.c: Don't include diagnostic.h
* name-lookup.c: Include diagnostic-core.h instead of
diagnostic.h.
(cp_emit_debug_info_for_using): Use seen_error.
* optimize.c: Include diagnostic-core.h instead of diagnostic.h.
* parser.c: Include diagnostic-core.h instead of diagnostic.h.
* pt.c (iterative_hash_template_arg): Use seen_error.
* repo.c: Include diagnostic-core.h instead of diagnostic.h.
* typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
* Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
dependencies.
lto:
* lto.c: Include diagnostic-core.h instead of diagnostic.h.
(read_cgraph_and_symbols, lto_main): Use seen_error.
* Make-lang.in (lto/lto.o): Update dependencies.
objc:
* objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
* Make-lang.in (objc/objc-act.o): Update dependencies.
From-SVN: r159947
|
|
when not in wpa and checking is enabled.
* cgraph.c (cgraph_create_virtual_clone): Only check
versionable_function_p when not in wpa and checking is enabled.
* cgrpahunit.c (cgraph_materialize_all_clones): Stabilize after
there are no more functions to materialize.
* lto/lto.c (lto_1_to_1_map): Partition non-inline clones.
(lto_promote_cross_file_statics): Deal with non-inline clones.
From-SVN: r159518
|
|
polymorphic.
2010-05-17 Martin Jambor <mjambor@suse.cz>
* cgraph.h (cgraph_indirect_call_info): New fields anc_offset,
otr_token and polymorphic.
* cgraph.c (cgraph_create_indirect_edge): Inilialize the above fields.
(cgraph_clone_edge): Copy the above fields.
* tree.c (get_binfo_at_offset): New function.
* tree.h (get_binfo_at_offset): Declare.
* ipa-prop.h (enum jump_func_type): Added known_type jump function
type, reordered items, updated comments.
(union jump_func_value): Added base_type field, reordered fields.
(enum ipa_lattice_type): Moved down in the file.
(struct ipa_param_descriptor): New field polymorphic.
(ipa_is_param_polymorphic): New function.
* ipa-prop.c: Include gimple.h and gimple-fold.h.
(ipa_print_node_jump_functions): Print known type jump functions.
(compute_complex_pass_through): Renamed to...
(compute_complex_assign_jump_func): this.
(compute_complex_ancestor_jump_func): New function.
(compute_known_type_jump_func): Likewise.
(compute_scalar_jump_functions): Create known type and complex ancestor
jump functions.
(ipa_note_param_call): New parameter polymorphic, set the corresponding
flag in the call note accordingly.
(ipa_analyze_call_uses): Renamed to...
(ipa_analyze_indirect_call_uses): this. New parameter target, define
variable var only in the block where it is used.
(ipa_analyze_virtual_call_uses): New function.
(ipa_analyze_call_uses): Likewise.
(combine_known_type_and_ancestor_jfs): Likewise.
(update_jump_functions_after_inlining): Implemented handling of a
number of new jump function types combination.
(print_edge_addition_message): Removed.
(make_edge_direct_to_target): New function.
(try_make_edge_direct_simple_call): Likewise.
(try_make_edge_direct_virtual_call): Likewise.
(update_call_notes_after_inlining): Renamed to...
(update_indirect_edges_after_inlining): this. Moved edge creation for
indirect calls to try_make_edge_direct_simple_call, also calls
try_make_edge_direct_virtual_call for virtual calls.
(ipa_print_node_params): Changed the header message.
(ipa_write_jump_function): Stream also known type jump functions.
(ipa_read_jump_function): Likewise.
(ipa_write_indirect_edge_info): Stream new fields in
cgraph_indirect_call_info.
(ipa_read_indirect_edge_info): Likewise.
* Makefile.in (ipa-prop.o): Add dependency to GIMPLE_H and
GIMPLE_FOLD_H.
* testsuite/g++.dg/ipa/ivinline-1.C: New test.
* testsuite/g++.dg/ipa/ivinline-2.C: New test.
* testsuite/g++.dg/ipa/ivinline-3.C: New test.
* testsuite/g++.dg/ipa/ivinline-4.C: New test.
* testsuite/g++.dg/ipa/ivinline-5.C: New test.
* testsuite/g++.dg/ipa/ivinline-6.C: New test.
From-SVN: r159507
|
|
* cgraph.c (dump_cgraph_node): Dump versionable flag.
* cgraph.h (cgraph_local_info): Add versionable flag.
* ipa-cp.c (ipcp_analyze_node): Set versionable flag.
(ipcp_versionable_function_p): Use it.
* lto-cgraph.c (lto_output_node, input_overwrite_node): Stream
versionable flag.
From-SVN: r159467
|
|
when it is different from orig.
* cgraph.c (cgraph_clone_node): Take decl argument and insert
clone into hash when it is different from orig.
(cgraph_create_virtual_clone): Update use of cgraph_clone_node.
* cgraph.h (cgraph_clone_node): Update prototype.
* lto-cgrpah.c (lto_cgraph_encoder_new): Create body map.
(lto_cgraph_encoder_delete): Delete body map.
(lto_cgraph_encoder_size): Move to header.
(lto_cgraph_encoder_encode_body_p, lto_set_cgraph_encoder_encode_body): New.
(lto_output_node): Do not take written_decls argument; output clone_of
pointer.
(add_node_to): Add include_body_argument; call
lto_set_cgraph_encoder_encode_body on master of the clone.
(add_references): Update use of add_node_to.
(compute_ltrans_boundary): Likewise.
(output_cgraph): Do not create written_decls bitmap.
(input_node): Take nodes argument; stream in clone_of correctly.
(input_cgraph_1): Update use of input_node.
* lto-streamer-out.c (lto_output): Use encoder info to decide
what bodies to output.
* ipa-inline.c (cgraph_clone_inlined_nodes,
cgraph_decide_recursive_inlining): Update call of cgraph_clone_node.
* lto-streamer.h (lto_cgraph_encoder_d): Add body.
(lto_cgraph_encoder_size): Define here.
(lto_cgraph_encoder_encode_body_p, lto_varpool_encoder_encode_body_p):
Declare.
From-SVN: r159466
|
|
* cgraph.c (cgraph_mark_address_taken_node): No longer imply needed flag.
* cgraph.h (cgraph_only_called_directly_p,
cgraph_can_remove_if_no_direct_calls_p): test address_taken flag.
(cgraph_can_remove_if_no_direct_calls_and_refs_p): New function.
* cgraphunit.c (cgraph_mark_functions_to_output): Test address_taken.
(assemble
* ipa.c (cgraph_remove_unreachable_nodes): Use
cgraph_can_remove_if_no_direct_calls_and_refs_p; clear address_taken flags.
* tree-inline.c (copy_bb): Check address_taken flag.
* tree-profile.c (tree_gen_ic_func_profiler): Check address_taken and
externally_visible flag.
* tree-ssa/unreachable.c: New test.
From-SVN: r159354
|
|
* cgraphbuild.c (build_cgraph_edges, rebuild_cgraph_edges): Build
indrect edges too.
* cgraph.c (cgraph_create_indirect_edge): Take ecf_flags argument.
(cgraph_clone_edge): Update.
(cgraph_node_remove_callees): Remove indirect calls too.
* cgraph.h (cgraph_indirect_call_info): Add ecf_flags.
(cgraph_create_indirect_edge): Update prototype.
* ipa-reference.c (has_proper_scope_for_analysis): Rename to
is_proper_for_analysis.
(add_new_function, visited_nodes, function_insertion_hook_holder,
get_local_reference_vars_info, mark_address_taken, mark_address,
mark_load, mark_store, check_asm_memory_clobber, check_call,
scan_stmt_for_static_refs, scan_initializer_for_static_refs): Remove.
(ipa_init): Do not initialize visited_nodes;
function_insertion_hook_holder.
(analyze_variable): Rewrite.
(analyze_function): Rewrite.
(copy_local_bitmap): Remove.
(duplicate_node_dat): Do not duplicate local info.
(generate_summary): Simplify to only walk cgraph.
(write_node_summary_p, ipa_reference_write_summary,
ipa_reference_read_summary): Remove.
(propagate): Do not remove function insertion;
generate summary.
(pass_ipa_reference): NULLify summary handling fields.
* lto-cgraph.c (lto_output_edge): Output ecf_flags.
(input_edge): Input ecf_flags.
* ipa-prop.c (ipa_note_parm_call): Expect edge to be around.
(update_indirect_edges_after_inlining): Ignore edges with unknown
param.
From-SVN: r159343
|
|
* cgraph.h (struct varpool_node): Add aux.
* varasm.c (find_decl_and_mark_needed): Force output of varpool nodes.
* varpool.c (varpool_remove_node): Do not remove initializer.
(varpool_reset_queue): Export.
(varpool_finalize_decl): Volatile vars are forced to be output.
* lto-symtab.c (lto_varpool_replace_node): Clear out initializer of
replaced decl.
* ipa.c (enqueue_cgraph_node, enqueue_varpool_node,
process_references, varpool_can_remove_if_no_refs): New functions.
(cgraph_remove_unreachable_nodes): Handle variables too.
From-SVN: r159321
|
|
extern inlines.
* cgraph.c (cgraph_mark_reachable_node): Accept references to optimized
out extern inlines.
From-SVN: r159260
|
|
* cgraph.c: Include ipa-utils.h
(cgraph_create_virtual_clone): Update references.
* Makefile.in (cgraph.o): Add dependency at ipa-utils.h
From-SVN: r159258
|
|
* cgraphbuild.c (record_reference_ctx): Add varpool_node.
(record_reference, mark_address, mark_load, mark_store): Record
references.
(record_references_in_initializer): Update call of record_references.
(rebuild_cgraph_edges): Remove all references before rebuiding.
* cgraph.c (cgraph_create_node): Clear ref list.
(cgraph_remove_node): Remove references.
(dump_cgraph_node): Dump references.
(cgraph_clone_node): Clone references.
* cgraph.h: Include ipa-ref.h and ipa-ref-inline.h
(struct cgraph_node, varpool_node): Add ref_lst.
* ipa-ref.c: New file.
* ipa-ref.h: New file.
* ipa-ref-inline.h: New file.
* lto-cgraph.c (output_varpool): Take cgrag node set argument.
(referenced_from_other_partition_p): New function.
(lto_output_varpool_node): Take set arugment; call
referenced_from_other_partition.
(lto_output_ref): New.
(add_references): New.
(output_refs): New.
(output_cgraph): Compute boundary based on references;
output refs.
(output_varpool): Accept cgraph_node_set argument.
(input_ref): New.
(input_refs): New.
(input_cgraph): Call input_refs.
* lto-section-in.c (lto_section_name): Add refs.
* Makefile.in: (cgraph.h): Include ipa-ref.h and ipa-ref-inline.h
(ipa-ref.o): New file.
* varpool.c (varpool_node): Clear ipa ref list.
(varpool_remove_node): Remove references.
(dump_varpool_node): Dump references.
(varpool_assemble_decl): Only compile finalized ones.
(varpool_extra_name_alias): Initialize ref list.
* lto-streamer.c (lto-get_section_name): Add .refs section.
* lto-streamer.h (lto_section_type): Add LTO_section_refs.
(referenced_from_other_partition_p): Declared.
From-SVN: r159097
|
|
(lto_varpool_replace_node): New.
(lto_symtab_resolve_symbols): Resolve varpool nodes.
(lto_symtab_merge_decls_1): Prefer decls with varpool node.
(lto_symtab_merge_cgraph_nodes_1): Merge varpools.
* cgraph.h (varpool_node_ptr): New type.
(varpool_node_ptr): New vector.
(varpool_node_set_def): New structure.
(varpool_node_set): New type.
(varpool_node_set): New vector.
(varpool_node_set_element_def): New structure.
(varpool_node_set_element, const_varpool_node_set_element): New types.
(varpool_node_set_iterator): New type.
(varpool_node): Add prev pointers, add used_from_other_partition,
in_other_partition.
(varpool_node_set_new, varpool_node_set_find, varpool_node_set_add,
varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set,
varpool_get_node, varpool_remove_node): Declare.
(vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p,
varpool_node_set_size): New inlines.
* cgraph.c (dump_cgraph_node): Dump asm names of aliases.
* tree-pass.h (varpool_node_set_def): Forward declare.
(ipa_opt_pass_d): Summary writting takes vnode sets too.
(ipa_write_optimization_summaries): Update prototype.
* ipa-cp.c (ipcp_write_summary): Update.
* ipa-reference.c (ipa_reference_write_summary): Update.
* lto-cgraph.c (lto_output_varpool_node): New static function.
(output_varpool): New function.
(input_varpool_node): New static function.
(input_varpool_1): New function.
(input_cgraph): Input varpool.
* ipa-pure-const.c (pure_const_write_summary): Update.
* lto-streamer-out.c (lto_output): Update, output varpool too.
(write_global_stream): Kill WPA hack.
(produce_asm_for_decls): Update.
(output_alias_pair_p): Handle variables.
(output_unreferenced_globals): Output only needed partition of varpool.
* ipa-inline.c (inline_write_summary): Update.
* lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build cgraph.
* lto-section-in.c (lto_section_name): Add varpool and jump funcs.
* ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element,
varpool_node_set_new, varpool_node_set_add,
varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set,
debug_varpool_node_set): New functions.
* passes.c (rest_of_decl_compilation): when in LTO do not finalize.
(execute_one_pass): Process new decls too.
(ipa_write_summaries_2): Pass around vsets.
(ipa_write_summaries_1): Likewise.
(ipa_write_summaries): Build vset; be more selective about cgraph nodes
to add.
(ipa_write_optimization_summaries_1): Pass around vsets.
(ipa_write_optimization_summaries): Likewise.
* varpool.c (varpool_get_node): New.
(varpool_node): Update doubly linked lists.
(varpool_remove_node): New.
(dump_varpool_node): More dumping.
(varpool_enqueue_needed_node): Update doubly linked lists.
(decide_is_variable_needed): Kill ltrans hack.
(varpool_finalize_decl): Kill lto hack.
(varpool_assemble_decl): Skip decls in other partitions.
(varpool_assemble_pending_decls): Update doubly linkes lists.
(varpool_empty_needed_queue): Likewise.
(varpool_extra_name_alias): Likewise.
* lto-streamer.c (lto_get_section_name): Add vars section.
* lto-streamer.h (lto_section_type): Update.
(output_varpool, input_varpool): Declare.
* lto.c (lto_varpool_node_sets): New.
(lto_1_to_1_map): Partition varpool too.
(globalize_context_t, globalize_cross_file_statics,
lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
lto_scan_statics_in_remaining_global_vars): Remove.
(lto_promote_cross_file_statics): Rewrite.
(get_filename_for_set): Take vset argument.
(lto_wpa_write_files): Pass around vsets.
From-SVN: r158854
|
|
2010-04-28 Martin Jambor <mjambor@suse.cz>
* cgraph.h (struct cgraph_node): New field indirect_calls.
(struct cgraph_indirect_call_info): New type.
(struct cgraph_edge): Removed field indirect_call. New fields
indirect_info, indirect_inlining_edge and indirect_unknown_callee.
(cgraph_create_indirect_edge): Declare.
(cgraph_make_edge_direct): Likewise.
(enum LTO_cgraph_tags): New item LTO_cgraph_indirect_edge.
* ipa-prop.h (struct ipa_param_call_note): Removed.
(struct ipa_node_params): Removed field param_calls.
(ipa_create_all_structures_for_iinln): Declare.
* cgraph.c: Described indirect edges and uids in initial comment.
(cgraph_add_edge_to_call_site_hash): New function.
(cgraph_edge): Search also among the indirect edges, use
cgraph_add_edge_to_call_site_hash to add edges to the call site hash.
(cgraph_set_call_stmt): Possibly turn an indirect edge into a direct
one, use cgraph_add_edge_to_call_site_hash to add edges to the call
site hash.
(initialize_inline_failed): Assign a reason to indirect edges.
(cgraph_create_edge_1): New function.
(cgraph_create_edge): Moved some functionality to
cgraph_create_edge_1.
(cgraph_create_indirect_edge): New function.
(cgraph_edge_remove_callee): Add an assert checking for
non-indirectness.
(cgraph_edge_remove_caller): Special-case indirect edges.
(cgraph_remove_edge): Likewise.
(cgraph_set_edge_callee): New function.
(cgraph_redirect_edge_callee): Use cgraph_set_edge_callee.
(cgraph_make_edge_direct): New function.
(cgraph_update_edges_for_call_stmt_node): Do nothing only when also
the declaration of the call statement matches.
(cgraph_node_remove_callees): Special-case indirect edges.
(cgraph_clone_edge): Likewise.
(cgraph_clone_node): Clone also the indirect edges.
(dump_cgraph_node): Dump indirect_inlining_edge flag instead of
indirect_call, dump count of indirect_calls edges.
* ipa-prop.c (iinlining_processed_edges): New variable.
(ipa_note_param_call): Create indirect edges instead of
creating notes. New parameter node.
(ipa_analyze_call_uses): New parameter node, pass it on to
ipa_note_param_call.
(ipa_analyze_stmt_uses): Likewise.
(ipa_analyze_params_uses): Pass node to ipa_analyze_stmt_uses.
(print_edge_addition_message): Work on edges rather than on notes.
(update_call_notes_after_inlining): Likewise, renamed to
update_indirect_edges_after_inlining.
(ipa_create_all_structures_for_iinln): New function.
(ipa_free_node_params_substructures): Do not free notes.
(ipa_edge_duplication_hook): Propagate bits within
iinlining_processed_edges bitmap.
(ipa_node_duplication_hook): Do not duplicate notes.
(free_all_ipa_structures_after_ipa_cp): Renamed to
ipa_free_all_structures_after_ipa_cp.
(free_all_ipa_structures_after_iinln): Renamed to
ipa_free_all_structures_after_iinln.g
(ipa_write_param_call_note): Removed.
(ipa_read_param_call_note): Removed.
(ipa_write_indirect_edge_info): New function.
(ipa_read_indirect_edge_info): Likewise.
(ipa_write_node_info): Do not stream notes, do stream information
in indirect edges.
(ipa_read_node_info): Likewise.
(lto_ipa_fixup_call_notes): Removed.
* ipa-cp.c (pass_ipa_cp): Set stmt_fixup to NULL.
* ipa-inline.c (pass_ipa_inline): Likewise.
* cgraphunit.c (verify_cgraph_node): Check also indirect edges.
* cif-code.def (INDIRECT_UNKNOWN_CALL): New reason.
* tree-inline.c (copy_bb): Removed an unnecessary double check for
is_gimple_call.
* tree-inline.c (get_indirect_callee_fndecl): Do not consider indirect
edges.
* lto-cgraph.c (output_outgoing_cgraph_edges): New function.
(output_cgraph): Stream also indirect edges.
(lto_output_edge): Added capability to stream indirect edges.
(input_edge): Likewise.
(input_cgraph_1): Likewise.
* testsuite/gcc.dg/lto/20091209-1_0.c: New testcase.
From-SVN: r158827
|
|
* doc/invoke.texi (-fipa-profile): Document.
* opts.c (decode_options): Enable ipa-profile at -O1.
* timevar.def (TV_IPA_PROFILE): Define.
* common.opt (fipa-profile): Add.
* cgraph.c (cgraph_clone_node): Set local flag and clear vtable method flag
for clones.
(cgraph_propagate_frequency): Handle only local ones.
* tree-pass.h (pass_ipa_profile): Declare.
* ipa-profile.c (gate_profile): Use flag_ipa_profile.
(pass_ipa_profile): Use TV_IPA_PROFILE.
* ipa.c (ipa_profile): New function.
(gate_ipa_profile): Likewise.
(pass_ipa_profile): New global variable.
* passes.c (pass_ipa_profile): New.
From-SVN: r158788
|
|
* cgraph.c (cgraph_propagate_frequency): New function.
* cgraph.h (cgraph_propagate_frequency): Declare.
* ipa-inline.c (cgraph_clone_inlined_nodes): Call
cgraph_propagate_frequency.
* testsuite/gcc.dg/ipa/iinline-1.c (main): Rename to...
(test): ... this one.
From-SVN: r158775
|
|
* cgraph.c (cgraph_create_node): Set node frequency to normal.
(cgraph_clone_node): Copy function frequency.
* cgraph.h (node_frequency): New enum
(struct cgraph_node): Add.
* final.c (rest_of_clean_state): Update.
* lto-cgraph.c (lto_output_node): Output node frequency.
(input_overwrite_node): Input node frequency.
* tre-ssa-loop-ivopts (computation_cost): Update.
* lto-streamer-out.c (output_function): Do not output function frequency.
* predict.c (maybe_hot_frequency_p): Update and handle functions executed once.
(cgraph_maybe_hot_edge_p): Likewise; use cgraph frequency instead of
attribute lookup.
(probably_never_executed_bb_p, optimize_function_for_size_p): Update.
(compute_function_frequency): Set noreturn functions to be executed once.
(choose_function_section): Update.
* lto-streamer-in.c (input_function): Do not input function frequency.
* function.c (allocate_struct_function): Do not initialize function frequency.
* function.h (function_frequency): Remove.
(struct function): Remove function frequency.
* ipa-profile.c (CGRAPH_NODE_FREQUENCY): Remove.
(try_update): Update.
* tree-inline.c (initialize_cfun): Do not update function frequency.
* passes.c (pass_init_dump_file): Update.
* i386.c (ix86_compute_frame_layout): Update.
(ix86_pad_returns): Update.
From-SVN: r158732
|
|
* cgraph.c (dump_cgraph_node): Dump also assembler name.
* ipa-inline.c (cgraph_decide_inlining_of_small_functions): Do not ice
at WPA dumping.
(cgraph_decide_inlining): Do not expect callee to be removed in all
cases.
From-SVN: r158607
|
|
* cgraph.c (cgraph_remove_node): Kill bodies in other partitoin.
(dump_cgraph_node): Dump new flags.
* cgraph.h (struct cgraph_node): Add flags reachable_from_other_partition
and in_other_partition.
(cgraph_can_remove_if_no_direct_calls_p): Functions used by other partition
can not be removed.
* cgraphunit.c (cgraph_mark_functions_to_output): Functions used by the other
partition must be output; silence sanity checking on leaking functions
bodies from other paritition.
* lto-cgraph.c (reachable_from_other_partition_p): New function.
(lto_output_node): Output new flags; do not sanity check that inline
clones are output; drop lto_forced_extern_inline_p code; do not mock
visibility flags at partition boundaries.
(add_node_to): New function.
(output_cgraph): Use it to sort functions so masters appear before
clones.
(input_overwrite_node): Input new flags.
* passes.c (ipa_write_summaries): Do not call
lto_new_extern_inline_states.
* lto-section-out.c (forced_extern_inline, lto_new_extern_inline_states,
lto_delete_extern_inline_states, lto_force_functions_extern_inline,
lto_forced_extern_inline_p): Kill.
* lto-streamer.h (lto_new_extern_inline_states,
* lto_delete_extern_inline_states, lto_force_functions_extern_inline,
lto_forced_extern_inline_p): Kill.
* lto.c (lto_add_inline_clones): Do not track inlined_decls.
(lto_add_all_inlinees): Likewise.
(lto_wpa_write_files): Likewise.
From-SVN: r158563
|
|
* cgraph.c (cgraph_add_function_insertion_hook): Update comment.
(cgraph_remove_function_insertion_hook): Same.
(cgraph_call_function_insertion_hooks): Same.
From-SVN: r157920
|
|
symbol with -O3)
PR tree-optimization/43505
* cgraph.c (cgraph_clone_node): When clonning a clone, replacement
map should not be copied.
* gfortran.dg/pr43505.f90: New testcase.
From-SVN: r157786
|
|
PR middle-end/42344
* cgraph.h (cgraph_make_decl_local): Declare.
* cgraph.c (cgraph_make_decl_local): New function.
(cgraph_make_node_local): Use it.
* cgraphunit.c (cgraph_function_versioning): Likewise.
* ipa.c (function_and_variable_visibility): Likewise.
From-SVN: r156914
|
|
in different object files, binary breaks after linking)
PR tree-optimization/42625
* cgraph.c (cgraph_make_node_local): Clear DECL_COMDAT*,
TREE_PUBLIC, DECL_WEAK and DECL_EXTERNAL also for same_body
aliases.
* g++.dg/opt/dtor4.C: New test.
* g++.dg/opt/dtor4.h: New.
* g++.dg/opt/dtor4-aux.cc: New.
From-SVN: r155694
|