Age | Commit message (Collapse) | Author | Files | Lines |
|
aliases.
* lto-symtab.c (lto_varpool_replace_node): Remove code handling
extra name aliases.
(lto_symtab_resolve_can_prevail_p): Likewise.
(lto_symtab_merge_cgraph_nodes): Update alias_of pointers.
* cgraphbuild.c (record_reference): Remove extra body alias code.
(mark_load): Likewise.
(mark_store): Likewise.
* cgraph.h (varpool_node): Remove extra_name filed;
add alias_of and extraname_alias.
(varpool_create_variable_alias, varpool_for_node_and_aliases): Declare.
(varpool_alias_aliased_node): New inline function.
(varpool_variable_node): New function.
* cgraphunit.c (handle_alias_pairs): Handle also variable aliases.
* ipa-ref.c (ipa_record_reference): Allow aliases on variables.
* lto-cgraph.c (lto_output_varpool_node): Update streaming.
(input_varpool_node): Likewise.
* lto-streamer-out.c (produce_symtab): Remove extra name aliases.
(varpool_externally_visible_p): Remove extra body alias code.
(function_and_variable_visibility): Likewise.
* tree-ssa-structalias.c (associate_varinfo_to_alias_1): New function.
(ipa_pta_execute): Use it.
* varpool.c (varpool_remove_node): Remove extra name alias code.
(varpool_mark_needed_node): Likewise.
(varpool_analyze_pending_decls): Analyze aliases.
(assemble_aliases): New functoin.
(varpool_assemble_decl): Use it.
(varpool_create_variable_alias): New function.
(varpool_extra_name_alias): Rewrite.
(varpool_for_node_and_aliases): New function.
From-SVN: r175167
|
|
address taken.
* cgraphbuild.c (record_eh_tables): Mark personality function as having
address taken.
From-SVN: r174869
|
|
cgraph_create_indirect_edge.
* cgraphbuild.c (build_cgraph_edges): Update call
of cgraph_create_edge and cgraph_create_indirect_edge.
* cgraph.c (cgraph_create_edge_including_clones,
cgraph_create_edge_1, cgraph_allocate_init_indirect_info,
cgraph_update_edges_for_call_stmt_node): Do not take nest
argument; do not initialize call_stmt_size/time.
(dump_cgraph_node): Do not dump nest.
(cgraph_clone_edge): Do not take loop_nest argument;
do not propagate it; do not clone call_stmt_size/time.
(cgraph_clone_node): Likewise.
(cgraph_create_virtual_clone): Update.
* cgraph.h (struct cgraph_edge): Remove
call_stmt_size/call_stmt_time/loop_nest.
(cgraph_create_edge, cgraph_create_indirect_edge,
cgraph_create_edge_including_clones, cgraph_clone_node): Update
prototype.
* tree-emutls.c (gen_emutls_addr): Update.
* ipa-inline-transform.c (update_noncloned_frequencies): Do not handle
loop_nest; handle indirect calls, too.
(clone_inlined_nodes): Do not care about updating inline summaries.
* cgraphunit.c (cgraph_copy_node_for_versioning): Update.
* lto-cgraph.c (lto_output_edge, input_node, input_edge): Do not
stream call_stmt_size/call_stmt_time/loop_nest.
* ipa-inline.c (edge_badness): Update.
(ipa_inline): dump summaries after inlining.
* ipa-inline.h (struct inline_edge_summary, inline_edge_summary_t):
new.
(inline_edge_summary): New function.
* ipa-inline-analysis.c (edge_duplication_hook_holder): New holder.
(inline_edge_removal_hook): Handle edge summaries.
(inline_edge_duplication_hook): New hook.
(inline_summary_alloc): Alloc hooks.
(initialize_growth_caches): Do not register removal hooks.
(free_growth_caches); Do not free removal hook.
(dump_inline_edge_summary): New function.
(dump_inline_summary): Use it.
(estimate_function_body_sizes, estimate_edge_size_and_time): Update.
(inline_update_callee_summaries): New function.
(inline_merge_summary): Use it.
(do_estimate_edge_time, do_estimate_edge_growth): Update.
(read_inline_edge_summary): New function.
(inline_read_section): Use it.
(write_inline_edge_summary): New function.
(inline_write_summary): Use it.
(inline_free_summary): Free edge new holders.
* tree-inline.c (copy_bb): Update.
From-SVN: r172989
|
|
* cgraphbuild.c: Include ipa-inline.h.
(reset_inline_failed): Use initialize_inline_failed.
* cgraph.c: Include ipa-inline.h.
(cgraph_create_node_1): Do not initialize estimated_growth.
(initialize_inline_failed): More to ipa-inline-analysis.c
(dump_cgraph_node): Do not dump inline flags.
* cgraph.h (cgraph_local_info): Remove inlineable, versionable
and disregard_inline_limits flags.
(cgrpah_global_info): Remove estimated_stack_size, stack_frame_offset,
time, size, estimated_growth.
* ipa-cp.c (ipcp_versionable_function_p, ipcp_generate_summary): Update.
* cgraphunit.c (cgraph_decide_is_function_needed): Use
DECL_DISREGARD_INLINE_LIMITS.
(cgraph_analyze_function): Do not initialize
node->local.disregard_inline_limits.
* lto-cgraph.c (lto_output_node, input_overwrite_node): Do not stream
inlinable, versionable and disregard_inline_limits.
* ipa-inline.c (cgraph_clone_inlined_nodes, cgraph_mark_inline_edge,
cgraph_check_inline_limits, cgraph_default_inline_p, cgraph_edge_badness,
update_caller_keys, update_callee_keys, add_new_edges_to_heap): Update.
(cgraph_decide_inlining_of_small_function): Update; set CIF_FUNCTION_NOT_INLINABLE
for uninlinable functions.
(cgraph_decide_inlining, cgraph_edge_early_inlinable_p,
cgraph_decide_inlining_incrementally): Update.
* ipa-inline.h (inline_summary): Add inlinable, versionable, disregard_inline_limits,
estimated_stack_size, stack_frame_offset, time, size and estimated_growth
parameters.
(estimate_edge_growth): Update.
(initialize_inline_failed): Declare.
* ipa-split.c: Include ipa-inline.h
(execute_split_functions): Update.
* ipa.c (cgraph_postorder): Use DECL_DISREGARD_INLINE_LIMITS.
(cgraph_remove_unreachable_nodes): Do not clear inlinable flag.
(record_cdtor_fn): Use DECL_DISREGARD_INLINE_LIMITS.
* ipa-inline-analysis.c (inline_node_removal_hook): Update; set
estimated_growth to INT_MIN.
(inline_node_duplication_hook): Likewise.
(dump_inline_summary): Dump new fields.
(compute_inline_parameters): Update.
(estimate_edge_time, estimate_time_after_inlining,
estimate_size_after_inlining, estimate_growth, inline_read_summary,
inline_write_summary):
(initialize_inline_failed): Move here from cgraph.c.
* tree-sra.c: Include ipa-inline.h.
(ipa_sra_preliminary_function_checks): Update.
* lto/lto.c (lto_balanced_map): Update.
Update.
* Makefile.in: (cgraph.o, cgraphbuild.o): Add dependency on
ipa-inline.h
From-SVN: r172581
|
|
2011-04-12 Martin Jambor <mjambor@suse.cz>
* cgraph.h (cgraph_node): Remove function declaration.
(cgraph_create_node): Declare.
(cgraph_get_create_node): Likewise.
* cgraph.c (cgraph_create_node): Renamed to cgraph_create_node_1.
Updated all callers.
(cgraph_node): Renamed to cgraph_create_node, assert that a node for
the decl does not already exist. Call cgraph_get_create_node instead
of cgraph_node.
(cgraph_get_create_node): New function.
(cgraph_same_body_alias): Update comment.
(cgraph_set_call_stmt): Call cgraph_get_node instead of cgraph_node,
assert it does not return NULL.
(cgraph_update_edges_for_call_stmt): Likewise.
(cgraph_clone_edge): Likewise.
(cgraph_create_virtual_clone): Likewise.
(cgraph_update_edges_for_call_stmt_node): Call cgraph_get_create_node
instead of cgraph_node.
(cgraph_add_new_function): Call cgraph_create_node or
cgraph_get_create_node instead of cgraph_node.
* cgraphbuild.c (record_reference): Call cgraph_get_create_node
instead of cgraph_node.
(record_eh_tables): Likewise.
(mark_address): Likewise.
(mark_load): Likewise.
(build_cgraph_edges): Call cgraph_get_create_node instead
of cgraph_node.
(rebuild_cgraph_edges): Likewise.
* cgraphunit.c (cgraph_finalize_function): Call cgraph_get_create_node
instead of cgraph_node.
(cgraph_copy_node_for_versioning): Call cgraph_create_node instead of
cgraph_node.
* lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Call
cgraph_create_node instead of cgraph_node.
* c-decl.c (finish_function): Call cgraph_get_create_node instead
of cgraph_node.
* lto-cgraph.c (input_node): Likewise.
* lto-streamer-in.c (input_function): Likewise.
* varasm.c (mark_decl_referenced): Likewise.
(assemble_alias): Likewise.
gcc/c-family/
* c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
of cgraph_node.
gcc/cp/
* cp/class.c (cp_fold_obj_type_ref): Call cgraph_get_create_node
instead of cgraph_node.
* cp/decl2.c (cxx_callgraph_analyze_expr): Likewise.
(cp_write_global_declarations): Likewise.
* cp/optimize.c (maybe_clone_body): Likewise.
* cp/semantics.c (maybe_add_lambda_conv_op): Likewise.
* cp/mangle.c (mangle_decl): Likewise.
* cp/method.c (make_alias_for_thunk): Likewise.
(use_thunk): Likewise.
gcc/ada/
* gcc-interface/utils.c (end_subprog_body): Call
cgraph_get_create_node instead of cgraph_node.
gcc/fortran/
* trans-decl.c (gfc_generate_function_code): Call
cgraph_get_create_node instead of cgraph_node.
gcc/objc/
* objc-act.c (mark_referenced_methods): Call cgraph_get_create_node
instead of cgraph_node.
From-SVN: r172307
|
|
cgraph_node.
2011-04-11 Martin Jambor <mjambor@suse.cz>
* except.c (set_nothrow_function_flags): Call cgraph_get_node instead
of cgraph_node.
* final.c (rest_of_clean_state): Likewise.
* gimple-iterator.c (update_call_edge_frequencies): Likewise.
* passes.c (pass_init_dump_file): Likewise.
(execute_all_ipa_transforms): Likewise.
(function_called_by_processed_nodes_p): Likewise.
* predict.c (maybe_hot_frequency_p): Likewise.
(probably_never_executed_bb_p): Likewise.
(compute_function_frequency): Likewise.
* tree-nested.c (check_for_nested_with_variably_modified): Likewise.
(unnest_nesting_tree_1): Likewise.
(lower_nested_functions): Likewise.
* tree-optimize.c (execute_fixup_cfg): Likewise.
(tree_rest_of_compilation): Likewise.
* tree-profile.c (gimple_gen_ic_func_profiler): Likewise.
* tree-sra.c (ipa_early_sra): Likewise.
* tree-ssa-loop-ivopts.c (computation_cost): Likewise.
* config/i386/i386.c (ix86_compute_frame_layout): Likewise.
* ipa.c (record_cdtor_fn): Likewise.
* ipa-inline.c (cgraph_early_inlining): Likewise.
(compute_inline_parameters_for_current): Likewise.
* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
* ipa-pure-const.c (local_pure_const): Likewise.
* ipa-split.c (split_function): Likewise.
(execute_split_functions): Likewise.
* cgraphbuild.c (build_cgraph_edges): Likewise.
(rebuild_cgraph_edges): Likewise.
(cgraph_rebuild_references): Likewise.
(remove_cgraph_callee_edges): Likewise.
* cgraphunit.c (cgraph_mark_if_needed): Likewise.
(verify_cgraph_node): Likewise.
(cgraph_analyze_functions): Likewise.
(cgraph_preserve_function_body_p): Likewise.
(save_inline_function_body): Likewise.
(save_inline_function_body): Likewise.
* tree-inline.c (copy_bb): Likewise.
(optimize_inline_calls): Likewise.
From-SVN: r172257
|
|
* cgraphbuild.c (record_reference): Canonicalize constructor
values.
* gimple-fold.c (canonicalize_constructor_val): Accept being called
without function context.
* cgraphunit.c (cgraph_finalize_compilation_unit): Clear
current_function_decl and cfun.
From-SVN: r171903
|
|
2011-01-26 Richard Guenther <rguenther@suse.de>
PR lto/47423
* cgraphbuild.c (record_eh_tables): Record reference to personality
function.
From-SVN: r169284
|
|
undefined reference on ia64-linux)
PR tree-optimization/47056
* cgraphbuild.c (mark_address): Remove ATTRIBUTE_UNUSED markers.
(mark_load): Likewise. Handle FUNCTION_DECL specially.
(mark_store): Likewise. Pass STMT to ipa_record_reference.
From-SVN: r168493
|
|
From-SVN: r168438
|
|
volatileness.
2010-11-22 Richard Guenther <rguenther@suse.de>
* gimple-fold.c (maybe_fold_reference): When canonicalizing
MEM_REFs, preserve volatileness.
* cgraphbuild.c (mark_address): Properly check for FUNCTION_DECL
addresses.
From-SVN: r167030
|
|
* timevar.def (TV_IPA_OPT, TV_EARLY_LOCAL, TV_OPTIMIZE,
TV_POSTRELOAD, TV_REMOVE_UNUSED, TV_ADDRESS_TAKEN, TV_TODO,
TV_VERIFY_LOOP_CLOSED, TV_VERIFY_RTL_SHARING,
TV_REBUILD_FREQUENCIES, TV_REPAIR_LOOPS): New.
* tree-into-ssa.c (rewrite_into_ssa): Don't push/pop timevar here ...
(pass_build_ssa): ... but here.
* cgraphbuild.c (pass_rebuild_cgraph): Use timevar.
* tree-ssa-loop-manip.c (verify_loop_closed_ssa): Use timevar.
* tree-emutls.c (pass_ipa_lower_emutls): Ditto.
* df-core.c (pass_df_initialize_opt,
pass_df_initialize_no_opt): Ditto.
* predict.c (rebuild_frequencies): Ditto.
* tree-vectorizer.c (pass_ipa_increase_alignment): Ditto.
* emit-rtl.c (verify_rtl_sharing): Ditto.
* tree-cfgcleanup.c (repair_loop_structures): Ditto.
* tree-ssa-live.c (remove_unused_locals): Ditto.
* cfglayout.c (pass_into_cfg_layout, pass_outof_cfg_layout): Ditto.
* tree-ssa.c (pass_early_warn_uninitialized,
execute_update_addresses_taken, pass_update_address_taken): Ditto.
* tree-optimize.c (pass_all_optimizations, pass_early_local_passes,
pass_cleanup_cfg_post_optimizing, tree_rest_of_compilation): Ditto.
* passes.c (pass_postreload, execute_todo): Ditto.
* tree-ssanames.c (pass_release_ssa_names): Ditto.
From-SVN: r166869
|
|
From-SVN: r165989
|
|
gcc/
* vec.h (FOR_EACH_VEC_ELT_REVERSE): New macro.
* function.h (struct_function): Change type of local_decls field
to a VEC.
(add_local_decl): New function.
(FOR_EACH_LOCAL_DECL): New macro.
* cfgexpand.c (init_vars_expansion): Adjust for new type of
cfun->local_decls.
(estimated_stack_frame_size): Likewise.
(expand_used_vars): Likewise.
* cgraphbuild.c (build_cgraph_edges): Likewise.
* function.c (instantiate_decls_1): Likewise.
* ipa-struct-reorg.c (build_data_structure): Likewise.
* ipa-type-escape.c (analyze_function): Likewise.
* lto-streamer-in.c (input_function): Likewise.
* lto-streamer-out.c (output_function): Likewise.
* tree-ssa-live.c (remove_unused_locals): Likewise.
* tree.c (free_lang_data_in_decl): Likewise.
(find_decls_types_in_node): Likewise.
* omp-low.c (remove_exit_barrier): Likewise.
(expand_omp_taskreg): Likewise.
(list2chain): Rename to...
(vec2chain): ...this. Adjust.
* cgraphunit.c (assemble_thunk): Call add_local_decl.
* tree-cfg.c (replace_by_duplicate_decl): Likewise.
* gimple-low.c (record_vars_into): Likewise.
* tree-inline.c (remap_decls): Likewise.
(declare_return_variable): Likewise.
(declare_inline_vars): Likewise.
(copy_forbidden): Adjust for new type of cfun->local_decls.
(add_local_variables): New function.
(expand_call_inline): Call it.
(tree_function_versioning): Likewise.
gcc/cp/
* decl.c (cp_finish_decl): Call add_local_decl.
* optimize.c (clone_body): Adjust for new type of cfun->local_decls.
From-SVN: r161862
|
|
2010-07-01 Richard Guenther <rguenther@suse.de>
PR middle-end/42834
PR middle-end/44468
* doc/gimple.texi (is_gimple_mem_ref_addr): Document.
* doc/generic.texi (References to storage): Document MEM_REF.
* tree-pretty-print.c (dump_generic_node): Handle MEM_REF.
(print_call_name): Likewise.
* tree.c (recompute_tree_invariant_for_addr_expr): Handle MEM_REF.
(build_simple_mem_ref_loc): New function.
(mem_ref_offset): Likewise.
* tree.h (build_simple_mem_ref_loc): Declare.
(build_simple_mem_ref): Define.
(mem_ref_offset): Declare.
* fold-const.c: Include tree-flow.h.
(operand_equal_p): Handle MEM_REF.
(build_fold_addr_expr_with_type_loc): Likewise.
(fold_comparison): Likewise.
(fold_unary_loc): Fold
VIEW_CONVERT_EXPR <T1, MEM_REF <T2, ...>> to MEM_REF <T1, ...>.
(fold_binary_loc): Fold MEM[&MEM[p, CST1], CST2] to MEM[p, CST1 + CST2],
fold MEM[&a.b, CST2] to MEM[&a, offsetof (a, b) + CST2].
* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle MEM_REF.
(ptr_deref_may_alias_ref_p_1): Likewise.
(ao_ref_base_alias_set): Properly differentiate base object for
offset and TBAA.
(ao_ref_init_from_ptr_and_size): Use MEM_REF.
(indirect_ref_may_alias_decl_p): Handle MEM_REFs properly.
(indirect_refs_may_alias_p): Likewise.
(refs_may_alias_p_1): Likewise. Remove pointer SSA name def
chasing code.
(ref_maybe_used_by_call_p_1): Handle MEM_REF.
(call_may_clobber_ref_p_1): Likewise.
* dwarf2out.c (loc_list_from_tree): Handle MEM_REF.
* expr.c (expand_assignment): Handle MEM_REF.
(store_expr): Handle MEM_REFs from STRING_CSTs.
(store_field): If expanding a MEM_REF of a non-addressable
decl use bitfield operations.
(get_inner_reference): Handle MEM_REF.
(expand_expr_addr_expr_1): Likewise.
(expand_expr_real_1): Likewise.
* tree-eh.c (tree_could_trap_p): Handle MEM_REF.
* alias.c (ao_ref_from_mem): Handle MEM_REF.
(get_alias_set): Likewise. Properly handle VIEW_CONVERT_EXPRs.
* tree-data-ref.c (dr_analyze_innermost): Handle MEM_REF.
(dr_analyze_indices): Likewise.
(dr_analyze_alias): Likewise.
(object_address_invariant_in_loop_p): Likewise.
* gimplify.c (mark_addressable): Handle MEM_REF.
(gimplify_cond_expr): Build MEM_REFs.
(gimplify_modify_expr_to_memcpy): Likewise.
(gimplify_init_ctor_preeval_1): Handle MEM_REF.
(gimple_fold_indirect_ref): Adjust.
(gimplify_expr): Handle MEM_REF. Gimplify INDIRECT_REF to MEM_REF.
* tree.def (MEM_REF): New tree code.
* tree-dfa.c: Include toplev.h.
(get_ref_base_and_extent): Handle MEM_REF.
(get_addr_base_and_unit_offset): New function.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Handle MEM_REF.
* gimple-fold.c (may_propagate_address_into_dereference): Handle
MEM_REF.
(maybe_fold_offset_to_array_ref): Allow possibly out-of bounds
accesses if the array has just one dimension. Remove always true
parameter. Do not require type compatibility here.
(maybe_fold_offset_to_component_ref): Remove.
(maybe_fold_stmt_indirect): Remove.
(maybe_fold_reference): Remove INDIRECT_REF handling.
Fold back to non-MEM_REF.
(maybe_fold_offset_to_address): Simplify. Deal with type
mismatches here.
(maybe_fold_reference): Likewise.
(maybe_fold_stmt_addition): Likewise. Also handle
&ARRAY + I in addition to &ARRAY[0] + I.
(fold_gimple_assign): Handle ADDR_EXPR of MEM_REFs.
(gimple_get_relevant_ref_binfo): Handle MEM_REF.
* cfgexpand.c (expand_debug_expr): Handle MEM_REF.
* tree-ssa.c (useless_type_conversion_p): Make most pointer
conversions useless.
(warn_uninitialized_var): Handle MEM_REF.
(maybe_rewrite_mem_ref_base): New function.
(execute_update_addresses_taken): Implement re-writing of MEM_REFs
to SSA form.
* tree-inline.c (remap_gimple_op_r): Handle MEM_REF, remove
INDIRECT_REF handling.
(copy_tree_body_r): Handle MEM_REF.
* gimple.c (is_gimple_addressable): Adjust.
(is_gimple_address): Likewise.
(is_gimple_invariant_address): ADDR_EXPRs of MEM_REFs with
invariant base are invariant.
(is_gimple_min_lval): Adjust.
(is_gimple_mem_ref_addr): New function.
(get_base_address): Handle MEM_REF.
(count_ptr_derefs): Likewise.
(get_base_loadstore): Likewise.
* gimple.h (is_gimple_mem_ref_addr): Declare.
(gimple_call_fndecl): Handle invariant MEM_REF addresses.
* tree-cfg.c (verify_address): New function, split out from ...
(verify_expr): ... here. Use for verifying ADDR_EXPRs and
the address operand of MEM_REFs. Verify MEM_REFs. Reject
INDIRECT_REFs.
(verify_types_in_gimple_min_lval): Handle MEM_REF. Disallow
INDIRECT_REF. Allow conversions.
(verify_types_in_gimple_reference): Verify VIEW_CONVERT_EXPR of
a register does not change its size.
(verify_types_in_gimple_reference): Verify MEM_REF.
(verify_gimple_assign_single): Disallow INDIRECT_REF.
Handle MEM_REF.
* tree-ssa-operands.c (opf_non_addressable, opf_not_non_addressable):
New.
(mark_address_taken): Handle MEM_REF.
(get_indirect_ref_operands): Pass through opf_not_non_addressable.
(get_asm_expr_operands): Pass opf_not_non_addressable.
(get_expr_operands): Handle opf_[not_]non_addressable.
Handle MEM_REF. Remove INDIRECT_REF handling.
* tree-vrp.c: (check_array_ref): Handle MEM_REF.
(search_for_addr_array): Likewise.
(check_array_bounds): Likewise.
(vrp_stmt_computes_nonzero): Adjust for MEM_REF.
* tree-ssa-loop-im.c (for_each_index): Handle MEM_REF.
(ref_always_accessed_p): Likewise.
(gen_lsm_tmp_name): Likewise. Handle ADDR_EXPR.
* tree-complex.c (extract_component): Do not handle INDIRECT_REF.
Handle MEM_REF.
* cgraphbuild.c (mark_load): Properly check for NULL result
from get_base_address.
(mark_store): Likewise.
* tree-ssa-loop-niter.c (array_at_struct_end_p): Handle MEM_REF.
* tree-loop-distribution.c (generate_builtin): Exchange INDIRECT_REF
handling for MEM_REF.
* tree-scalar-evolution.c (follow_ssa_edge_expr): Handle
&MEM[ptr + CST] similar to POINTER_PLUS_EXPR.
* builtins.c (stabilize_va_list_loc): Use the function ABI
valist type if we couldn't canonicalize the argument type.
Always dereference with the canonical va-list type.
(maybe_emit_free_warning): Handle MEM_REF.
(fold_builtin_memory_op): Simplify and handle MEM_REFs in folding
memmove to memcpy.
* builtins.c (fold_builtin_memory_op): Use ref-all types
for all memcpy foldings.
* omp-low.c (build_receiver_ref): Adjust for MEM_REF.
(build_outer_var_ref): Likewise.
(scan_omp_1_op): Likewise.
(lower_rec_input_clauses): Likewise.
(lower_lastprivate_clauses): Likewise.
(lower_reduction_clauses): Likewise.
(lower_copyprivate_clauses): Likewise.
(expand_omp_atomic_pipeline): Likewise.
(expand_omp_atomic_mutex): Likewise.
(create_task_copyfn): Likewise.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle MEM_REF.
Remove old union trick. Initialize constant offsets.
(ao_ref_init_from_vn_reference): Likewise. Do not handle
INDIRECT_REF. Init base_alias_set properly.
(vn_reference_lookup_3): Replace INDIRECT_REF handling with
MEM_REF.
(vn_reference_fold_indirect): Adjust for MEM_REFs.
(valueize_refs): Fold MEM_REFs. Re-evaluate constant offset
for ARRAY_REFs.
(may_insert): Remove.
(visit_reference_op_load): Do not test may_insert.
(run_scc_vn): Remove parameter, do not fiddle with may_insert.
* tree-ssa-sccvn.h (struct vn_reference_op_struct): Add
a field to store the constant offset this op applies.
(run_scc_vn): Adjust prototype.
* cgraphunit.c (thunk_adjust): Adjust for MEM_REF.
* tree-ssa-ccp.c (ccp_fold): Replace INDIRECT_REF folding with
MEM_REF. Propagate &foo + CST as &MEM[&foo, CST]. Do not
bother about volatile qualifiers on pointers.
(fold_const_aggregate_ref): Handle MEM_REF, do not handle INDIRECT_REF.
* tree-ssa-loop-ivopts.c
* tree-ssa-loop-ivopts.c (determine_base_object): Adjust
for MEM_REF.
(strip_offset_1): Likewise.
(find_interesting_uses_address): Replace INDIRECT_REF handling with
MEM_REF handling.
(get_computation_cost_at): Likewise.
* ipa-pure-const.c (check_op): Handle MEM_REF.
* tree-stdarg.c (check_all_va_list_escapes): Adjust for MEM_REF.
* tree-ssa-sink.c (is_hidden_global_store): Handle MEM_REF
and constants.
* ipa-inline.c (likely_eliminated_by_inlining_p): Handle MEM_REF.
* tree-parloops.c (take_address_of): Adjust for MEM_REF.
(eliminate_local_variables_1): Likewise.
(create_call_for_reduction_1): Likewise.
(create_loads_for_reductions): Likewise.
(create_loads_and_stores_for_name): Likewise.
* matrix-reorg.c (may_flatten_matrices_1): Sanitize.
(ssa_accessed_in_tree): Handle MEM_REF.
(ssa_accessed_in_assign_rhs): Likewise.
(update_type_size): Likewise.
(analyze_accesses_for_call_stmt): Likewise.
(analyze_accesses_for_assign_stmt): Likewise.
(transform_access_sites): Likewise.
(transform_allocation_sites): Likewise.
* tree-affine.c (tree_to_aff_combination): Handle MEM_REF.
* tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Do
not handle INDIRECT_REF.
* tree-ssa-phiopt.c (add_or_mark_expr): Handle MEM_REF.
(cond_store_replacement): Likewise.
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Handle
MEM_REF, no not handle INDIRECT_REFs.
(insert_into_preds_of_block): Properly initialize avail.
(phi_translate_1): Fold MEM_REFs. Re-evaluate constant offset
for ARRAY_REFs. Properly handle reference lookups that
require a bit re-interpretation.
(can_PRE_operation): Do not handle INDIRECT_REF. Handle MEM_REF.
* tree-sra.c
* tree-sra.c (build_access_from_expr_1): Handle MEM_REF.
(build_ref_for_offset_1): Remove.
(build_ref_for_offset): Build MEM_REFs.
(gate_intra_sra): Disable for now.
(sra_ipa_modify_expr): Handle MEM_REF.
(ipa_early_sra_gate): Disable for now.
* tree-sra.c (create_access): Swap INDIRECT_REF handling for
MEM_REF handling.
(disqualify_base_of_expr): Likewise.
(ptr_parm_has_direct_uses): Swap INDIRECT_REF handling for
MEM_REF handling.
(sra_ipa_modify_expr): Remove INDIRECT_REF handling.
Use mem_ref_offset. Remove bogus folding.
(build_access_from_expr_1): Properly handle MEM_REF for
non IPA-SRA.
(make_fancy_name_1): Add support for MEM_REF.
* tree-predcom.c (ref_at_iteration): Handle MEM_REFs.
* tree-mudflap.c (mf_xform_derefs_1): Adjust for MEM_REF.
* ipa-prop.c (compute_complex_assign_jump_func): Handle MEM_REF.
(compute_complex_ancestor_jump_func): Likewise.
(ipa_analyze_virtual_call_uses): Likewise.
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Replace
INDIRECT_REF folding with more generalized MEM_REF folding.
(tree_ssa_forward_propagate_single_use_vars): Adjust accordingly.
(forward_propagate_addr_into_variable_array_index): Also handle
&ARRAY + I in addition to &ARRAY[0] + I.
* tree-ssa-dce.c (ref_may_be_aliased): Handle MEM_REF.
* tree-ssa-ter.c (find_replaceable_in_bb): Avoid TER if that
creates assignments with overlap.
* tree-nested.c (get_static_chain): Adjust for MEM_REF.
(get_frame_field): Likewise.
(get_nonlocal_debug_decl): Likewise.
(convert_nonlocal_reference_op): Likewise.
(struct nesting_info): Add mem_refs pointer-set.
(create_nesting_tree): Allocate it.
(convert_local_reference_op): Insert to be folded mem-refs.
(fold_mem_refs): New function.
(finalize_nesting_tree_1): Perform defered folding of mem-refs
(free_nesting_tree): Free the pointer-set.
* tree-vect-stmts.c (vectorizable_store): Adjust for MEM_REF.
(vectorizable_load): Likewise.
* tree-ssa-phiprop.c (phiprop_insert_phi): Adjust for MEM_REF.
(propagate_with_phi): Likewise.
* tree-object-size.c (addr_object_size): Handle MEM_REFs
instead of INDIRECT_REFs.
(compute_object_offset): Handle MEM_REF.
(plus_stmt_object_size): Handle MEM_REF.
(collect_object_sizes_for): Dispatch to plus_stmt_object_size
for &MEM_REF.
* tree-flow.h (get_addr_base_and_unit_offset): Declare.
(symbol_marked_for_renaming): Likewise.
* Makefile.in (tree-dfa.o): Add $(TOPLEV_H).
(fold-const.o): Add $(TREE_FLOW_H).
* tree-ssa-structalias.c (get_constraint_for_1): Handle MEM_REF.
(find_func_clobbers): Likewise.
* ipa-struct-reorg.c (decompose_indirect_ref_acc): Handle MEM_REF.
(decompose_access): Likewise.
(replace_field_acc): Likewise.
(replace_field_access_stmt): Likewise.
(insert_new_var_in_stmt): Likewise.
(get_stmt_accesses): Likewise.
(reorg_structs_drive): Disable.
* config/i386/i386.c (ix86_va_start): Adjust for MEM_REF.
(ix86_canonical_va_list_type): Likewise.
cp/
* cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
predicate we are looking for, allow non-gimplified
INDIRECT_REFs.
testsuite/
* gcc.c-torture/execute/20100316-1.c: New testcase.
* gcc.c-torture/execute/pr44468.c: Likewise.
* gcc.c-torture/compile/20100609-1.c: Likewise.
* gcc.dg/volatile2.c: Adjust.
* gcc.dg/plugin/selfassign.c: Likewise.
* gcc.dg/pr36902.c: Likewise.
* gcc.dg/tree-ssa/foldaddr-2.c: Remove.
* gcc.dg/tree-ssa/foldaddr-3.c: Likewise.
* gcc.dg/tree-ssa/forwprop-8.c: Adjust.
* gcc.dg/tree-ssa/pr17141-1.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-13.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-14.c: Likewise.
* gcc.dg/tree-ssa/ssa-ccp-21.c: Likewise.
* gcc.dg/tree-ssa/pta-ptrarith-1.c: Likewise.
* gcc.dg/tree-ssa/20030807-7.c: Likewise.
* gcc.dg/tree-ssa/forwprop-10.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-1.c: Likewise.
* gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
* gcc.dg/tree-ssa/ssa-ccp-23.c: Likewise.
* gcc.dg/tree-ssa/forwprop-1.c: Likewise.
* gcc.dg/tree-ssa/forwprop-2.c: Likewise.
* gcc.dg/tree-ssa/struct-aliasing-1.c: Likewise.
* gcc.dg/tree-ssa/ssa-ccp-25.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-26.c: Likewise.
* gcc.dg/tree-ssa/struct-aliasing-2.c: Likewise.
* gcc.dg/tree-ssa/ssa-ccp-26.c: Likewise.
* gcc.dg/tree-ssa/ssa-sccvn-4.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-7.c: Likewise.
* gcc.dg/tree-ssa/forwprop-5.c: Likewise.
* gcc.dg/struct/w_prof_two_strs.c: XFAIL.
* gcc.dg/struct/wo_prof_escape_arg_to_local.c: Likewise.
* gcc.dg/struct/wo_prof_global_var.c: Likewise.
* gcc.dg/struct/wo_prof_malloc_size_var.c: Likewise.
* gcc.dg/struct/w_prof_local_array.c: Likewise.
* gcc.dg/struct/w_prof_single_str_global.c: Likewise.
* gcc.dg/struct/wo_prof_escape_str_init.c: Likewise.
* gcc.dg/struct/wo_prof_array_through_pointer.c: Likewise.
* gcc.dg/struct/w_prof_global_array.c: Likewise.
* gcc.dg/struct/wo_prof_array_field.c: Likewise.
* gcc.dg/struct/wo_prof_single_str_local.c: Likewise.
* gcc.dg/struct/w_prof_local_var.c: Likewise.
* gcc.dg/struct/wo_prof_two_strs.c: Likewise.
* gcc.dg/struct/wo_prof_empty_str.c: Likewise.
* gcc.dg/struct/wo_prof_local_array.c: Likewise.
* gcc.dg/struct/w_prof_global_var.c: Likewise.
* gcc.dg/struct/wo_prof_single_str_global.c: Likewise.
* gcc.dg/struct/wo_prof_escape_substr_value.c: Likewise.
* gcc.dg/struct/wo_prof_global_array.c: Likewise.
* gcc.dg/struct/wo_prof_escape_return.c: Likewise.
* gcc.dg/struct/wo_prof_escape_substr_array.c: Likewise.
* gcc.dg/struct/wo_prof_double_malloc.c: Likewise.
* gcc.dg/struct/w_ratio_cold_str.c: Likewise.
* gcc.dg/struct/wo_prof_escape_substr_pointer.c: Likewise.
* gcc.dg/struct/wo_prof_local_var.c: Likewise.
* gcc.dg/tree-prof/stringop-1.c: Adjust.
* g++.dg/tree-ssa/pr31146.C: Likewise.
* g++.dg/tree-ssa/copyprop-1.C: Likewise.
* g++.dg/tree-ssa/pr33604.C: Likewise.
* g++.dg/plugin/selfassign.c: Likewise.
* gfortran.dg/array_memcpy_3.f90: Likewise.
* gfortran.dg/array_memcpy_4.f90: Likewise.
* c-c++-common/torture/pr42834.c: New testcase.
From-SVN: r161655
|
|
* 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
|
|
* cgraphbuild.c (cgraph_rebuild_references): New.
(cgraph_mark_reachable_node): Accept references to optimized out
extern inlines.
* cgraph.h (cgraph_rebuild_references): Declare.
* tree-inline.c (tree_function_versioning): Use it.
* ipa-struct-reorg.c (do_reorg_for_func): Likewise.
From-SVN: r159259
|
|
* Makefile.in (cgraphbuild.o): Add dependency on except.h.
* cgraphbuild.c: Include except.h
(record_type_list, record_eh_tables): New function.
(build_cgraph_edges, rebuild_cgraph_edges): Use it.
From-SVN: r159229
|
|
* 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
|
|
* Makefile.in (cgraphbuild.o): Add dependency on ipa-utils.h
* cgraphbuild.c: Include ipa-utils.h
(record_reference_ctx): New struct.
(record_reference): Simplify to work on initializers; not statements.
(mark_address, mark_load, mark_store): New.
(build_cgraph_edges): Simplify using walk_stmt_load_store_addr_ops;
walk PHI nodes too.
(record_references_in_initializer): Update use of record_reference.
(rebuild_cgraph_edges): Simplify using walk_stmt_load_store_addr_ops;
walk PHI nodes too.
From-SVN: r159032
|
|
2009-11-25 H.J. Lu <hongjiu.lu@intel.com>
* alias.c: Remove trailing white spaces.
* alloc-pool.c: Likewise.
* alloc-pool.h: Likewise.
* attribs.c: Likewise.
* auto-inc-dec.c: Likewise.
* basic-block.h: Likewise.
* bb-reorder.c: Likewise.
* bt-load.c: Likewise.
* builtins.c: Likewise.
* builtins.def: Likewise.
* c-common.c: Likewise.
* c-common.h: Likewise.
* c-cppbuiltin.c: Likewise.
* c-decl.c: Likewise.
* c-format.c: Likewise.
* c-lex.c: Likewise.
* c-omp.c: Likewise.
* c-opts.c: Likewise.
* c-parser.c: Likewise.
* c-pretty-print.c: Likewise.
* c-tree.h: Likewise.
* c-typeck.c: Likewise.
* caller-save.c: Likewise.
* calls.c: Likewise.
* cfg.c: Likewise.
* cfganal.c: Likewise.
* cfgexpand.c: Likewise.
* cfghooks.c: Likewise.
* cfghooks.h: Likewise.
* cfglayout.c: Likewise.
* cfgloop.c: Likewise.
* cfgloop.h: Likewise.
* cfgloopmanip.c: Likewise.
* cfgrtl.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* cgraphbuild.c: Likewise.
* cgraphunit.c: Likewise.
* cif-code.def: Likewise.
* collect2.c: Likewise.
* combine.c: Likewise.
* convert.c: Likewise.
* coverage.c: Likewise.
* crtstuff.c: Likewise.
* cse.c: Likewise.
* cselib.c: Likewise.
* dbgcnt.c: Likewise.
* dbgcnt.def: Likewise.
* dbgcnt.h: Likewise.
* dbxout.c: Likewise.
* dce.c: Likewise.
* ddg.c: Likewise.
* ddg.h: Likewise.
* defaults.h: Likewise.
* df-byte-scan.c: Likewise.
* df-core.c: Likewise.
* df-problems.c: Likewise.
* df-scan.c: Likewise.
* df.h: Likewise.
* dfp.c: Likewise.
* diagnostic.c: Likewise.
* diagnostic.h: Likewise.
* dominance.c: Likewise.
* domwalk.c: Likewise.
* double-int.c: Likewise.
* double-int.h: Likewise.
* dse.c: Likewise.
* dwarf2asm.c: Likewise.
* dwarf2asm.h: Likewise.
* dwarf2out.c: Likewise.
* ebitmap.c: Likewise.
* ebitmap.h: Likewise.
* emit-rtl.c: Likewise.
* et-forest.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* expmed.c: Likewise.
* expr.c: Likewise.
* expr.h: Likewise.
* final.c: Likewise.
* flags.h: Likewise.
* fold-const.c: Likewise.
* function.c: Likewise.
* function.h: Likewise.
* fwprop.c: Likewise.
* gcc.c: Likewise.
* gcov-dump.c: Likewise.
* gcov-io.c: Likewise.
* gcov-io.h: Likewise.
* gcov.c: Likewise.
* gcse.c: Likewise.
* genattr.c: Likewise.
* genattrtab.c: Likewise.
* genautomata.c: Likewise.
* genchecksum.c: Likewise.
* genconfig.c: Likewise.
* genflags.c: Likewise.
* gengtype-parse.c: Likewise.
* gengtype.c: Likewise.
* gengtype.h: Likewise.
* genmddeps.c: Likewise.
* genmodes.c: Likewise.
* genopinit.c: Likewise.
* genpreds.c: Likewise.
* gensupport.c: Likewise.
* ggc-common.c: Likewise.
* ggc-page.c: Likewise.
* ggc-zone.c: Likewise.
* ggc.h: Likewise.
* gimple-iterator.c: Likewise.
* gimple-low.c: Likewise.
* gimple-pretty-print.c: Likewise.
* gimple.c: Likewise.
* gimple.def: Likewise.
* gimple.h: Likewise.
* gimplify.c: Likewise.
* graphds.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* gthr-nks.h: Likewise.
* gthr-posix.c: Likewise.
* gthr-posix.h: Likewise.
* gthr-posix95.h: Likewise.
* gthr-single.h: Likewise.
* gthr-tpf.h: Likewise.
* gthr-vxworks.h: Likewise.
* gthr.h: Likewise.
* haifa-sched.c: Likewise.
* hard-reg-set.h: Likewise.
* hooks.c: Likewise.
* hooks.h: Likewise.
* hosthooks.h: Likewise.
* hwint.h: Likewise.
* ifcvt.c: Likewise.
* incpath.c: Likewise.
* init-regs.c: Likewise.
* integrate.c: Likewise.
* ipa-cp.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-reference.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-struct-reorg.h: Likewise.
* ipa-type-escape.c: Likewise.
* ipa-type-escape.h: Likewise.
* ipa-utils.c: Likewise.
* ipa-utils.h: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-conflicts.c: Likewise.
* ira-costs.c: Likewise.
* ira-emit.c: Likewise.
* ira-int.h: Likewise.
* ira-lives.c: Likewise.
* ira.c: Likewise.
* jump.c: Likewise.
* lambda-code.c: Likewise.
* lambda-mat.c: Likewise.
* lambda-trans.c: Likewise.
* lambda.h: Likewise.
* langhooks.c: Likewise.
* lcm.c: Likewise.
* libgcov.c: Likewise.
* lists.c: Likewise.
* loop-doloop.c: Likewise.
* loop-init.c: Likewise.
* loop-invariant.c: Likewise.
* loop-iv.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-compress.c: Likewise.
* lto-opts.c: Likewise.
* lto-section-in.c: Likewise.
* lto-section-out.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.c: Likewise.
* lto-streamer.h: Likewise.
* lto-symtab.c: Likewise.
* lto-wpa-fixup.c: Likewise.
* matrix-reorg.c: Likewise.
* mcf.c: Likewise.
* mode-switching.c: Likewise.
* modulo-sched.c: Likewise.
* omega.c: Likewise.
* omega.h: Likewise.
* omp-low.c: Likewise.
* optabs.c: Likewise.
* optabs.h: Likewise.
* opts-common.c: Likewise.
* opts.c: Likewise.
* params.def: Likewise.
* params.h: Likewise.
* passes.c: Likewise.
* plugin.c: Likewise.
* postreload-gcse.c: Likewise.
* postreload.c: Likewise.
* predict.c: Likewise.
* predict.def: Likewise.
* pretty-print.c: Likewise.
* pretty-print.h: Likewise.
* print-rtl.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* read-rtl.c: Likewise.
* real.c: Likewise.
* recog.c: Likewise.
* reg-stack.c: Likewise.
* regcprop.c: Likewise.
* reginfo.c: Likewise.
* regmove.c: Likewise.
* regrename.c: Likewise.
* regs.h: Likewise.
* regstat.c: Likewise.
* reload.c: Likewise.
* reload1.c: Likewise.
* resource.c: Likewise.
* rtl.c: Likewise.
* rtl.def: Likewise.
* rtl.h: Likewise.
* rtlanal.c: Likewise.
* sbitmap.c: Likewise.
* sched-deps.c: Likewise.
* sched-ebb.c: Likewise.
* sched-int.h: Likewise.
* sched-rgn.c: Likewise.
* sched-vis.c: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-dump.h: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched-ir.h: Likewise.
* sel-sched.c: Likewise.
* sel-sched.h: Likewise.
* sese.c: Likewise.
* sese.h: Likewise.
* simplify-rtx.c: Likewise.
* stack-ptr-mod.c: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* store-motion.c: Likewise.
* stringpool.c: Likewise.
* stub-objc.c: Likewise.
* sync-builtins.def: Likewise.
* target-def.h: Likewise.
* target.h: Likewise.
* targhooks.c: Likewise.
* targhooks.h: Likewise.
* timevar.c: Likewise.
* tlink.c: Likewise.
* toplev.c: Likewise.
* toplev.h: Likewise.
* tracer.c: Likewise.
* tree-affine.c: Likewise.
* tree-affine.h: Likewise.
* tree-browser.def: Likewise.
* tree-call-cdce.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-chrec.c: Likewise.
* tree-chrec.h: Likewise.
* tree-complex.c: Likewise.
* tree-data-ref.c: Likewise.
* tree-data-ref.h: Likewise.
* tree-dfa.c: Likewise.
* tree-dump.c: Likewise.
* tree-dump.h: Likewise.
* tree-eh.c: Likewise.
* tree-flow-inline.h: Likewise.
* tree-flow.h: Likewise.
* tree-if-conv.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-nested.c: Likewise.
* tree-nomudflap.c: Likewise.
* tree-nrv.c: Likewise.
* tree-object-size.c: Likewise.
* tree-optimize.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-pass.h: Likewise.
* tree-phinodes.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-profile.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree-ssa-copy.c: Likewise.
* tree-ssa-copyrename.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-dse.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-ssa-loop-ch.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-loop-unswitch.c: Likewise.
* tree-ssa-loop.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-operands.c: Likewise.
* tree-ssa-operands.h: Likewise.
* tree-ssa-phiopt.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-sink.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-tailcall.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-generic.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-vectorizer.c: Likewise.
* tree-vectorizer.h: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* tree.def: Likewise.
* tree.h: Likewise.
* treestruct.def: Likewise.
* unwind-compat.c: Likewise.
* unwind-dw2-fde-glibc.c: Likewise.
* unwind-dw2.c: Likewise.
* value-prof.c: Likewise.
* value-prof.h: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* varpool.c: Likewise.
* vec.c: Likewise.
* vec.h: Likewise.
* vmsdbgout.c: Likewise.
* web.c: Likewise.
* xcoffout.c: Likewise.
From-SVN: r154645
|
|
* cgraphbuild.c (compute_call_stmt_bb_frequency): Use proper ENTRY_BLOCK_PTR.
* cgraph.c (cgraph_clone_edge): Avoid freq_scale 0 to completely zero out all
callees.
* cgraphunit.c (verify_cgraph_node): Verify cgraph nodes for frequency and count match.
* ipa-inline.c (update_noncloned_frequencies): New function.
(cgraph_clone_inlined_nodes): Use it.
* tree-inline.c (copy_bb): Fix frequency scaling; output
diagnostic on frequency mismatches to dump file.
(initialize_cfun): Do not scale frequency; fix count scaling;
initialize entry and exit block frequencies; copy profile
info.
(copy_cfg_body): Use frequency_scale as argument;
fix count scaling.
(copy_body): Use frequency_scale as argument.
(expand_call_inline): Compute frequency scale and output diagnostic
to dump file.
(delete_unreachable_blocks_update_callgrah): Remove checking that
has to be done after edge redirection.
(tree_function_versioning): Update initialize_cfun and copy_body call.
From-SVN: r154205
|
|
* cfgrtl.c (pass_free_cfg): Add pass name.
* cgraphbuild.c (pass_build_cgraph_edges): Likewise.
(pass_rebuild_cgraph_edges, pass_remove_cgraph_callee_edges): Likewise.
* dce.c (pass_ud_rtl_dce, pass_fast_rtl_dce): Change pass name.
* df-core.c (pass_df_initialize_no_opt): Likewise.
* except.c (pass_rtl_eh): Likewise.
* function.c (pass_init_function, pass_leaf_regs): Likewise.
* gcse.c (pass_rtl_pre): Change pass name.
* passes.c (pass_postreload): Add pass name.
(make_pass_instance): Don't use duplicate-tracking logic for
names starting with '*'.
(next_pass_1): Assert that pass has a name.
(register_one_dump_file): If there is an space in the name,
skip past it.
* predict.c (pass_strip_predict_hints): Add pass name.
* reg-stack.c (pass_stack_regs): Likewise.
* stack-ptr-mod.c (pass_stack_ptr_mod): Likewise.
* tree-cfg.c (pass_warn_function_return,
pass_warn_function_noreturn): Add pass name.
* tree-dfa.c (pass_referenced_vars): Likewise.
* tree-optimize.c (pass_cleanup_cfg_post_optimizing):
Fix whitespace before comment.
(pass_fixup_cfg): Add pass name, fix whitespace before comment.
(pass_init_datastructures): Add pass name.
* tree-ssa-loop.c (pass_record_bounds): Likewise.
* tree-ssa.c (pass_early_warn_uninitialized,
pass_late_warn_uninitialized): Likewise.
* tree.c (pass_ipa_free_lang_data): Likewise.
* doc/passes.texi (pass manager): Document how to disambiguate
pass names.
Co-Authored-By: Joern Rennecke <amylaar@spamcop.net>
From-SVN: r154013
|
|
From-SVN: r152569
|
|
From-SVN: r152434
|
|
* cgraphbuild.c (record_reference): Use cgraph_mark_address_taken_node.
* cgraph.c (cgraph_mark_address_taken_node): New function.
(dump_cgraph_node): Dump new flag.
* cgraph.h (struct cgraph_node): Add address_taken.
(cgraph_mark_address_taken_node): New function.
* cp/decl2.c (cxx_callgraph_analyze_expr): Use
cgraph_mark_address_taken.
* ipa.c (cgraph_postorder): Prioritize functions with address taken
since new direct calls can be born.
From-SVN: r147342
|
|
handle correctly when profile is absent.
* cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument;
handle correctly when profile is absent.
(build_cgraph_edges): Update.
(rebuild_cgraph_edges): Update.
* cgraph.c: Do not include varrau.h
(cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones):
New function
(cgraph_update_edges_for_call_stmt_node): New stati cfunction.
(cgraph_update_edges_for_call_stmt): Handle clones.
(cgraph_remove_node): Handle clone tree.
(cgraph_remove_node_and_inline_clones): New function.
(dump_cgraph_node): Dump clone tree.
(cgraph_clone_node): Handle clone tree.
(clone_function_name): Bring here from tree-inline.c
(cgraph_create_virtual_clone): New function.
* cgraph.h (ipa_replace_map): Move ehre from ipa.h
(cgraph_clone_info): New function
(strut cgraph_node): Add clone_info and new clone tree pointers.
(cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones,
cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare.
(cgraph_function_versioning): Use VEC argument.
(compute_call_stmt_bb_frequency): Update prototype.
(cgraph_materialize_all_clones): New function.
* ipa-cp.c (ipcp_update_cloned_node): Remove.
(ipcp_create_replace_map): Update to VECtors.
(ipcp_update_callgraph): Use virtual clones.
(ipcp_update_bb_counts, ipcp_update_edges_counts): Remove.
(ipcp_update_profiling): Do not update local profiling.
(ipcp_insert_stage): Use VECtors and virtual clones.
* cgraphunit.c (verify_cgraph_node): Verify clone tree.
(clone_of_p): New function.
(cgraph_preserve_function_body_p): Use clone tree.
(cgraph_optimize): Materialize clones.
(cgraph_function_versioning): Update for VECtors.
(save_inline_function_body): Use clone tree.
(cgraph_materialize_clone, cgraph_materialize_all_clones): New functions.
* ipa-inline.c (cgraph_default_inline_p): Use analyzed flags.
* ipa.c: Include gimple.h.
(cgraph_remove_unreachable_nodes): Use clone tree.
* ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency.
* ipa-prop.h (ipa_replace_map): Move to cgraph.h.
* tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h
(copy_bb): Handle updating of clone tree; add new edge when new call
appears.
(expand_call_inline): Be strict about every call having edge.
(clone_fn_id_num, clone_function_name): Move to cgraph.c.
(delete_unreachable_blocks_update_callgraph): New function.
(tree_function_versioning): Use VECtors; always remove unreachable blocks
and fold conditionals.
* tree-inline.h: Do not include varray.h
(tree_function_versioning): Remove.
* Makefile.in (GTFILES): Remove tree-inline.c
* passes.c (do_per_function): Do only functions having body.
* ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree.
From-SVN: r147294
|
|
* df.h: Include "timevar.h".
(struct df_problem): Change tv_id field to timevar_id_t.
* tree-pass.h: Include "timevar.h".
(struct opt_pass): Change tv_id field to timevar_id_t.
* timevar.h (timevar_id_t): Define TV_NONE.
* passes.c (execute_one_ipa_transform_pass): Check for tv_id !=
TV_NONE rather than tv_id != 0.
(execute_one_pass): Likewise.
* Makefile.in (DF_H): Add $(TIMEVAR_H).
(TREE_PASS_H): Define. Change all instances of tree-pass.h in
dependencies to $(TREE_PASS_H).
* bt-load.c (pass_branch_target_load_optimize1): Set tv_id field
to TV_NONE.
(pass_branch_target_load_optimize2): Likewise.
* cfglayout.c (pass_into_cfg_layout_mode): Likewise.
(pass_outof_cfg_layout_mode): Likewise.
* cgraphbuild.c (pass_remove_cgraph_callee_edges): Likewise.
(pass_rebuild_cgraph_edges): Likewise.
(pass_remove_cgraph_callee_edges): Likewise.
* df-core.c (pass_df_initialize_opt): Likewise.
(pass_df_initialize_no_opt): Likewise.
(pass_df_finish): Likewise.
* emit-rtl.c (pass_unshare_all_rtl): Likewise.
* except.c (pass_set_nothrow_function_flags): Likewise.
(pass_convert_to_eh_region_ranges): Likewise.
* final.c (pass_compute_alignments): Likewise.
* function.c (pass_instantiate_virtual_regs): Likewise.
(pass_init_function): Likewise.
(pass_leaf_regs): Likewise.
(pass_match_asm_constraints): Likewise.
* gimple-low.c (pass_lower_cf): Likewise.
(pass_mark_used_blocks): Likewise.
* init-regs.c (pass_initialize_regs): Likewise.
* integrate.c (pass_initial_value_sets): Likewise.
* ira.c (pass_ira): Likewise.
* jump.c (pass_cleanup_barriers): Likewise.
* omp-low.c (pass_expand_omp): Likewise.
(pass_lower_omp): Likewise.
* matrix-reorg.c (pass_ipa_matrix_reorg): Likewise.
* recog.c (pass_split_all_insns): Likewise.
(pass_split_after_reload): Likewise.
(pass_split_before_regstack): Likewise.
(pass_split_before_sched2): Likewise.
(pass_split_for_shorten_branches): Likewise.
* reginfo.c (pass_reginfo_init): Likewise.
(pass_subregs_of_mode_init): Likewise.
(pass_subregs_of_mode_finish): Likewise.
* passes.c (pass_postreload): Likewise.
* stack-ptr-mod.c (pass_stack_ptr_mod): Likewise.
* tree-cfg.c (pass_remove_useless_stmts): Likewise.
(pass_warn_function_return): Likewise.
(pass_warn_function_noreturn): Likewise.
* tree-complex.c (pass_lower_complex): Likewise.
(pass_lower_complex_O0): Likewise.
* tree-if-conv.c (pass_if_conversion): Likewise.
* tree-into-ssa.c (pass_build_ssa): Likewise.
* tree-mudflap.c (pass_mudflap_1): Likewise.
(pass_mudflap_2): Likewise.
* tree-nomudflap.c (pass_mudflap_1): Likewise.
(pass_mudflap_2): Likewise.
* tree-nrv.c (pass_return_slot): Likewise.
* tree-object-size.c (pass_object_sizes): Likewise.
* tree-optimize.c (pass_all_optimizations): Likewise.
(pass_early_local_passes): Likewise.
(pass_all_early_optimizations): Likewise.
(pass_cleanup_cfg): Likewise.
(pass_cleanup_cfg_post_optimizing): Likewise.
(pass_free_datastructures): Likewise.
(pass_free_cfg_annotations): Likewise.
(pass_fixup_cfg): Likewise.
(pass_init_datastructures): Likewise.
* tree-ssa.c (pass_early_warn_uninitialized): Likewise.
(pass_late_warn_uninitialized): Likewise.
(pass_update_address_taken): Likewise.
* tree-ssa-ccp.c (pass_fold_builtins): Likewise.
* tree-ssa-math-opts.c (pass_cse_reciprocals): Likewise.
(pass_cse_sincos): Likewise.
(pass_convert_to_rsqrt): Likewise.
* tree-ssa-structalias.c (pass_build_alias): Likewise.
* tree-stdarg.c (pass_stdarg): Likewise.
* tree-tailcall.c (pass_tail_recursion): Likewise.
(pass_tail_calls): Likewise.
* tree-vect-generic.c (pass_lower_vector): Likewise.
(pass_lower_vector_ssa): Likewise.
* tree-vectorizer.c (pass_ipa_increase_alignment): Likewise.
From-SVN: r146222
|
|
2009-03-30 Martin Jambor <mjambor@suse.cz>
* ipa-prop.h (jump_func_type): Rename IPA_UNKNOWN, IPA_CONST,
IPA_CONST_MEMBER_PTR, and IPA_PASS_THROUGH to IPA_JF_UNKNOWN,
IPA_JF_CONST, IPA_JF_CONST_MEMBER_PTR, and IPA_JF_PASS_THROUGH
respectively.
* tree-dfa.c (get_ref_base_and_extent): Return -1 maxsize if
seen_variable_array_ref while also traversing a union.
* tree-inline.c (optimize_inline_calls): Do not call
cgraph_node_remove_callees.
* cgraphbuild.c (remove_cgraph_callee_edges): New function.
(pass_remove_cgraph_callee_edges): New variable.
* passes.c (init_optimization_passes): Add
pass_remove_cgraph_callee_edges after early inlining and before all
late intraprocedural passes.
* omp-low.c (expand_omp_taskreg): Always set current_function_decl.
From-SVN: r145291
|
|
* cgraphbuild.c (build_cgraph_edges, rebuild_cgraph_edges): Don't
call initialize_inline_failed.
(initialize_inline_failed): Move it from here ...
* cgraph.c (initialize_inline_failed): ... to here.
(cgraph_create_edge): Call initialize_inline_failed rather than
setting inline_failed directly.
testsuite/
* gcc.dg/winline-10.c: New test.
From-SVN: r145215
|
|
2008-09-03 Doug Kwan <dougkwan@google.com>
* cgraphbuild.c (initialize_inline_failed): Use cgraph_inline_failed_t
enums instead of reason strings.
* cgraph.c (cgraph_create_edge): Same.
(cgraph_inline_failed_string): New function.
* cgraph.h (cgraph_inline_failed_t): New enum type.
(cgraph_inline_failed_string): New prototype.
(struct cgraph_edge): Change type of INLINED_FAILED from constant
char pointer to cgraph_inline_failed_t.
(cgraph_inline_p): Adjust prototype to use cgraph_inline_failed_t.
(cgraph_default_inline_p): Ditto.
* gcc/cgraphunit.c (cgraph_inline_p): Change type of parameter REASON
to cgraph_inline_failed_t pointer.
* cif-code.def: New file.
* ipa-inline.c (cgraph_mark_inline_edge): Use an enum instead of a
reason string.
(cgraph_check_inline_limits): Change type of REASON to pointer to
cgraph_inline_failed_t. Replace reason strings with enums.
(cgraph_default_inline_p): Ditto.
(cgraph_recursive_inlining_p): Ditto.
(update_caller_keys): Change type of FAILED_REASON to
cgraph_inline_failed_t.
(cgraph_set_inline_failed): Change type of REASON to pointer to
cgraph_inline_failed_t. Call cgraph_inline_failed_string to
convert enums to strings for text output.
(cgraph_decide_inlining_of_small_function): Change FAILED_REASON
to be of type cgraph_inline_failed_t. Replace reason strings with
enums. Call cgraph_inline_failed_string to covert enums
to strings for text output.
(cgraph_decide_inlining): Replace reason strings with enums.
(cgraph_decide_inlining_incrementally): Change type of FAILED_REASON
to cgraph_inline_failed_t type. Call cgraph_inline_failed_string
for text output.
* tree-inline.c (expand_call_inline): Change type of REASON
to cgraph_inline_failed_t. Replace reason strings with enums.
Call cgraph_inline_failed_string for text output.
* Makefile.in (CGRAPH_H): Add cif-code.def to dependencies.
(cgraph.o): Ditto.
From-SVN: r145176
|
|
branch prediction/profile)
PR tree-optimization/38074
* cgraphbuild.c (compute_call_stmt_bb_frequency): Fix handling of 0
entry frequency.
* predict.c (combine_predictions_for_bb): Ignore predictor predicting
in both dirrection for first match heuristics.
(tree_bb_level_predictions): Disable noreturn heuristic when there
is no returning path.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r142517
|
|
2008-07-28 Richard Guenther <rguenther@suse.de>
Merge from gimple-tuples-branch.
* ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
* gimple.def: New file.
* gsstruct.def: Likewise.
* gimple-iterator.c: Likewise.
* gimple-pretty-print.c: Likewise.
* tree-gimple.c: Removed. Merged into ...
* gimple.c: ... here. New file.
* tree-gimple.h: Removed. Merged into ...
* gimple.h: ... here. New file.
* Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h.
* configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
--enable-checking=gimple flag.
* config.in: Likewise.
* configure: Regenerated.
* tree-ssa-operands.h: Tuplified.
* tree-vrp.c: Likewise.
* tree-loop-linear.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-dump.c: Likewise.
* tree-complex.c: Likewise.
* cgraphbuild.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-pretty-print.c: Likewise.
* tracer.c: Likewise.
* gengtype.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-ssa-loop-unswitch.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* value-prof.c: Likewise.
* tree-ssa-loop-ch.c: Likewise.
* tree-tailcall.c: Likewise.
* value-prof.h: Likewise.
* tree.c: Likewise.
* tree.h: Likewise.
* tree-pass.h: Likewise.
* ipa-cp.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-scalar-evolution.h: Likewise.
* target.h: Likewise.
* lambda-mat.c: Likewise.
* tree-phinodes.c: Likewise.
* diagnostic.h: Likewise.
* builtins.c: Likewise.
* tree-ssa-alias-warnings.c: Likewise.
* cfghooks.c: Likewise.
* fold-const.c: Likewise.
* cfghooks.h: Likewise.
* omp-low.c: Likewise.
* tree-ssa-dse.c: Likewise.
* ipa-reference.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* toplev.c: Likewise.
* tree-gimple.c: Likewise.
* tree-gimple.h: Likewise.
* tree-chrec.c: Likewise.
* tree-chrec.h: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-sccvn.h: Likewise.
* cgraphunit.c: Likewise.
* tree-ssa-copyrename.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-nomudflap.c: Likewise.
* tree-call-cdce.c: Likewise.
* ipa-pure-const.c: Likewise.
* c-format.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-nrv.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* ipa-utils.c: Likewise.
* tree-ssa-propagate.h: Likewise.
* tree-ssa-alias.c: Likewise.
* gimple-low.c: Likewise.
* tree-ssa-sink.c: Likewise.
* ipa-inline.c: Likewise.
* c-semantics.c: Likewise.
* dwarf2out.c: Likewise.
* expr.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* predict.c: Likewise.
* tree-ssa-loop.c: Likewise.
* tree-parloops.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* matrix-reorg.c: Likewise.
* c-decl.c: Likewise.
* tree-eh.c: Likewise.
* c-pretty-print.c: Likewise.
* lambda-trans.c: Likewise.
* function.c: Likewise.
* langhooks.c: Likewise.
* ebitmap.h: Likewise.
* tree-vectorizer.c: Likewise.
* function.h: Likewise.
* langhooks.h: Likewise.
* tree-vectorizer.h: Likewise.
* ipa-type-escape.c: Likewise.
* ipa-type-escape.h: Likewise.
* domwalk.c: Likewise.
* tree-if-conv.c: Likewise.
* profile.c: Likewise.
* domwalk.h: Likewise.
* tree-data-ref.c: Likewise.
* tree-data-ref.h: Likewise.
* tree-flow-inline.h: Likewise.
* tree-affine.c: Likewise.
* tree-vect-analyze.c: Likewise.
* c-typeck.c: Likewise.
* gimplify.c: Likewise.
* coretypes.h: Likewise.
* tree-ssa-phiopt.c: Likewise.
* calls.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree.def: Likewise.
* tree-dfa.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* cfgexpand.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-predcom.c: Likewise.
* lambda.h: Likewise.
* tree-mudflap.c: Likewise.
* ipa-prop.c: Likewise.
* print-tree.c: Likewise.
* tree-ssa-copy.c: Likewise.
* ipa-prop.h: Likewise.
* tree-ssa-forwprop.c: Likewise.
* ggc-page.c: Likewise.
* c-omp.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-nested.c: Likewise.
* tree-ssa.c: Likewise.
* lambda-code.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-inline.c: Likewise.
* tree-inline.h: Likewise.
* tree-iterator.c: Likewise.
* tree-optimize.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-vect-transform.c: Likewise.
* tree-object-size.c: Likewise.
* tree-outof-ssa.c: Likewise.
* cfgloop.c: Likewise.
* system.h: Likewise.
* tree-profile.c: Likewise.
* cfgloop.h: Likewise.
* c-gimplify.c: Likewise.
* c-common.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-flow.h: Likewise.
* c-common.h: Likewise.
* basic-block.h: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-ssa-structalias.h: Likewise.
* tree-cfg.c: Likewise.
* passes.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-struct-reorg.h: Likewise.
* tree-ssa-reassoc.c: Likewise.
* cfgrtl.c: Likewise.
* varpool.c: Likewise.
* stmt.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* langhooks-def.h: Likewise.
* tree-ssa-operands.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/frv/frv.c: Likewise.
* config/s390/s390.c: Likewise.
* config/m32c/m32c.c: Likewise.
* config/m32c/m32c-protos.h: Likewise.
* config/spu/spu.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/i386/i386.c: Likewise.
* config/sh/sh.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/pa/pa.c: Likewise.
* config/mips/mips.c: Likewise.
From-SVN: r138207
|
|
* cgraphbuild.c (record_reference): Drop non-unit-at-a-time code.
(build_cgraph_edges): Likewise.
* cgraph.c (cgraph_node): Do not update assembler hash.
(cgraph_remove_node): Drop non-unit-at-a-time code.
* tree-pass.h (pass_O0_always_inline): Remove.
* ipa-reference.c (gate_reference): Remove unit-at-a-time check.
* toplev.c (process_options): Flag unit-at-a-time does not imply
no section anchors.
* cgraphunit.c: Update comments.
(decide_is_function_needed): Drop non-unit-at-a-time mode.
(cgraph_assemble_pending_functions): Remove.
(cgraph_reset_node): Drop non-unit-at-a-time code.
(cgraph_finalize_function): Likewise.
(cgraph_analyze_function): Likewise.
(cgraph_finalize_compilation_unit): Likewise.
(cgraph_expand_function): Likewise.
(cgraph_optimize): Likesise.
(save_inline_function_body): Likewise.
* ipa-pure-const.c (gate_pure_const): Drop flag_unit_at_a_time check.
* tree-ssa-alias.c (maybe_be_aliased): Likewise.
* ipa-inline.c: Update comments.
(enum inlining_mode): remove INLINE_SPEED.
(cgraph_clone_inlined_nodes): Drop unit-at-a-time check.
(cgraph_mark_inline_edge): Likewise.
(try_inline): Likewise.
(cgraph_decide_inlining_incrementally): Likewise.
(cgraph_gate_inlining): Remove.
(cgraph_early_inlining): Remove flag_unit_at_a_time checks.
(cgraph_gate_early_inlining): Likewise.
(gate_inline_passes): Remove.
(pass_inline_parameters, pass_ipa_inline): Remove gates.
(cgraph_gate_O0_always_inline, cgraph_O0_always_inline,
pass_O0_always_inline): Remove.
* c-pch.c (c_pch_matching): Remove -funit-at-a-time.
* dwarf2out.c (reference_to_unused): Remove flag_unit_at_a_time check.
* opts.c (no_unit_at_a_time_default): Remove.
(decode_options): Remove flag_unit_at_a_time reset and warning.
* opts.h (no_unit_at_a_time_default): Remove.
* c-decl.c (diagnose_mismatched_decls): Do not require inline keyword
early in GNU dialect.
(merge_decls): Update comment; drop unit-at-a-time check.
(finish_decl): Likewise.
(grok_declaration): Remove flag_inline_trees code.
(finish_functions): Return on function returning non-void on all
statics.
* ipa-tye-escape.c (gate_type_escape_vars): Remove.
* cfgexpand.c (expand_one_static_var): Remove.
(expand_one_var): Remove expand_one_static_var call.
(expand_used_vars_for_block): Remove flag_unit_a_time check.
* c-opts.c (c_common_post_options): Remove flag_inline_trees code
and flag_unit_at_a-time compatibility checks.
* varasm.c (assemble_alias): Remove flag_unit_at_a_time check.
* tree-inline.c (flag_inline_trees): Remove.
(inlinable_function_p): Don't check it.
(expand_call_inline): Remove non-unit-at-a-time code.
* tree-inline.h (flag_inline_trees): Remove.
* tree-optimize.c (execute_early_local_optimizations): Remove
unit-at-a-time checks.
(tree_rest_of_compilation): Likewise.
* combine.c (setup_incoming_promotions): Likewise.
* tree-profile.c (tree_gen_ic_func_profiler): Likewise.
* tree-ssa-structalias.c (delete_points_to_sets): Likewise.
* passes.c (pass_inline_parameters): Update comments; remove
O0_alwaysinline pass.
(execute_one_ipa_transform_pass): Do not reset in_gimple_form.
(execute_one_pass): Likewise.
* i386.c (ix86_function_regparm): Remove unit-at-a-time check.
(ix86_function_sseregparm): Likewise.
* arm.c (arm_function_in_section_p): Likewise.
* bfin.c (bfin_load_pic_reg, bfin_function_ok_for_sibcall): Likewise.
* varpool.c: Update comments.
(decide_is_variable_needed): Remove unit-at-a-time checks.
(varpool_finalize_decl): Likewise.
* ada/utils.c (end_subprog_body): Remove inline trees check.
* ada/misc.c (gnat_post_options): Do not set flag_inline_trees.
* fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
* gcc.dg/winline-4.c: Remove.
* gcc.dg/pch/valid-3.hs: Remove.
* gcc.dg/pch/valid-3.c: Remove.
* g++.old-deja/g++.brendan/crash52.C: Accept returning void warning
* g++.old-deja/g++.jason/report.C: Likewise.
* testsuite/g++.dg/warn/pr23075.C: We get returning void warning
instead of control flow warning.
* cp/decl.c (duplicate_decls): Update comment and unit-at-a-time.
(grogfndecl): Drop flag_inline_trees code.
* cp/pt.c (instantiate_decl): Drop flag_iline_trees code.
* cp/lex.c (cxx_init): Do not set unit-at-a-time.
* java/decl.c: Include cgraph.h
(end_java_method): Remove non-unit-at-a-time code.
(java_mark_decl_local): Likewise; sanity check that we don't touch
finalized nodes.
From-SVN: r138140
|
|
DECL_SAVED_TREE.
2008-07-23 Martin Jambor <mjambor@suse.cz>
* 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.
From-SVN: r138092
|
|
PR c++/36523
* cgraphunit.c (cgraph_process_new_functions): Don't clear
node->needed and node->reachable.
* cgraphbuild.c (record_reference): Handle OMP_PARALLEL and OMP_TASK.
* omp-low.c (delete_omp_context): Call finalize_task_copyfn.
(expand_task_call): Don't call expand_task_copyfn.
(expand_task_copyfn): Renamed to...
(finalize_task_copyfn): ... this.
* testsuite/libgomp.c++/task-7.C: New function.
From-SVN: r136977
|
|
PR tree-optimization/36329
* tree.h (CALL_CANNOT_INLINE_P): Add access check.
* tree-gimple.h (CALL_STMT_CANNOT_INLINE_P): New macro.
* cgraphbuild.c (initialize_inline_failed): Use the latter
macro in lieu of the former.
* ipa-inline.c (cgraph_mark_inline): Likewise.
(cgraph_decide_inlining_of_small_function): Likewise.
(cgraph_decide_inlining): Likewise.
(cgraph_decide_inlining_incrementally): Likewise.
From-SVN: r135954
|
|
call_site_record.
* except.c (dw2_size_of_call_site_table,
sjlj_size_of_call_site_table): Use vector API for call_site_record.
* cgraphbuild.c (build_cgraph_edges): Update.
* tree-pass.h: Update comment.
* final.c (leaf_function_p): Update.
(leaf_renumber_regs): Update.
(rest_of_clean_state): Update.
* omp-low.c (expand_omp_parallel): Update.
* ipa-reference.c (analyze_function): Update.
* reorg.c (find_end_label): Update.
(optimize_skip): Update.
(fill_simple_delay_slots): Update.
(fill_simple_delay_slots): Update.
(make_return_insns): Update.
(dbr_schedule): Update.
* gimple-low.c (record_vars_into): Update.
* cfgbuild.c (make_edges): Update.
* function.c (assign_stack_local): Update.
(assign_parm_adjust_stack_rtl): Update.
(locate_and_pad_parm): Update.
(allocate_struct_function): Do not initialize stack_alignment_needed
and preferred_stack_boundary here.
(stack_protect_prologue): Update.
(stack_protect_epilogue): Update.
(expand_function_start): Initialize stack_alignment_needed,
preferred_stack_boundary and max_jumptable_ents.
(expand_function_end): Update.
(free_after_compilation): Do not NULLify epilogue_delay_list.
* function.h (struct rtl_data): Add stack_protect_guard,
stack_alignment_needed,
preferred_stack_boundary, epilogue_delay_list.
(struct function): Remove value_histograms, stack_alignment_needed,
preferred_stack_boundary, epilogue_delay_list, max_jumptable_ents,
last_label_uid,
unexpanded_var_list, stack_protect_guard.
(current_function_epilogue_delay_list): Remove.
* ipa-type-escape.c (analyze_function): Update.
* gimplify.c (pop_gimplify_context): Update comment.
* calls.c (expand_call): Update.
(emit_library_call_value_1): Update.
* except.c (set_nothrow_function_flags): Update.
* cfgexpand.c (get_decl_align_unit): Update.
(create_stack_guard): Update.
(estimated_stack_frame_size): Update.
(expand_used_vars): Update.
(tree_expand_cfg): Free histogram earliers, init expansion variables.
* explow.c (allocate_dynamic_stack_space): Update.
* tree-ssa-live.c (remove_unused_locals): Update.
* varasm.c (mark_constant_pool): Update.
* tree-inline.c (remap_decls): Update.
(initialize_cfun): Update.
(declare_return_variable): Update.
(inline_forbidden_p): Update.
(expand_call_inline): Update.
(declare_inline_vars): Update.
(tree_function_versioning): Update.
* tree-flow.h (value_histograms): New.
(VALUE_HISTOGRAMS): New macro.
* basic-block.h (control_flow_graph): Add max_jumptable_ents,
last_label_uid.
* tree-cfg.c (set_bb_for_stmt): Update.
(replace_by_duplicate_decl): Update.
(move_block_to_fn): Update.
(new_label_mapper): Update.
(dump_function_to_file): Update.
* ipa-struct-reorg.c (build_data_structure): Update.
* cfgrtl.c (print_rtl_with_bb): Update.
* reload1.c (reload): Update.
(reload): Update.
* config/i386/i386.c (setup_incoming_varargs_64,
ix86_compute_frame_layout): Update.
* config/arc/arc.c (arc_output_function_epilogue): Update.
From-SVN: r134425
|
|
* gcc.dg/20050811-2.c: Update dumping flags.
* gcc.dg/sms-2.c: Update dumping flags.
* gcc.dg/var-expand1.c: Update dumping flags.
* gcc.dg/var-expand3.c: Update dumping flags.
* gcc.dg/pr30957-1.c: Update dumping flags.
* gcc.dg/20050811-1.c: Update dumping flags.
* gcc.dg/cpp/cmdlne-dI-M.C: Do not xfail.
* gcc.dg/cpp/cmdlne-dM-M.C: Do not xfail.
PR other/35094
* toplev.c (decode_d_option): Handle all CPP flags.
* tree-vrp.c: Update tree_pass descriptors.
* regrename.c: Update tree_pass descriptors.
* fwprop.c: Update tree_pass descriptors.
* doc/invoke.texi: Remove documentation of dropped -d? flags.
* tree-into-ssa.c: Update tree_pass descriptors.
* tree-dump.c: Update tree_pass descriptors.
* tree-complex.c: Update tree_pass descriptors.
* tree-dump.h: Update tree_pass descriptors.
* see.c: Update tree_pass descriptors.
* cgraphbuild.c: Update tree_pass descriptors.
* tracer.c: Update tree_pass descriptors.
* tree-loop-distribution.c: Update tree_pass descriptors.
* cgraph.c: Update tree_pass descriptors.
* postreload-gcse.c: Update tree_pass descriptors.
* postreload.c: Update tree_pass descriptors.
* tree-ssa-loop-ch.c: Update tree_pass descriptors.
* tree-tailcall.c: Update tree_pass descriptors.
* tree-pass.h (tree_opt_pass): Rename to ...
(opt_pass) ... this one; add "type" field and remove letter field.
(gimple_opt_pass, rtl_opt_pass, simple_ipa_opt_pass): New.
(execute_pass_list, execute_ipa_pass_list, all_passes, all_ipa_passes,
all_lowering_passes): Update declaration.
* ipa-cp.c: Update tree_pass descriptors.
* final.c: Update tree_pass descriptors.
* omp-low.c: Update tree_pass descriptors.
* tree-ssa-dse.c: Update tree_pass descriptors.
* ipa-reference.c: Update tree_pass descriptors.
* tree-ssa-uncprop.c: Update tree_pass descriptors.
* auto-inc-dec.c: Update tree_pass descriptors.
* reorg.c: Update tree_pass descriptors.
* cgraphunit.c: Update tree_pass descriptors.
* tree-ssa-copyrename.c: Update tree_pass descriptors.
* tree-ssa-ccp.c: Update tree_pass descriptors.
* df-core.c: Update tree_pass descriptors.
* mode-switching.c: Update tree_pass descriptors.
* tree-nomudflap.c: Update tree_pass descriptors.
* modulo-sched.c: Update tree_pass descriptors.
* ipa-pure-const.c: Update tree_pass descriptors.
* cse.c: Update tree_pass descriptors.
* web.c: Update tree_pass descriptors.
* tree-stdarg.c: Update tree_pass descriptors.
* tree-ssa-math-opts.c: Update tree_pass descriptors.
* tree-ssa-dom.c: Update tree_pass descriptors.
* tree-nrv.c: Update tree_pass descriptors.
* tree-ssa-alias.c: Update tree_pass descriptors.
* loop-init.c: Update tree_pass descriptors.
* gimple-low.c: Update tree_pass descriptors.
* ipa-inline.c: Update tree_pass descriptors.
* tree-ssa-sink.c: Update tree_pass descriptors.
* global.c: Update tree_pass descriptors.
* ifcvt.c: Update tree_pass descriptors.
* jump.c: Update tree_pass descriptors.
* predict.c: Update tree_pass descriptors.
* tree-ssa-loop.c: Update tree_pass descriptors.
* recog.c: Update tree_pass descriptors.
* dse.c: Update tree_pass descriptors.
* tree-ssa-ifcombine.c: Update tree_pass descriptors.
* tree-eh.c: Update tree_pass descriptors.
* regmove.c: Update tree_pass descriptors.
* local-alloc.c
* function.c: Update tree_pass descriptors.
* tree-vectorizer.c: Update tree_pass descriptors.
* gcse.c: Update tree_pass descriptors.
* ipa-type-escape.c: Update tree_pass descriptors.
* tree-if-conv.c: Update tree_pass descriptors.
* init-regs.c: Update tree_pass descriptors.
* ipa.c: Update tree_pass descriptors.
* tree-ssa-phiopt.c: Update tree_pass descriptors.
* rtl-factoring.c: Update tree_pass descriptors.
* lower-subreg.c: Update tree_pass descriptors.
* bt-load.c: Update tree_pass descriptors.
* tree-dfa.c: Update tree_pass descriptors.
* except.c: Update tree_pass descriptors.
* emit-rtl.c: Update tree_pass descriptors.
* cfgexpand.c: Update tree_pass descriptors.
* tree-cfgcleanup.c: Update tree_pass descriptors.
* cfgcleanup.c: Update tree_pass descriptors.
* tree-ssa-pre.c: Update tree_pass descriptors.
* tree-sra.c: Update tree_pass descriptors.
* tree-mudflap.c: Update tree_pass descriptors.
* tree-ssa-copy.c: Update tree_pass descriptors.
* cfglayout.c: Update tree_pass descriptors.
* tree-ssa-forwprop.c: Update tree_pass descriptors.
* tree-ssa-dce.c: Update tree_pass descriptors.
* tree-ssa.c: Update tree_pass descriptors.
* regclass.c: Update tree_pass descriptors.
* integrate.c: Update tree_pass descriptors.
* tree-optimize.c: Update tree_pass descriptors.
* tree-ssa-phiprop.c: Update tree_pass descriptors.
* tree-object-size.c: Update tree_pass descriptors.
* combine.c: Update tree_pass descriptors.
* tree-outof-ssa.c: Update tree_pass descriptors.
* bb-reorder.c: Update tree_pass descriptors.
* stack-ptr-mod.c: Update tree_pass descriptors.
* var-tracking.c: Update tree_pass descriptors.
* tree-profile.c: Update tree_pass descriptors.
* tree-vect-generic.c: Update tree_pass descriptors.
* reg-stack.c: Update tree_pass descriptors.
* sched-rgn.c: Update tree_pass descriptors.
* tree-ssa-structalias.c: Update tree_pass descriptors.
* tree-cfg.c: Update tree_pass descriptors.
* passes.c (current_pass): Update declaration.
(finish_optimization_passes): Update.
(all_passes, all_ipa_passes, all_lowering_passes): Update declaration.
(register_one_dump_file, register_dump_files_1, next_pass_1):
Update arguments.
(init_optimization_passes): Update handling of new types.
(execute_one_pass, execute_pass_list, execute_ipa_pass_list): Update.
* ipa-struct-reorg.c: Update tree_pass descriptors.
* tree-ssa-reassoc.c: Update tree_pass descriptors.
* combine-stack-adj.c: Update tree_pass descriptors.
* cfgrtl.c: Update tree_pass descriptors.
* dce.c: Update tree_pass descriptors.
* tree-ssanames.c: Update tree_pass descriptors.
From-SVN: r133342
|
|
function pointer ANALYZE_EXPR.
* langhooks.h (struct lang_hooks_for_callgraph): Remove third
argument from function pointer ANALYZE_EXPR. Update all
users.
* cgraph.c (debug_cgraph_node): New.
(debug_cgraph): New.
From-SVN: r129845
|
|
* cgraphbuild.c (rebuild_cgraph_edges): Export.
* 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.
From-SVN: r128223
|
|
License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
|
|
2007-06-23 Richard Guenther <rguenther@suse.de>
PR tree-optimization/16876
PR middle-end/29478
* tree.h (CALL_CANNOT_INLINE_P): New macro to access static_flag
for CALL_EXPRs.
* tree-inline.c (initialize_inlined_parameters): Do not call
lang_hooks.tree_inlining.convert_parm_for_inlining.
* cgraphbuild.c (initialize_inline_failed): Set inline failed
reason for mismatched types.
* gimplify.c (gimplify_call_expr): Verify the call expression
arguments match the called function type signature. Otherwise
mark the call expression to be not considered for inlining
using CALL_CANNOT_INLINE_P flag.
* ipa-inline.c (cgraph_mark_inline): Honor CALL_CANNOT_INLINE_P on the
edges call expression.
(cgraph_decide_inlining_of_small_function): Likewise.
(cgraph_decide_inlining): Likewise.
* c-objc-common.h (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
Remove define.
* c-tree.h (c_convert_parm_for_inlining): Remove declaration.
* c-typeck.c (c_convert_parm_for_inlining): Remove.
* langhooks-def.h (lhd_tree_inlining_convert_parm_for_inlining):
Remove declaration.
(LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): Remove define.
* langhooks.c (lhd_tree_inlining_convert_parm_for_inlining):
Remove.
* langhooks.h (struct lang_hooks_for_tree_inlining): Remove
convert_parm_for_inlining member.
* gcc.dg/pr29254.c: The warning is bogus.
* gcc.dg/warn-1.c: Likewise.
* gcc.dg/assign-warn-3.c: Likewise.
* gcc.dg/noncompile/pr16876.c: The testcase is bogus, remove.
From-SVN: r125974
|
|
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* tree.h (enum tree_code_class): Add tcc_vl_exp.
(VL_EXP_CLASS_P): New.
(TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
(TREE_OPERAND_CHECK_CODE): Likewise.
(GIMPLE_STMT_OPERAND_CHECK): Likewise.
(TREE_RTL_OPERAND_CHECK): Likewise.
(tree_operand_check_failed): Make second parameter the whole tree
instead of its code. Fixed callers.
(VL_EXP_CHECK): New.
(TREE_OPERAND_LENGTH): New.
(VL_EXP_OPERAND_LENGTH): New.
(CALL_EXPR_FN): New.
(CALL_EXPR_STATIC_CHAIN): New.
(CALL_EXPR_ARGS): New.
(CALL_EXPR_ARG): New.
(call_expr_nargs): New.
(CALL_EXPR_ARGP): New.
(build_nt_call_list): Declare.
(build_vl_exp_stat): Declare.
(build_vl_exp): New.
(build_call_list): Declare.
(build_call_nary): Declare.
(build_call_valist): Declare.
(build_call_array): Declare.
(call_expr_arg): Declare.
(call_expr_argp): Declare.
(call_expr_arglist): Declare.
(fold_build_call_list): Declare.
(fold_build_call_list_initializer): Declare.
(fold_call_expr): Declare to replace fold_builtin.
(fold_builtin_fputs): Update to agree with modified definition.
(fold_builtin_strcpy): Likewise.
(fold_builtin_strncpy): Likewise.
(fold_builtin_memory_chk): Likewise.
(fold_builtin_stxcpy_chk): Likewise.
(fold_builtin_strncpy_chk): Likewise.
(fold_builtin_next_arg): Likewise.
(fold_build_call_expr): Declare.
(fold_builtin_call_list): Declare.
(fold_builtin_call_valist): Declare.
(build_call_expr): Declare.
(validate_arglist): Update to agree with modified definition.
(tree_operand_length): New.
(call_expr_arg_iterator): New.
(init_call_expr_arg_iterator): New.
(next_call_expr_arg): New.
(first_call_expr_arg): New.
(more_call_expr_args_p): New.
(FOR_EACH_CALL_EXPR_ARG): New.
* tree.c (tree_code_class_string): Add entries for tcc_vl_exp
and tcc_gimple_stmt.
(tree_code_size): Update documentation. Use sizeof (tree) rather
than sizeof (char *).
(tree_size): Likewise. Add case for tcc_vl_exp.
(tree_node_structure): Add case for tcc_vl_exp.
(contains_placeholder_p): Likewise.
(substitute_in_expr): Likewise.
(substitute_placeholder_in_expr): Likewise.
(stabilize_reference_1): Likewise.
(build3_stat): Remove logic for CALL_EXPRs. Replace with assertion
to diagnose breakage of this interface for constructing CALL_EXPRs.
(build_nt): Add similar assertion here.
(build_nt_call_list): New.
(simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors.
(iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
(get_callee_fndecl): Use new CALL_EXPR accessors.
(tree_operand_check_failed): Change parameters to pass entire node
instead of its code, so that we can call TREE_OPERAND_LENGTH on it.
(process_call_operands): New.
(build_vl_exp_stat): New.
(build_call_list): New.
(build_call_nary): New.
(build_call_valist): New.
(build_call_array): New.
(walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
(call_expr_arglist): New.
* tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use
tcc_vl_exp instead of a fixed-size tcc_expression.
* doc/c-tree.texi (CALL_EXPR): Document new representation and
accessors for CALL_EXPRs.
(AGGR_INIT_EXPR): Likewise.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* builtins.c (c_strlen): Return NULL_TREE instead of 0.
(expand_builtin_nonlocal_goto): Change parameter to be entire
CALL_EXPR instead of an arglist. Use new CALL_EXPR accessors.
(expand_builtin_prefetch): Likewise.
(expand_builtin_classify_type): Likewise.
(mathfn_built_in): Return NULL_TREE instead of 0.
(expand_errno_check): Use new CALL_EXPR accessors.
(expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors.
Return NULL_RTX instead of 0.
(expand_builtin_mathfn_2): Likewise.
(expand_builtin_mathfn_3): Likewise.
(expand_builtin_interclass_mathfn): Likewise.
(expand_builtin_sincos): Likewise.
(expand_builtin_cexpi): Likewise.
(expand_builtin_int_roundingfn): Likewise.
(expand_builtin_int_roundingfn_2): Likewise.
(expand_builtin_pow): Likewise.
(expand_builtin_powi): Likewise.
(expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead
of arglist, fixing callers appropriately. Use new CALL_EXPR
accessors and constructors. Return NULL_RTX instead of 0.
(expand_builtin_strstr): Likewise.
(expand_builtin_strchr): Likewise.
(expand_builtin_strrchr): Likewise.
(expand_builtin_strpbrk): Likewise.
(expand_builtin_memcpy): Likewise.
(expand_builtin_mempcpy): Likewise.
(expand_builtin_mempcpy_args): New.
(expand_builtin_memmove): Similarly to expand_builtin_mempcpy.
(expand_builtin_memmove_args): New.
(expand_builtin_bcopy): Similarly to expand_builtin_mempcpy.
(expand_movstr): Likewise.
(expand_builtin_strcpy): Likewise.
(expand_builtin_strcpy_args): New.
(expand_builtin_stpcpy): Similarly to expand_builtin_strcpy.
(expand_builtin_strncpy): Likewise.
(expand_builtin_memset): Likewise.
(expand_builtin_memset_args): New.
(expand_builtin_bzero): Similarly to expand_builtin_memset.
(expand_builtin_memcmp): Likewise.
(expand_builtin_strcmp): Likewise.
(expand_builtin_strncmp): Likewise.
(expand_builtin_strcat): Likewise.
(expand_builtin_strncat): Likewise.
(expand_builtin_strspn): Likewise.
(expand_builtin_strcspn): Likewise.
(expand_builtin_args_info): Likewise.
(expand_builtin_va_start): Likewise.
(gimplify_va_arg_expr): Likewise.
(expand_builtin_va_end): Likewise.
(expand_builtin_va_copy): Likewise.
(expand_builtin_frame_address): Likewise.
(expand_builtin_alloca): Likewise.
(expand_builtin_bswap): Likewise.
(expand_builtin_unop): Likewise.
(expand_builtin_fputs): Likewise.
(expand_builtin_expect): Likewise.
(expand_builtin_fabs): Likewise.
(expand_builtin_copysign): Likewise.
(expand_builtin_printf): Likewise.
(expand_builtin_fprintf): Likewise.
(expand_builtin_sprintf): Likewise.
(expand_builtin_init_trampoline): Likewise.
(expand_builtin_signbit): Likewise.
(expand_builtin_fork_or_exec): Likewise.
(expand_builtin_sync_operation): Likewise.
(expand_builtin_compare_and_swap): Likewise.
(expand_builtin_lock_test_and_set): Likewise.
(expand_builtin_lock_release): Likewise.
(expand_builtin): Likewise.
(builtin_mathfn_code): Likewise.
(fold_builtin_constant_p): Pass call arguments individually instead
of as an arglist, fixing callers appropriately. Use new CALL_EXPR
accessors and constructors. Return NULL_TREE instead of 0.
(fold_builtin_expect): Likewise.
(fold_builtin_classify_type): Likewise.
(fold_builtin_strlen): Likewise.
(fold_builtin_nan): Likewise.
(integer_valued_real_p): Likewise.
(fold_trunc_transparent_mathfn): Likewise.
(fold_fixed_mathfn): Likewise.
(fold_builtin_cabs): Likewise.
(fold_builtin_sqrt): Likewise.
(fold_builtin_cbrt): Likewise.
(fold_builtin_cos): Likewise.
(fold_builtin_cosh): Likewise.
(fold_builtin_tan): Likewise.
(fold_builtin_sincos): Likewise.
(fold_builtin_cexp): Likewise.
(fold_builtin_trunc): Likewise.
(fold_builtin_floor): Likewise.
(fold_builtin_ceil): Likewise.
(fold_builtin_round): Likewise.
(fold_builtin_int_roundingfn): Likewise.
(fold_builtin_bitop): Likewise.
(fold_builtin_bswap): Likewise.
(fold_builtin_logarithm): Likewise.
(fold_builtin_hypot): Likewise.
(fold_builtin_pow): Likewise.
(fold_builtin_powi): Likewise.
(fold_builtin_exponent): Likewise.
(fold_builtin_memset): Likewise.
(fold_builtin_bzero): Likewise.
(fold_builtin_memory_op): Likewise.
(fold_builtin_bcopy): Deleted; call site changed to invoke
fold_builtin_memory_op directly.
(fold_builtin_strcpy): Similarly as for fold_builtin_memory_op.
(fold_builtin_strncpy): Likewise.
(fold_builtin_memcmp): Likewise.
(fold_builtin_strcmp): Likewise.
(fold_builtin_strncmp): Likewise.
(fold_builtin_signbit): Likewise.
(fold_builtin_copysign): Likewise.
(fold_builtin_isascii): Likewise.
(fold_builtin_toascii): Likewise.
(fold_builtin_isdigit): Likewise.
(fold_builtin_fabs): Likewise.
(fold_builtin_abs): Likewise.
(fold_builtin_fmin_fmax): Likewise.
(fold_builtin_carg): Likewise.
(fold_builtin_classify): Likewise.
(fold_builtin_unordered_cmp): Likewise.
(fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4):
New functions split out from fold_builtin_1.
(fold_builtin_n): New.
(fold_builtin_varargs): New.
(fold_builtin): Deleted. Most callers changed to use fold_call_expr
instead.
(fold_call_expr): New.
(build_function_call_expr): Rewrite to use new helper function.
(fold_builtin_call_list): New.
(build_call_expr): New.
(fold_builtin_call_valist): New.
(rewrite_call_expr): New.
(validate_arg): New.
(validate_arglist): Change parameter to be entire CALL_EXPR instead
of an arglist. Change return type to bool. Use new CALL_EXPR
accessors.
(fold_builtin_strstr): Pass call arguments individually instead
of as an arglist, fixing callers appropriately. Use new CALL_EXPR
accessors and constructors. Return NULL_TREE instead of 0.
(fold_builtin_strchr): Likewise.
(fold_builtin_strrchr): Likewise.
(fold_builtin_strpbrk): Likewise.
(fold_builtin_strcat): Likewise.
(fold_builtin_strncat): Likewise.
(fold_builtin_strspn): Likewise.
(fold_builtin_strcspn): Likewise.
(fold_builtin_fputs): Likewise.
(fold_builtin_next_arg): Likewise.
(fold_builtin_sprintf): Likewise.
(expand_builtin_object_size): Use new CALL_EXPR accessors. Use
NULL_RTX instead of 0.
(expand_builtin_memory_chk): Likewise.
(maybe_emit_chk_warning): Likewise.
(maybe_emit_sprintf_chk_warning): Likewise.
(fold_builtin_object_size): Pass call arguments individually instead
of as an arglist, fixing callers appropriately. Use new CALL_EXPR
accessors and constructors. Return NULL_TREE instead of 0.
(fold_builtin_memory_chk): Likewise.
(fold_builtin_stxcpy_chk): Likewise.
(fold_builtin_strncpy_chk): Likewise.
(fold_builtin_strcat_chk): Likewise.
(fold_builtin_strcat_chk): Likewise.
(fold_builtin_strncat_chk): Likewise.
(fold_builtin_sprintf_chk): Likewise.
(fold_builtin_snprintf_chk): Likewise.
(fold_builtin_printf): Likewise.
(fold_builtin_vprintf): Likewise.
* fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and
constructors.
(operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case.
(make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
(extract_muldiv_1): Add VL_EXP_CLASS_P case.
(fold_mathfn_compare): Use new CALL_EXPR accessors and constructors.
(fold_unary): Likewise.
(fold_binary): Likewise.
(fold_ternary): Remove CALL_EXPR case, since they are no longer
ternary expressions.
(fold): Add logic for tcc_vl_exp.
(fold_checksum_tree): Make it know about tcc_vl_exp. Use
TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
(fold_build3_stat): Add assertion to flag broken interface for
constructing CALL_EXPRs.
(fold_build_call_list): New.
(fold_build_call_list_initializer): New.
(tree_expr_nonnegative_p): Use new CALL_EXPR accessors and
constructors.
(fold_strip_sign_ops): Likewise.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR
accessors and dump arguments explicitly.
* tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
(dump_generic_node): Use new CALL_EXPR accessors and walk arguments
explicitly.
(print_call_name): Use new CALL_EXPR accessors.
* print-tree.c (print_node): Add case tcc_vl_exp. Print
CALL_EXPR arguments explicitly instead of as a list. Use
TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
* tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors.
(vrp_visit_stmt): Likewise.
* tree-ssa-loop-im.c (outermost_invariant_loop_expr): Make it
know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
(force_move_till_expr): Likewise.
* targhooks.c (default_external_stack_protect_fail): Use
build_call_expr instead of build_function_call_expr.
(default_hidden_stack_protect_fail): Likewise.
* tree-complex.c (expand_complex_libcall): Use build_call_expr to
build the call.
* cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors
and walk arguments explicitly.
* tree-ssa-loop-niter.c (simplify_replace_tree): Use
TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
(expand_simple_operations): Likewise.
(infer_loop_bounds_from_array): Use new CALL_EXPR accessors.
* gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead
of TREE_CODE_LENGTH.
(walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs.
* optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
* value_prof.c (tree_ic): Use new CALL_EXPR accessors.
(tree_ic_transform): Likewise.
(interesting_stringop_to_profile_p): Pass entire CALL_EXPR as
parameter instead of arglist. Fix callers.
(tree_stringop_fixed_value): Use new CALL_EXPR accessors.
(tree_stringops_transform): Likewise.
(tree_indirect_call_to_profile): Likewise.
(tree_stringops_values_to_profile): Likewise.
* tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator.
(eliminate_tail_call): Likewise.
* ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors.
* tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
Use TREE_OPERAND_LENGTH and generalize to handle any number of
operands.
(instantiate_parameters_1): Can't handle tcc_vl_exp here.
* omp-low.c (build_omp_barrier): Use build_call_expr.
(lower_rec_input_clauses): Likewise.
(lower_reduction_clauses): Likewise.
(expand_parallel_call): Likewise.
(maybe_catch_exception): Likewise.
(expand_omp_for_generic): Likewise.
(expand_omp_for_static_nochunk): Likewise.
(expand_omp_sections): Likewise.
(lower_omp_single_simple): Likewise.
(lower_omp_single_copy): Likewise.
(lower_omp_master): Likewise.
(lower_omp_ordered): Likewise.
(lower_omp_critical): Likewise.
* ipa-reference.c (check-call): Use new CALL_EXPR iterator.
(scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR.
* tree-gimple.c (is_gimple_call_addr): Fix doc.
(recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH. Add tcc_vl_exp case.
* tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH
and generalize to handle any number of operands.
(chrec_contains_undetermined): Likewise.
(tree_contains_chrecs): Likewise.
(evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH.
* cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors.
* tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors. Use
fold_call_expr instead of fold_builtin.
(ccp_fold_builtin): Likewise. Update calls into builtins.c to
match declarations there.
(fold_stmt): Use new CALL_EXPR constructor and accessors. Doc
updates.
* tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use
TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
* ipa-pure-const.c (check_call): Use new CALL_EXPR accessors.
(scan_function): Add case tcc_vl_exp for CALL_EXPR.
* tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR
accessors.
* tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr.
(execute_cse_sincos): Use new CALL_EXPR accessors.
* tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator.
* gimple-low.c (lower_function_body): Use build_call_expr.
(lower_builtin_setjmp): Likewise.
* expr.c (emit_block_move_via_libcall): Use build_call_expr.
(set_storage_via_libcall): Likewise.
(safe_from_p): Add tcc_vl_exp case. Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
(expand_expr_real_1): Use new CALL_EXPR accessors.
* tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and
generalize to handle any number of operands.
(TB_parent_eq): Likewise.
* predict.c (expr_expected_value): Use new CALL_EXPR accessors.
(strip_builtin_expect): Likewise.
* function.c (gimplify_parameters): Use build_call_expr.
* tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
* ipa-type-escape.c (check_call): Use new CALL_EXPR iterators.
(scan_for_refs): Add case tcc_vl_exp for CALL_EXPR.
* tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR
iterators.
* gimplify.c (build_stack_save_restore): Use build_call_expr.
(gimplify_decl_expr): Likewise.
(gimplify_call_expr): Use fold_call_expr instead of fold_builtin.
Use new CALL_EXPR iterators.
(gimplify_modify_expr_to_memcpy): Use build_call_expr.
(gimplify_modify_expr_to_memset): Likewise.
(gimplify_variable_sized_compare): Likewise.
(gimplify_omp_atomic_fetch_op): Likewise.
(gimplify_omp_atomic_pipeline): Likewise.
(gimplify_omp_atomic_mutex): Likewise.
(gimplify_function_tree): Likewise.
* calls.c (alloca_call_p): Use new CALL_EXPR accessors.
(call_expr_flags): Likewise.
(expand_call): Likewise.
* except.c (expand_builtin_eh_return_data_regno): Pass entire
CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR
accessors.
* coverage.c (create_coverage): Use build_call_expr.
* tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete.
(temp_call_expr_obstack): New.
(pool_copy_list): Delete.
(temp_copy_call_expr): New.
(phi_translate): Add case tcc_vl_exp for CALL_EXPR. Use new
CALL_EXPR accessors. Get rid of special goo for copying argument
lists and use temp_copy_call_expr instead.
(valid_in_sets): Add case tcc_vl_exp for CALL_EXPR. Use new
CALL_EXPR accessors.
(create_expression_by_pieces): Likewise. Use build_call_array
to construct the result instead of fold_build3.
(create_value_expr_from): Add tcc_vl_exp. Delete special goo for
dealing with argument lists.
(init_pre): Remove references to expression_node_pool and
list_node_pool. Init temp_call_expr_obstack instead.
(fini_pre): Remove references to expression_node_pool and
list_node_pool.
* tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors
and walk arguments explicitly instead of as a list.
* tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr.
(mx_register_decls): Likewise.
(mudflap_register_call): Likewise.
(mudflap_finish_file): Likewise.
* ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors.
(ipa_callsite_compute_param): Likewise.
* tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR
accessors and constructor.
* tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR
accessors and constructor.
(convert_tramp_reference): Likewise.
(convert_call_expr): Likewise.
(finalize_nesting_tree_1): Likewise.
* tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR
accessors.
* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr.
* tree-inline.c (initialize_inlined_parameters): Pass entire
CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR
accessors.
(estimate_num_insns_1): Use new CALL_EXPR accessors.
(expand_call_inline): Tidy up call to initialize_inlined_parameters.
* tree-vect-transform.c (vect_create_epilog_for_reduction): Use
TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
(vectorizable_reduction): Likewise.
(vectorizable_call): Use new CALL_EXPR iterators.
(vectorizable_conversion): Use build_call_expr.
(vectorizable_operation): Use TREE_OPERAND_LENGTH.
(vect_gen_widened_results_half): Use build_call_expr.
(vect_setup_realignment): Likewise.
(vectorizable_live_operation): Use TREE_OPERAND_LENGTH.
* tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors.
(pass_through_call): Likewise.
(compute_object_sizes): Likewise. Use fold_call_expr instead of
fold_builtin.
* tree-profile.c (tree_gen_interval_profiler): Use build_call_expr.
(tree_gen_pow2_profiler): Likewise.
(tree_gen_one_value_profiler): Likewise.
(tree_gen_ic_func_profiler): Likewise.
(tree_gen_average_profiler): Likewise.
(tree_gen_ior_profiler): Likewise.
* tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp.
(find_func_aliases): Use new CALL_EXPR accessors. Add case
tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
* tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead
of TREE_CODE_LENGTH.
* stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead
of TREE_CODE_LENGTH.
* convert.c (convert_to_real): Use new CALL_EXPR accessors and
constructor.
(convert_to_integer): Likewise.
* tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR
accessors.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR
accessors.
* config/frv/frv.c (frv_expand_builtin): Likewise.
* config/s390/s390.c (s390_expand_builtin): Likewise.
* config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr.
(sparc_expand_builtin): Use new CALL_EXPR accessors.
* config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise.
(ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter
instead of arglist. Use new CALL_EXPR accessors on it. Fix callers.
(ix86_expand_store_builtin): Likewise.
(ix86_expand_unop_builtin): Likewise.
(ix86_expand_unop1_builtin): Likewise.
(ix86_expand_sse_compare): Likewise.
(ix86_expand_sse_comi): Likewise.
(ix86_expand_vec_init_builtin): Likewise.
(ix86_expand_vec_ext_builtin): Likewise.
(ix86_expand_vec_set_builtin): Likewise.
(ix86_expand_builtin): Use new CALL_EXPR accessors.
* config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors.
* config/c4x/c4x.c (c4x_expand_builtin): Likewise.
* config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR
instead of arglist. Use new CALL_EXPR accessors. Fix callers.
(iq2000_expand_builtin): Use new CALL_EXPR accessors.
* config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use
build_call_expr.
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise.
(rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of
arglist. Use new CALL_EXPR accessors. Fix callers.
(altivec_expand_abs_builtin): Likewise.
(rs6000_expand_binop_builtin): Likewise.
(altivec_expand_predicate_builtin): Likewise.
(altivec_expand_lv_builtin): Likewise.
(spe_expand_stv_builtin): Likewise.
(altivec_expand_stv_builtin): Likewise.
(rs6000_expand_ternop_builtin): Likewise.
(altivec_expand_ld_builtin): Use new CALL_EXPR accessors.
(altivec_expand_st_builtin): Likewise.
(altivec_expand_dst_builtin): Likewise.
(altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of
arglist. Use new CALL_EXPR accessors. Fix callers.
(altivec_expand_vec_set_builtin): Likewise.
(altivec_expand_vec_ext_builtin): Likewise.
(altivec_expand_builtin): Use new CALL_EXPR accessors.
(spe_expand_builtin): Likewise.
(spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of
arglist. Use new CALL_EXPR accessors. Fix callers.
(spe_expand_evsel_builtin): Likewise.
(rs6000_expand_builtin): Use new CALL_EXPR accessors. VCFUX and
FCFSX cases must construct whole new CALL_EXPR, not just arglist.
* config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR
instead of arglist. Use new CALL_EXPR accessors. Fix callers.
(arm_expand_unop_builtin): Likewise.
(arm_expand_builtin): Use new CALL_EXPR accessors.
* config/mips/mips.c (mips_expand_builtin): Use new CALL_EXPR
accessors.
* config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR
instead of arglist. Use new CALL_EXPR accessors. Fix callers.
(bfin_expand_unop_builtin): Likewise.
(bfin_expand_builtin): Use new CALL_EXPR accessors.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* c-semantics.c (build_stmt): Add internal diagnostic check.
* c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR
accessors. Print arguments explicitly instead of as a list.
* c-typeck.c (build_function_call): Use new CALL_EXPR constructors.
* c-omp.c (c_finish_omp_barrier): Use build_call_expr.
(c_finish_omp_flish): Likewise.
* c-common.c (verify_tree): Use new CALL_EXPR accessors. Traverse
arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
(check_function_arguments_recurse): Use new CALL_EXPR accessors.
(c_warn_unused_result): Likewise.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
Change class to tcc_vl_exp.
* call.c (build_call): Use build_call_list instead
of build3.
(build_over_call): Likewise.
(build_new_method_call): Use build_min_non_dep_call_list
instead of build_min_non_dep.
* error.c (dump_call_expr_args): New function.
(dump_aggr_init_expr_args): New function.
(dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
* cvt.c (convert_to_void): Use build_call_array instead
of build3; use new AGGR_INIT_EXPR accessor macros.
* mangle.c (write_expression): Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
* dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
AGGR_INIT_EXPR accessor macros.
* cp-gimplify.c (cp_gimplify_init_expr): Use
AGGR_INIT_EXPR_SLOT to set the slot operand.
* cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
(AGGR_INIT_EXPR_SLOT): New macro.
(AGGR_INIT_EXPR_ARG): New macro.
(aggr_init_expr_nargs): New macro.
(AGGR_INIT_EXPR_ARGP): New macro.
(aggr_init_expr_arg_iterator): New.
(init_aggr_init_expr_arg_iterator): New.
(next_aggr_init_expr_arg): New.
(first_aggr_init_expr_arg): New.
(more_aggr_init_expr_args_p): New.
(FOR_EACH_AGGR_INIT_EXPR_ARG): New.
(stabilize_aggr_init): New declaration.
(build_min_non_dep_call_list): Likewise.
* tree.c (process_aggr_init_operands): New function.
(build_aggr_init_array) New function.
(build_cplus_new): Update to use new CALL_EXPR and
AGGR_INIT_EXPR accessor macros. Replace use of build3 with
build_aggr_init_array.
(build_min_non_dep_call_list) New function.
(build_min_nt): Assert input code parameter is not a variable
length expression class.
(build_min, build_min_non_dep): Likewise.
(cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
to check for equality instead of recursing. Handle tcc_vl_exp
tree code classes.
(stabilize_call): Update to only handle CALL_EXPRs, not
AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
(stabilize_aggr_init): New function.
(stabilize_init): Use it.
* cxx-pretty-print.c (pp_cxx_postfix_expression)
<AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
AGGR_INIT_EXPR accessor macros and argument iterators.
* pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
build_vl_exp. Iterate through the operands, recursively
processing each one.
(tsubst_copy_and_build) <CALL_EXPR>: Update to use new
CALL_EXPR accessor macros.
(value_dependent_expression_p) <default>: Handle tcc_vl_exp
tree code classes. Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
* semantics.c (finish_call_expr): Use build_nt_call_list
instead of build_nt.
(simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
accessor macros. Use build_call_array to construct the
CALL_EXPR node instead of build3
* decl2.c (build_offset_ref_call_from_tree): Use
build_nt_call_list and build_min_non_dep_call_list instead
of build_min_nt and build_min_non_dep.
* parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
Use build_nt_call_list instead of build_min_nt.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
of build3.
(BUILD_MONITOR_EXIT): Likewise.
* java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
(java_gimplify_modify_expr): Likewise.
* class.c (cache_this_class_ref): Use build_call_expr.
(build_static_field_ref): Likewise.
(emit_indirect_register_classes): Likewise.
(emit_register_classes): Likewise.
* resource.c (write_resource_constructor): Use build_call_expr.
* builtins.c (builtin_creator_function): Change interpretation of
the second parameter to be the whole CALL_EXPR instead of the arglist.
(max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
(min_builtin): Likewise.
(abs_builtin): Likewise.
(java_build_function_call_expr): Likewise.
(convert_real): Likewise.
(UNMARSHAL3): Likewise.
(UNMARSHAL4): Likewise.
(UNMARSHAL5): Likewise.
(build_arglist_for_builtin): Delete. Fix callers to use
build_call_expr instead.
(putObject_builtin): Tweak parameter list. Use new CALL_EXPR
accessors.
(compareAndSwapInt_builtin): Likewise.
(compareAndSwapLong_builtin): Likewise.
(compareAndSwapObject_builtin): Likewise.
(putVolatile_builtin): Likewise.
(getVolatile_builtin): Likewise.
(VMSupportsCS8_builtin): Likewise.
(check_for_builtin): Pass entire CALL_EXPR to builtin expander
instead of arglist.
* expr.c (build_java_athrow): Use build_call_nary instead of build3.
(build_java_throw_out_of_bounds_exception): Likewise.
(java_check_reference): Likewise.
(build_java_arraystore_check): Likewise.
(build_newarray): Likewise.
(build_anewarray): Likewise.
(expand_java_multinewarray): Use build_call_list instead of build3.
(build_java_monitor): Use build_call_nary instead of build3.
(java_create_object): Likewise.
(expand_java_NEW): Likewise.
(build_instanceof): Likewise.
(expand_java_CHECKCAST): Likewise.
(build_java_soft_divmod): Likewise.
(build_java_binop): Likewise.
(build_field_ref): Likewise.
(build_class_init): Likewise.
(rewrite_arglist_getcaller): Use build_call_expr.
(build_invokeinterface): Use build_call_nary instead of build3.
(expand_invoke): Use build_call_list instead of build3.
(build_jni_stub): Use build_call_nary, build_call_list, or
build_call_expr instead of build3.
(expand_java_field_op): Use build_call_expr instead of build3.
(force_evaluation_order): Use new CALL_EXPR accessors.
* lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
(objc_get_callee_fndecl): Likewise.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* trans-expr.c (gfc_conv_power_op): Use build_call_expr.
(gfc_conv_string_tmp): Likewise.
(gfc_conv_concat_op): Likewise.
(gfc_build_compare_string): Likewise.
(gfc_conv_function_call): Use build_call_list instead of build3.
* trans-array.c (gfc_trans_allocate_array_storage): Use
build_call_expr.
(gfc_grow_array): Likewise.
(gfc_trans_array_ctor_element): Likewise.
(gfc_trans_array_constructor_value): Likewise.
(gfc_array_allocate): Likewise.
(gfc_array_deallocate): Likewise.
(gfc_trans_auto_array_allocation): Likewise.
(gfc_trans_dummy_array_bias): Likewise.
(gfc_conv_array_parameter): Likewise.
(gfc_trans_dealloc_allocated): Likewise.
(gfc_duplicate_allocatable): Likewise.
* trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
(gfc_trans_omp_flush): Likewise.
* trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
(gfc_trans_pause): Likewise.
(gfc_trans_stop): Likewise.
(gfc_trans_character_select): Likewise.
(gfc_do_allocate): Likewise.
(gfc_trans_assign_need_temp): Likewise.
(gfc_trans_pointer_assign_need_temp): Likewise.
(gfc_trans_forall_1): Likewise.
(gfc_trans_where_2): Likewise.
(gfc_trans_allocate): Likewise.
(gfc_trans_deallocate): Likewise.
* trans.c (gfc_trans_runtime_check): Use build_call_expr.
* trans-io.c (gfc_trans_open): Use build_call_expr.
(gfc_trans_close): Likewise.
(build_filepos): Likewise.
(gfc_trans_inquire): Likewise.
(NML_FIRST_ARG): Delete.
(NML_ADD_ARG): Delete.
(transfer_namelist_element): Use build_call_expr.
(build_dt): Likewise.
(gfc_trans_dt_end): Likewise.
(transfer_expr): Likewise.
(transfer_array-desc): Likewise.
* trans-decl.c (gfc_generate_function_code): Use build_call_expr.
(gfc_generate_constructors): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
(gfc_conv_intrinsic_fdate): Likewise.
(gfc_conv_intrinsic_ttynam): Likewise.
(gfc_conv_intrinsic_array_transfer): Likewise.
(gfc_conv_associated): Likewise.
(gfc_conv_intrinsic_si_kind): Likewise.
(gfc_conv_intrinsic_trim): Likewise.
(gfc_conv_intrinsic_repeat: Likewise.
(gfc_conv_intrinsic_iargc): Likewise.
Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com>
Co-Authored-By: Lee Millward <lee.millward@codesourcery.com>
From-SVN: r122018
|
|
* Makefile.in (passes.o, ipa-inline.o): Add dependencies.
* 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.
From-SVN: r121780
|
|
* tree-pass.h (pass_build_cgraph_edges): Declare.
* cgraphunit.c (record_refernece): Move to cgraphbuild.c
(visited_nodes): Remove.
(cgraph_create_edges): Move to cgraphbuild.c; rename to
build_cgrpah_edges; make visited_nodes local.
(cgraph_process_new_functions): DO not call initialize_inline_failed.
(record_references_in_initializer): Move to cgraphbuild.c
(initialize_inline_failed, rebuild_cgraph_edges,
pass_rebuild_cgraph_edges): Move to cgraphbuild.c.
(verify_cgraph_node): Make visited_nodes local.
(cgraph_analyze_function): Do not call cgraph_create_edges and
initialize_inline_failed.
(cgraph_expand_function): Do not call cgraph_lower_function;
assert that function is already lowered.
* Makefile.in (cgraphbuild.o): New.
* passes.c (init_optimization_passes): Add pass_build_cgraph_edges
at the end of lowering passes.
From-SVN: r120527
|