1. 08 Jan, 2008 1 commit
    • re PR tree-optimization/34683 (SSA rewriting in the loop unroller causes quadratic behavior) · a9990582
      2008-01-08  Richard Guenther  <rguenther@suse.de>
      
      	PR tree-optimization/34683
      	* tree-ssa-operands.c (operand_build_cmp): Export.
      	* tree-ssa-operands.h (operand_build_cmp): Declare.
      	* tree-vn.c (vuses_compare): Remove.
      	(sort_vuses): Use operand_build_cmp.
      	(sort_vuses_heap): Likewise.
      	* tree-ssa-sccvn.c (vuses_to_vec): Use VEC_reserve, not VEC_alloc
      	to re-use old VEC if available.  Do not sort already sorted VUSEs.
      	(vdefs_to_vec): Do not sort already sorted VDEFs.
      
      From-SVN: r131400
      Richard Guenther committed
  2. 26 Aug, 2007 1 commit
  3. 26 Jul, 2007 1 commit
  4. 12 Jul, 2007 1 commit
    • re PR tree-optimization/32663 (revision 126369 went into an infinite loop) · c5830edf
      2007-07-11  Daniel Berlin  <dberlin@dberlin.org>
      
      	PR tree-optimization/32663
      	
      	* tree.h (VALUE_HANDLE_VUSES): Remove.
      	(struct tree_value_handle): Remove vuses.
      
      	* tree-vn.c (create_value_handle_for_expr): Don't set
      	VALUE_HANDLE_VUSES. 
      
      	* tree-ssa-pre.c (expression_vuses): New.
      	(alloc_expression_id): Set up expression_vuses.
      	(get_expression_vuses): New.
      	(set_expression_vuses): Ditto.
      	(clear_expression_ids): Modify for expression_vuses.
      	(phi_translate_1): Ditto.
      	(phi_translate_set): Ditto.
      	(value_dies_in_block_x): Ditto
      	(valid_in_sets): Ditto.
      	(add_to_sets): Ditto.
      	(find_existing_value_expr): Ditto.
      	(create_value_handle_for_expr): Ditto.
      	(make_values_for_stmt): Ditto.
      	(vuse_equiv): Remove.
      
      From-SVN: r126568
      Daniel Berlin committed
  5. 07 Jul, 2007 2 commits
    • Revert (note the sccvn portions are *not* reverted) 2007-07-06 Daniel Berlin <dberlin@dberlin.org> · b71b4522
      2007-07-07  Daniel Berlin  <dberlin@dberlin.org>
      
      	Revert (note the sccvn portions are *not* reverted)
      	2007-07-06  Daniel Berlin  <dberlin@dberlin.org>
      
      	Fix PR tree-optimization/23488
      
      	* tree-vn.c (set_value_handle): Use decl_vh_map for decl value
      	handles.
      	* tree-flow-inline.h (get_value_handle): Ditto.
      	* tree-ssa-pre.c (decl_vh_map): New.
      	(decl_node_pool): New.
      	(can_value_number_operation): Support DECL_P.
      	(can_PRE_operation): Ditto.
      	(create_expression_by_pieces): Ditto.
      	(find_existing_value_expr): Modify to differnetiate between
      	addressing and top level.
      	(create_value_handle_for_expr): Handle DECL's.
      	(poolify_tree): Ditto.
      	(make_values_for_phi): Don't insert into PHI_GEN during FRE.
      	(make_values_for_stmt): Handle DECL's properly.
      	(init_pre): Reorg to not init useless things during FRE.
      	(fini_pre): Ditto.
      	* tree-flow.h: Include pointer-set.h.
      	(decl_vh_map): Declare.
      	* Makefile.in (TREE_FLOW_H): Add pointer-set.h
      
      From-SVN: r126449
      Daniel Berlin committed
    • re PR middle-end/23488 (GCSE load PRE does not work with non sets (or missing… · e9bd9cf3
      re PR middle-end/23488 (GCSE load PRE does not work with non sets (or missing load PRE with plain decls))
      
      2007-07-06  Daniel Berlin  <dberlin@dberlin.org>
      
      	Fix PR tree-optimization/23488
      
      	* tree-ssa-sccvn.c (expr_has_constants): Handle tcc_declaration.
      	(try_to_simplify): Ditto.
      	(visit_use): Ditto.
      	* tree-vn.c (set_value_handle): Use decl_vh_map for decl value
      	handles.
      	* tree-flow-inline.h (get_value_handle): Ditto.
      	* tree-ssa-pre.c (decl_vh_map): New.
      	(decl_node_pool): New.
      	(can_value_number_operation): Support DECL_P.
      	(can_PRE_operation): Ditto.
      	(create_expression_by_pieces): Ditto.
      	(find_existing_value_expr): Modify to differnetiate between
      	addressing and top level.
      	(create_value_handle_for_expr): Handle DECL's.
      	(poolify_tree): Ditto.
      	(make_values_for_phi): Don't insert into PHI_GEN during FRE.
      	(make_values_for_stmt): Handle DECL's properly.
      	(init_pre): Reorg to not init useless things during FRE.
      	(fini_pre): Ditto.
      	* tree-flow.h: Include pointer-set.h.
      	(decl_vh_map): Declare.
      	* Makefile.in (TREE_FLOW_H): Add pointer-set.h
      
      From-SVN: r126434
      Daniel Berlin committed
  6. 02 Jul, 2007 1 commit
    • re PR middle-end/15988 (ICE in fold_convert with pointer-to-member-function) · f4088621
      2007-07-02  Richard Guenther  <rguenther@suse.de>
      
      	* tree-flow.h (types_compatible_p): Declare.
      	* tree-ssa.c (types_compatible_p): New function.
      	* ipa-type-escape.c (discover_unique_type): Use
      	types_compatible_p instead of lang_hooks.types_compatible_p.
      	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
      	* tree-vn.c (expressions_equal_p): Likewise.
      	* tree.c (fields_compatible_p): Likewise.
      	* tree-ssa-dom.c (avail_expr_eq): Likewise.
      	(cprop_operand): Use useless_type_conversion_p instead of
      	lang_hooks.types_compatible_p.
      	* tree-inline.c (setup_one_parameter): Likewise.
      	(declare_return_variable): Likewise.
      	* tree-nrv.c (tree_nrv): Likewise.
      	* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Likewise.
      	(maybe_fold_offset_to_component_ref): Likewise.
      	(maybe_fold_offset_to_reference): Likewise.
      	* tree-ssa-copy.c (may_propagate_copy): Likewise.
      	(merge_alias_info): Likewise.
      	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise.
      	* tree-ssa-phiopt.c (conditional_replacement): Likewise.
      	* tree-ssa-reassoc.c (optimize_ops_list): Likewise.
      	* tree-tailcall.c (find_tail_calls): Likewise.
      	* tree-vect-generic.c (expand_vector_operations_1): Likewise.
      	* gimplify.c (canonicalize_addr_expr): Likewise.
      	(fold_indirect_ref_rhs): Likewise.
      	(gimplify_addr_expr): Likewise.  Swap parameters to cpt_same_type.
      	(cpt_same_type): Likewise.
      	(check_pointer_types_r): Swap parameters to cpt_same_type
      	where appropriate.
      	* fold-const.c (fold_convert): Revert fix for PR15988.
      	* tree-inline.c (setup_one_parameter): Instead fix it here by
      	using fold_build1 instead of fold_convert and checking for
      	error_mark_node.  Convert only if the conversion is necessary.
      
      From-SVN: r126198
      Richard Guenther committed
  7. 30 Jun, 2007 1 commit
    • Fix PR tree-optimization/32540 Fix PR tree-optimization/31651 · 89fb70a3
      2007-06-30  Daniel Berlin  <dberlin@dberlin.org>
      	
      	Fix PR tree-optimization/32540
      	Fix PR tree-optimization/31651
      
      	* tree-ssa-sccvn.c: New file.
      
      	* tree-ssa-sccvn.h: Ditto.
      	
      	* tree-vn.c: Include tree-ssa-sccvn.h
      	(val_expr_paid_d): Removed.
      	(value_table): Ditto.
      	(vn_compute): Ditto.
      	(val_expr_pair_hash): Ditto.
      	(val_expr_pair_expr_eq): Ditto.
      	(copy_vuses_from_stmt): Ditto.
      	(vn_delete): Ditto.
      	(vn_init): Ditto.
      	(shared_vuses_from_stmt): Ditto.
      	(print_creation_to_file): Moved up.
      	(sort_vuses): Ditto.
      	(sort_vuses_heap): Ditto.
      	(set_value_handle): Make non-static.
      	(make_value_handle): Ditto.
      	(vn_add): Rewritten to use sccvn lookups.
      	(vn_add_with_vuses): Ditto.
      	(vn_lookup): Ditto (and second argument removed).
      	(vn_lookup_with_vuses): Ditto.
      	(vn_lookup_or_add): Ditto (and second argument removed);
      	(vn_lookup_or_add_with_vuses): Ditto.
      	(vn_lookup_with_stmt): New.
      	(vn_lookup_or_add_with_stmt): Ditto.
      	(create_value_handle_for_expr): Ditto.
      
      	* tree-ssa-pre.c: Include tree-ssa-sccvn.h.
      	(seen_during_translate): New function.
      	(phi_trans_lookup): Use iterative_hash_expr, not vn_compute.
      	(phi_trans_add): Ditto.
      	(constant_expr_p): FIELD_DECL is always constant.
      	(phi_translate_1): Renamed from phi_translate, add seen bitmap.
      	Use constant_expr_p.
      	Avoid infinite recursion on mutually valued expressions.
      	Change callers of vn_lookup_or_add.
      	(phi_translate): New function.
      	(compute_antic_safe): Allow phi nodes.
      	(create_component_ref_by_pieces): Update for FIELD_DECL change.
      	(find_or_generate_expression): Rewrite slightly.
      	(create_expression_by_pieces): Updated for vn_lookup_or_add
      	change.
      	Update VN_INFO for new names.
      	(insert_into_preds_of_block): Update for new names.
      	(add_to_exp_gen): New function.
      	(add_to_sets): Use vn_lookup_or_add_with_stmt.
      	(find_existing_value_expr): Rewrite to changed vn_lookup.
      	(create_value_expr_from): Ditto, and use add_to_exp_gen.
      	(try_look_through_load): Removed.
      	(try_combine_conversion): Ditto.
      	(get_sccvn_value): New function.
      	(make_values_for_phi): Ditto.
      	(make_values_for_stmt): Ditto.
      	(compute_avail): Rewritten for vn_lookup_or_add changes and to use
      	SCCVN.
      	(init_pre): Update for SCCVN changes.
      	(fini_pre): Ditto.
      	(execute_pre): Ditto.
      
      	* tree-flow.h (make_value_handle): Declare.
      	(set_value_handle): Ditto.
      	(sort_vuses_heap): Ditto.
      	(vn_lookup_or_add_with_stmt): Ditto.
      	(vn_lookup_with_stmt): Ditto.
      	(vn_compute): Remove.
      	(vn_init): Ditto.
      	(vn_delete): Ditto.
      	(vn_lookup): Update arguments.
      
      	* Makefile.in (tree-ssa-pre.o): Add tree-ssa-sccvn.h
      	(tree-vn.o): Ditto.
      	(tree-ssa-sccvn.o): New.
      	(OBJS-common): Add tree-ssa-sccvn.o
      
      From-SVN: r126149
      Daniel Berlin committed
  8. 05 Dec, 2006 1 commit
  9. 30 Oct, 2006 1 commit
    • tree.h (tree_value_handle): Remove struct value_set declaration. · 83737db2
      2006-10-29  Daniel Berlin  <dberlin@dberlin.org>
      
      	* tree.h (tree_value_handle): Remove struct value_set declaration.	
      	Change value_set to bitmap_set.
      	* tree-pretty-print.c (dump_generic_node): Use has_stmt_ann.
      	* tree-vn.c (get_value_handle): Made inline and moved to
      	tree-flow-inline.h.
      	* tree-flow-inline.h: (has_stmt_ann): New function.
      	* tree-ssa-pre.c (expressions): New variable.
      	(next_expression_id): Ditto.
      	(alloc_expression_id): New function.
      	(struct value_set): Remove.
      	(get_expression_id): New function.
      	(get_or_alloc_expression_id): Ditto.
      	(expression_for_id): Ditto.
      	(clear_expression_ids): Ditto.
      	(FOR_EACH_EXPR_ID_IN_SET): New macro.
      	(bb_value_sets): Renamed to bb_bitmap_sets.
      	All value sets replaced with bitmap_sets.
      	Add visited member.
      	(BB_VISITED): New macro.
      	(postorder): New variable.
      	(add_to_value): Removed.
      	(value_exists_in_set_bitmap): Ditto.
      	(value_insert_into_set_bitmap): Ditto.
      	(set_new): Ditto.
      	(set_copy): Ditto.
      	(set_remove): Ditto.
      	(set_contains_value): Ditto.
      	(insert_into_set): Ditto.
      	(set_equal): Ditto.
      	(find_leader): Ditto.
      	(bitmap_set_subtract_from_value_set): Ditto.
      	(value_insert_into_set): Ditto.
      	(print_value_set): Ditto.
      	(debug_value_set): Ditto.
      	(constant_expr_p): New function.
      	(bitmap_remove_from_set): Ditto.
      	(bitmap_insert_into_set): Ditto.
      	(bitmap_set_free): Ditto.
      	(vh_compare): Ditto.
      	(sorted_array_from_bitmap_set): Ditto.
      	(bitmap_set_subtract): Ditto.
      	(bitmap_set_equal): Ditto.
      	(debug_bitmap_set): Ditto.
      	(find_leader_in_sets): Ditto.
      	(bitmap_set_replace_value): Modify for bitmapped sets.
      	(phi_translate): Ditto.
      	(phi_translate_set): Ditto.
      	(bitmap_find_leader): Ditto.
      	(valid_in_sets): Ditto.
      	(union_contains_value): Ditto.
      	(clean): Ditto.
      	(compute_antic_aux): Ditto.  Mark changed blocks.
      	(compute_antic): Ditto. Iterate in postorder and only over
      	changing blocks.
      	(compute_rvuse_and_antic_safe): Reuse postorder.
      	(create_component_ref_by_pieces): Modify for bitmapped sets.
      	(find_or_generate_expression): Ditto.
      	(create_expression_by_pieces): Ditto.
      	(insert_into_preds_of_block): Ditto.
      	(changed_blocks): New variable.
      	(do_regular_insertion): Broken out from insert_aux.
      	(insert_aux): Modified for bitmapped sets.
      	(find_existing_value_expr): New function.
      	(create_value_expr_from): Use it.
      	(insert_extra_phis): Removed.
      	(print_bitmap_set): Renamed from bitmap_print_value_set.
      	(compute_avail): Handle RETURN_EXPR.
      	(init_pre): Modify for bitmapped sets.
      	* tree-flow.h (has_stmt_ann): New function.
      
      From-SVN: r118169
      Daniel Berlin committed
  10. 12 Sep, 2006 1 commit
    • re PR middle-end/28071 (A file that can not be compiled in reasonable time/space) · 93c094b5
      	PR rtl-optimization/28071
      	* tree-vect-transform.c (vect_create_data_ref_ptr): Kill cast.
      	(vect_transform_loop): Likewise.
      	* tree-vectorizer.c (new_loop_vec_info): Likewise.
      	(new_loop_vec_info): Likewise.
      	(destroy_loop_vec_info): Likewise.
      	* tree-dfa.c (create_var_ann): Use GCC_CNEW.
      	(create_stmt_ann): Likewise.
      	(create_tree_ann): Rename to ...
      	(create_tree_common_ann): ... this one; allocate only the common part
      	of annotations.
      	* tree-vn.c (set_value_handle): Use get_tree_common_ann.
      	(get_value_handle): Likewise.
      	* tree-ssa-pre.c (phi_translate): Delay annotation allocation for
      	get_tree_common_ann.
      	* tree-vectorizer.h (set_stmt_info): Take stmt annotation.
      	(vinfo_for_stmt): Use stmt annotations.
      	* tree-flow.h (tree_ann_common_t): New type.
      	(tree_common_ann, get_tree_common_ann, create_tree_common_ann): New.
      	(tree_ann, get_tree_ann, create_tree_ann): New.
      	* tree-flow-inline.h (get_function_ann): Do more type checking.
      	(stmt_ann): Likewise.
      	(tree_ann): Rename to ...
      	(tree_common_ann): ... this one; return ony common_ann
      	(get_tree_ann): Rename to ...
      	(tree_common_ann): This one; return only common_ann.
      	* tree-vect-patterns.c (vect_pattern_recog_1): Update call
      	of set_stmt_info.
      
      From-SVN: r116886
      Jan Hubicka committed
  11. 30 Dec, 2005 1 commit
    • tree.h (VALUE_HANDLE_VUSES): New. · c90186eb
      2005-12-29  Daniel Berlin  <dberlin@dberlin.org>
      
      	* tree.h (VALUE_HANDLE_VUSES): New.
      	(struct tree_value_handle): Add vuses.
      
      	* tree-vn.c (struct val_expr_pair_d): Remove stmt, add vuses.
      	(vn_compute): Remove stmt argument.
      	Don't use vuses in hash value computation.
      	(val_expr_pair_eq): Compare vuse lists.
      	(copy_vuses_from_stmt): New function.
      	(shared_vuses_from_stmt): Ditto.
      	(vn_add): Rewrite in terms of vn_add_with_vuses.
      	(vn_add_with_vuses): New function.
      	(vn_lookup): Rewrite in terms of vn_lookup_with_vuses.
      	(vn_lookup_with_vuses): New function.
      	(vuses_compare): New function.
      	(print_creation_to_file): Ditto.
      	(vn_lookup_or_add): Rewrite to handle vuses.
      	(sort_vuses): New function.
      	(vn_lookup_or_add_with_vuses): Ditto.
      	(vn_init): Initialize shared_lookup_vuses.
      	(vn_delete): Free shared_lookup_vuses.
      
      	* tree-ssa-pre.c: Update todo list.
      	(bb_value_sets_t): Add rvuse_in, rvuse_out, rvuse_gen, and
      	rvuse_kill.
      	(RVUSE_IN): New macro.
      	(RVUSE_GEN): Ditto.
      	(RVUSE_KILL): Ditto.
      	(RVUSE_OUT): Ditto.
      	(modify_expr_node_pool): New function.
      	(pretemp): New.
      	(storetemp): Ditto.
      	(mergephitemp): Ditto.
      	(prephitemp): Ditto.
      	(struct expr_pred_trans_d): Add vuses member.
      	(expr_pred_trans_eq): Compare vuses.
      	(phi_trans_lookup): Add vuses argument.
      	(phi_trans_add): Ditto.
      	(translate_vuses_through_block): New function.
      	(phi_translate): Use vuses to ask about those expressions that can
      	have vuses.
      	Properly translate virtual uses through phis, and use
      	vn_lookup_or_add_with vuses.  Handle tcc_reference.
      	(phi_translate_set): Don't add pointless translations to the
      	cache.
      	(get_representative): New function.
      	(vuses_dies_in_block_x): Ditto.
      	(valid_in_set): Add block argument.  Check virtual use validity.
      	(clean): Add block argument. Update call to valid_in_set
      	(compute_antic_aux): Update call to clean.
      	(dump_bitmap_of_names): New function.
      	(compute_vuse_representatives): Ditto.
      	(compute_rvuse): Ditto.
      	(can_value_number_call): Modified to accept calls with vuses.
      	(can_value_number_operation): New function.
      	(can_PRE_operation): Ditto.
      	(need_creation): New vector of stores that may need creation.
      	(find_or_generate_expression): use can_PRE_operation.
      	(create_expression_by_pieces): Handle INDIRECT_REF.
      	Only create one temp until we have to change types.
      	Mark new vars for renaming.
      	(insert_into_preds_of_block): Ignore loopiness of loads.
      	Use can_PRE_operation.
      	Only create one temp until we have to chnge types.
      	(insert_aux): Use can_PRE_operation.
      	Don't pass name to insert_into_preds_of_block.
      	(insert_extra_phis): Only use one temp until we have to change
      	types.
      	(poolify_tree): New function.
      	(modify_expr_template): New var.
      	(poolify_modify_expr): New function.
      	(insert_fake_stores): Ditto.
      	(realify_fake_stores): Ditto.
      	(compute_avail): Use can_value_number_operation.
      	(mark_operand_necessary): Return NULL for non-SSA names.
      	(remove_dead_inserted_code): Update comment.
      	(init_pre): Initialize pretemp, need_creation, storetemp,
      	mergephitemp, prephitemp.
      	Create modify_expr_node_pool.
      	(fini_pre): Free modify_expr_node_pool and need_creation array.
      	(execute_pre): Call insert_fake_stores, compute_rvuse, and
      	realify_fake_stores. 
      	* tree-flow.h (vn_compute): Fix prototype.
      	(vn_add): Ditto.
      	(vn_lookup): Ditto.
      	(sort_vuses): New.
      	(vn_lookup_or_add_with_vuses): Ditto.
      	(vn_add_with_vuses): Ditto.
      	(vn_lookup_with_vuses): Ditto.
      	* passes.c (pass_may_alias): Add.
      
      From-SVN: r109180
      Daniel Berlin committed
  12. 18 Dec, 2005 1 commit
    • tree-vn.c (vn_add): Use XNEW. · 858904db
              * tree-vn.c (vn_add): Use XNEW.
              * tree-ssa-ccp.c (ccp_initialize): Use XNEWVEC.
              (ccp_fold): Likewise.
              (fold_stmt_r): Use explicit cast to convert from void *.
              * tree-outof-ssa.c (new_temp_expr_table): Use XCNEWVEC.
              (new_temp_expr_table): Likewise.
              * gimplify.c (lookup_tmp_var): Use XNEW.
              (gimplify_asm_expr): Use explcit cast to convert from void *.
              * tree-into-ssa.c (get_ssa_name_ann): Likewise.
              (get_def_blocks_for): Use XNEW.
              (add_to_repl_tbl): Likewise.
              (mark_def_sites): Use explicit cast to convert from void *.
              (def_blocks_free): Likewise.
              (mark_def_sites_initialize_block): Likewise.
              (update_ssa): Use XNEWVEC.
              * tree-dfa.c (create_var_ann): Use GGC_NEW.
              (create_stmt_ann): Likewise.
              (create_tree_ann): Likewise.
              (referenced_var_insert): Likewise.
              (set_default_def): Likewise.
              (referenced_var_lookup_if_exists): Use explicit cast to
              * convert
              from void *.
              (referenced_var_lookup): Likewise.
              (default_def): Likewise.
              (set_default_def): Likewise.
              * tree-cfg.c (create_bb): Likewise.
              (edge_to_cases_cleanup): Likewise.
              (verify_node_sharing): Likewise.
              (record_switch_edge): Use XNEW.
              (cleanup_dead_labels): Use XCNEWVEC.
              (tree_duplicate_sese_region): Use XNEWVEC.
              * tree-scalar-evolution.c (get_instantiated_value): Likewise.
              * tree-ssa.c (verify_ssa): Use XCNEWVEC.
              (int_tree_map_eq): Use explicit cast to convert from void *.
              * libgcov.c (gcov_exit): Use explicit cast to convert from
              * void *.
              (__gcov_execl): Likewise.
              (__gcov_execlp): Likewise.
              (__gcov_execle): Likewise.
              * tree-eh.c (struct_ptr_eq): Likewise.
              (struct_ptr_hash): Likewise.
              (lookup_stmt_eh_region_fn): Likewise.
              (outside_finally_tree): Likewise.
              (find_goto_replacement): Likewise.
              (make_eh_edge): Likewise.
              (mark_eh_edge): Likewise.
              (add_stmt_to_eh_region_fn): Use GGC_NEW.
              (record_in_finally_tree): Use XNEW.
              (maybe_record_in_goto_queue): Use XRESIZEVEC.
              (lower_try_finally_copy): Use XCNEWVEC.
      
      From-SVN: r108736
      Gabriel Dos Reis committed
  13. 20 Jul, 2005 1 commit
    • Make CONSTRUCTOR use VEC to store initializers. · 4038c495
      	* c-common.c (complete_array_type): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* c-pretty-print.c (pp_c_initializer_list): Use pp_c_constructor_elts.
      	(pp_c_constructor_elts): New function.
      	* c-pretty-print.h (pp_c_constructor_elts): Declare.
      	* c-typeck.c (build_function_call, build_c_cast, digest_init,
      	struct constructor_stack, struct initializer_stack,
      	constructor_elements, push_init_level, pop_init_level,
      	add_pending_init, find_init_member, output_init_element): Update to
      	cope with VEC in CONSTRUCTOR_ELTS.
      	* coverage.c (build_fn_info_value, build_ctr_info_value,
      	build_gcov_info): Likewise.
      	* expr.c (categorize_ctor_elements_1, store_constructor,
      	expand_expr_real_1): Likewise.
      	* fold-const.c (fold_ternary): Likewise.
      	* gimplify.c (gimplify_init_ctor_preeval, zero_sized_field_decl,
      	gimplify_init_constructor, gimplify_expr): Likewise.
      	* tree-dump.c (dequeue_and_dump): Likewise.
      	* tree-inline.c (copy_tree_r): Add code to duplicate a CONSTRUCTOR
      	node.
      	* tree-pretty-print.c (dump_generic_node): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* tree-sra.c (generate_element_init_1): Likewise.
      	* tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise.
      	* tree-ssa-operands.c (get_expr_operands): Likewise.
      	* tree-vect-generic.c (expand_vector_piecewise): Likewise.
      	* tree-vect-transform.c (vect_get_vec_def_for_operand):
      	(get_initial_def_for_reduction): Likewise.
      	* tree-vn.c (set_value_handle, get_value_handle): CONSTURCTOR uses
      	value handle in annotations.
      	* tree.c (tree_node_kind, tree_code_size, make_node_stat,
      	tree_node_structure): Add support for constr_kind.
      	(build_vector_from_ctor, build_constructor_single,
      	build_constructor_from_list): New functions.
      	(build_constructor): Update to take a VEC instead of a TREE_LIST.
      	(simple_cst_equal, iterative_hash_expr, initializer_zerop, walk_tree):
      	Update to cope with VEC in CONSTRUCTOR_ELTS.
      	* tree.def (CONSTRUCTOR): Make it a tcc_exceptional node.
      	* tree.h (FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_CONSTRUCTOR_ELT,
      	CONSTRUCTOR_APPEND_ELT): New macros.
      	(struct constructor_elt, struct	tree_constructor): New data types.
      	(union tree_node): Add tree_constructor field.
      	* treestruct.def: Define TS_CONSTRUCTOR.
      	* varasm.c (const_hash_1, compare_constant, copy_constant,
      	compute_reloc_for_constant, output_addressed_constants,
      	initializer_constant_valid_p, output_constant,
      	array_size_for_constructor, output_constructor): Update to cope with
      	VEC in CONSTRUCTOR_ELTS.
      	* vec.h (VEC_empty, VEC_copy): New macros.
      
      ada/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* decl.c (gnat_to_gnu_entity): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* trans.c (extract_values): Likewise.
      	* utils.c (convert, remove_conversions): Likewise.
      	* utils2.c (contains_save_expr_p, build_binary_op, build_unary_op,
      	gnat_build_constructor): Likewise.
      
      cp/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* call.c (convert_default_arg): Update call to digest_init.
      	* class.c (dump_class_hierarchy, dump_array): Update to cope with
      	VEC in CONSTRUCTOR_ELTS.
      	* cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
      	(finish_compound_literal, digest_init): Update declaration.
      	* decl.c (struct reshape_iter): New data type.
      	(reshape_init_array): Rename to...
      	(reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
      	(reshape_init): Rewrite from scratch. Split parts into...
      	(reshape_init_array, reshape_init_vector, reshape_init_class,
      	reshape_init_r): New functions.
      	(check_initializer): Update call to reshape_init. Remove obsolete
      	code.
      	(initialize_artificial_var, cp_complete_array_type): Update to cope
      	with VEC in CONSTRUCTOR_ELTS.
      	* decl2.c (grokfield): Update calls to digest_init.
      	(mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
      	* error.c (dump_expr_init_vec): New function.
      	(dump_expr): Use dump_expr_init_vec.
      	* init.c (build_zero_init, build_vec_init): Update to cope with VEC
      	in CONSTRUCTOR_ELTS.
      	(expand_default_init): Update call to digest_init.
      	* parser.c  (cp_parser_postfix_expression): Use a VEC for the
      	initializers.
      	(cp_parser_initializer_list): Build a VEC of initializers.
      	* pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
      	in CONSTRUCTOR_ELTS.
      	* rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
      	ptm_initializer, class_initializer, get_pseudo_ti_init): Use
      	build_constructor_from_list instead of build_constructor.
      	* semantics.c (finish_compound_literal): Update call to digest_init.
      	* tree.c (stabilize_init): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* typeck.c (build_ptrmemfunc1): Likewise.
      	* typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
      	Likewise.
      	(store_init_value): Use build_constructor_from_list and update call
      	to digest_init.
      	(digest_init): Rewrite.
      	(process_init_constructor): Rewrite from scratch. Split into...
      	(process_init_constructor_array, picflag_from_initializer,
      	process_init_constructor_record, process_init_constructor_union):
      	New functions.
      	(PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
      	New macros.
      	(build_functional_cast): Use build_constructor_from_list instead of
      	build_constructor.
      
      fortran/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* trans-array.c (gfc_build_null_descriptor,
      	gfc_trans_array_constructor_value, gfc_conv_array_initializer):
      	Update to cope with VEC in CONSTRUCTOR_ELTS.
      	* trans-common.c (create_common): Likewise.
      	* trans-expr.c (gfc_conv_structure): Likewise.
      	* trans-stmt.c (gfc_trans_character_select): Use
      	build_constructor_from_list instead of build_constructor.
      
      java/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* check-init.c (check_init): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* class.c (make_field_value, make_method_value, get_dispatch_table,
      	make_class_data, emit_symbol_table, emit_catch_table,
      	emit_assertion_table): Use build_constructor_from_list instead of
      	build_constructor.
      	* constants.c (build_constants_constructor): Likewise.
      	* java-gimplify.c (java_gimplify_new_array_init): Update to cope with
      	VEC in CONSTRUCTOR_ELTS.
      	* java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
      	PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
      	of a TREE_LIST.
      	* jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	* parse.y (build_new_array_init): Use build_constructor_from_list
      	instead of build_constructor.
      	(patch_new_array_init): Update to cope with VEC in
      	CONSTRUCTOR_ELTS.
      	(array_constructor_check_entry): Likewise.
      
      objc/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* objc-act.c (objc_build_constructor): Use build_constructor_from_list
      	instead of build_constructor.
      
      testsuite/
      	Make CONSTRUCTOR use VEC to store initializers.
      	* g++.dg/ext/complit3.C: Check for specific error messages.
      	* g++.dg/init/brace2.C: Update error message.
      	* g++.dg/warn/Wbraces2.C: Likewise.
      
      From-SVN: r102182
      Giovanni Bajo committed
  14. 25 Jun, 2005 1 commit
  15. 16 May, 2005 1 commit
    • re PR tree-optimization/21576 (FRE does not eliminate a redundant builtin call.) · 43da81be
      2005-05-15  Daniel Berlin  <dberlin@dberlin.org>
      
      	Fix PR tree-optimization/21576
      
      	* tree-ssa-pre.c (expression_node_pool): New pool.
      	(comparison_node_pool): Ditto.
      	(list_node_pool): Ditto.
      	(pool_copy_list): New function.
      	(phi_translate): Handle CALL_EXPR.
      	(valid_in_set): Ditto.
      	(create_expression_by_pieces): Ditto.
      	(insert_into_preds_of_block): Ditto.
      	(insert_aux): Ditto.
      	(compute_avail): Ditto.
      	(create_value_expr_from): Handle TREE_LIST and CALL_EXPR.
      	(can_value_number_call): New function.
      	(find_leader): Update comment.
      	(init_pre): Create new pools.
      	(fini_pre): Free new pools.
      	(pass_pre): Add TODO_update_ssa for the future when we are going
      	to need vops.
      	* tree-vn.c (expressions_equal_p): Handle TREE_LIST.
      	(set_value_handle): Ditto.
      	(get_value_handle): Ditto.
      
      From-SVN: r99759
      Daniel Berlin committed
  16. 04 May, 2005 1 commit
  17. 03 May, 2005 1 commit
    • lambda-code.c (gcc_loop_to_lambda_loop, [...]): Use generic operand interface. · f47c96aa
      2005-05-03  Andrew MacLeod  <amacleod@redhat.com>
      
      	* lambda-code.c (gcc_loop_to_lambda_loop,
      	lambda_loopnest_to_gcc_loopnest, phi_loop_edge_uses_def,
      	stmt_is_bumper_for_loop, perfect_nest_p, replace_uses_of_x_with_y): Use
      	generic operand interface.
      	* tree-data-ref.c (find_data_references_in_loop): Use generic interface.
      	* tree-dfa.c (collect_dfa_stats_r, mark_new_vars_to_rename): Use
      	generic operand interface.
      	* tree-flow-inline.h (delink_imm_use, link_imm_use_to_list,
      	link_imm_use, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt,
      	next_safe_imm_use, has_zero_uses, has_single_use, single_imm_use,
      	num_imm_uses): Use ssa_use_operand_t.
      	(get_def_ops, get_use_ops, get_v_may_def_ops, get_vuse_ops,
      	get_v_must_def_ops): Delete.
      	(get_def_from_ptr, get_phi_result_ptr): Get def directly now.
      	(get_use_op_ptr, get_def_op_ptr, get_v_may_def_result_ptr,
      	get_v_may_def_op_ptr, get_vuse_op_ptr, get_v_must_def_result_ptr,
      	get_v_must_def_kill_ptr): Delete.
      	(delink_stmt_imm_use): Move and use new operand interface.
      	(op_iter_next_use, op_iter_next_def, op_iter_next_tree, op_iter_init,
      	op_iter_next_tree): Use new operand implementation.
      	(clear_and_done_ssa_iter): New.  Initialize a blank operand iterator.
      	(op_iter_init_use, op_iter_init_def, op_iter_init_tree): Add iterator
      	type check.
      	(op_iter_next_mustdef, op_iter_next_maydef,
      	op_iter_next_must_and_may_def): Delete. Replace with...
      	(op_iter_next_maymustdef): New.  Combine must and may next operations.
      	(op_iter_init_maydef, op_iter_init_mustdef,
      	op_iter_init_must_and_may_def): Use new interface.
      	(single_ssa_tree_operand ): New.  Process single operands only as trees.
      	(single_ssa_use_operand): New.  Process single operands only as uses.
      	(single_ssa_def_operand): New.  Process single operands only as defs.
      	(zero_ssa_operands): New.  Return TRUE if there are zero operands of the
      	specified types.
      	(num_ssa_operands): New.  Count the number of specified operands.
      	(compare_ssa_operands_equal): New.  Compare two statements' operands.
      	(single_phi_def): New.  Return true if PHI has one def of the specified
      	operand type.
      	(op_iter_init_phiuse): New.  Initialize the iterator for PHI arguments.
      	(op_iter_init_phidef): New.  Initialize the iterator for the PHI def.
      	* tree-flow.h (struct immediate_use_iterator_d): Use ssa_use_operand_t.
      	(struct stmt_ann_d): Operands field no longer require GTY().
      	(vn_compute, vn_lookup_or_add, vn_add, vn_lookup): Change prototype.
      	* tree-into-ssa.c (mark_def_sites): Use SSA_OP_VMUSTKILL.
      	* tree-outof-ssa.c (check_replaceable, find_replaceable_in_bb,
      	dump_replaceable_exprs, rewrite_trees): Use generic interface.
      	* tree-phinodes.c (make_phi_node, release_phi_node, resize_phi_node):
      	Use use_operand_p instead of ssa_imm_use_t *.
      	* tree-pretty-print.c (dump_vops): check if operands are active before
      	dumping virtual operands.
      	* tree-sra.c (sra_walk_function): Use ZERO_SSA_OPERANDS.
      	* tree-ssa-ccp.c (likely_value): Use ZERO_SSA_OPERANDS.
      	(ccp_fold): Use new interface.
      	(ccp_visit_stmt): Remove unused variables and code.
      	(convert_to_gimple_builtin): Insert statements before calling
      	mark_new_vars_to_rename.
      	* tree-ssa-copy.c (stmt_may_generate_copy): Use ZERO_SSA_OPERANDS.
      	(copy_prop_visit_cond_stmt): Use generic interface.
      	* tree-ssa-dom.c (struct expr_hash_elt): Use stmt pointer, not the
      	annotation in table.
      	(thread_across_edge): Use generic interface.
      	(initialize_hash_element): Initialzie with stmt, not annotation.
      	(eliminate_redundant_computations): Use generic interface.
      	(record_equivalences_from_stmt): Pass stmt, not annotation.
      	(avail_expr_hash, real_avail_expr_hash, avail_expr_eq): Use generic
      	interface.
      	* tree-ssa-dse.c (dse_optimize_stmt): Use ZERO_SSA_OPERANDS.
      	* tree-ssa-loop-ivopts.c (find_invariants_stmt,
      	find_interesting_uses_stmt, protect_loop_closed_ssa_form_use): Use
      	generic operand interface.
      	* tree-ssa-loop-niter.c (chain_of_csts_start, get_val_for): Use generic
      	interface.
      	* tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Use Generic operand
      	Interface.
      	* tree-ssa-operands.c (struct opbuild_list_d): New.  Operand build type.
      	(build_defs, build_uses, build_v_may_defs, build_vuses,
      	build_v_must_defs): Change type to struct opbuild_list_d.
      	(ops_active): New.  Operands active boolean.
      	(operand_memory, operand_memory_index): New.  Operand memory managers.
      	(allocate_def_optype, allocate_use_optype, allocate_v_may_def_optype,
      	allocate_vuse_optype, allocate_v_must_def_optype): Delete.
      	(free_uses, free_defs, free_vuses, free_v_may_defs, free_v_must_defs):
      	Change from functions to static variable list heads.
      	(opbuild_initialize_virtual): New.  Initialize a virtual build list.
      	(opbuild_initialize_real): New.  Initialize a virtual build list.
      	(opbuild_free): New.  Free a build list.
      	(opbuild_num_elems): New.  Number of items in a list.
      	(opbuild_append_real): New.  Add a real (tree *) operand.
      	(opbuild_append_virtual): New.  Add and sort a virtual (tree) operand.
      	(opbuild_first): New.  Return first element index in a list.
      	(opbuild_next): New.  Return next element in a list.
      	(opbuild_elem_real): New.  Return real element.
      	(opbuild_elem_virtual): New.  Return virtual element.
      	(opbuild_elem_uid): New.  Return UID of virtual element.
      	(opbuild_clear): New.  Reset an operand list.
      	(opbuild_remove_elem): New.  Remove an element form a list.
      	(ssa_operands_active): New.  Return true if operand cache is active.
      	(init_ssa_operands, fini_ssa_operands): Initialize new implementation.
      	(ssa_operand_alloc): New.  Allocate memory from an operand chunk.
      	(correct_use_link): Use use_operand_p.
      	(finalize_ssa_uses, finalize_ssa_v_may_defs, finalize_ssa_defs,
      	finalize_ssa_vuses, finalize_ssa_v_must_defs): New implmentation.
      	(cleanup_v_may_defs): Use new implmentation.
      	(finalize_ssa_stmt_operands, start_ssa_stmt_operands): New
      	implementation.
      	(append_def, append_use, append_v_may_def, append_vuse,
      	append_v_must_def): Call opbuild_append routine instead of using varray.
      	(build_ssa_operands): Simplify to simply use stmt, don't maintain a
      	global parse_old_ops variable.
      	(free_ssa_operands): New implementation.
      	(update_stmt_operands): Move.  Change argument to build_ssa_operands.
      	(copy_virtual_operands): Move. New generic implementation.
      	(create_ssa_artficial_load_stmt): Move. New implementation.
      	(swap_tree_operands): Update for new implementation.
      	(get_expr_operands): Add stmt parameter to calls to swap_tree_operands.
      	(add_call_clobber_ops, add_call_read_ops): Initialize opbuild list
      	rather than a varray.
      	(verify_imm_links): Use use_operand_p.
      	(dump_immediate_uses_for): If the immediate use variable is a virtual
      	variable, show the virtual ops in the stmt.
      	* tree-ssa-operands.h (def_operand_p): No longer a structure.
      	(NULL_DEF_OPERAND_P): Now a #define.
      	(def_optype_d, use_optype_d, v_def_use_operand_type, v_may_def_optype_d,
      	vuse_operand_type, vuse_optype_d, v_must_def_optype_d): Delete.
      	(def_optype_d, use_optype_d, maydef_optype_d, vuse_optype_d,
      	mustdef_optype_d): New.  Use Linked list representation.
      	(SSA_OPERAND_MEMORY_SIZE): New.  Size of operand memory chunk.
      	(struct ssa_operand_memory_d): New.  Allocated Chunk node.
      	(struct stmt_operands_d): Change to new pointers that are not GTY.
      	(STMT_USE_OPS, NUM_USES, SET_USE_OP, STMT_DEF_OPS, NUM_DEFS, SET_DEF_OP,
      	STMT_V_MAY_DEF_OPS, NUM_V_MAY_DEFS, SET_V_MAY_DEF_RESULT,
      	SET_V_MAY_DEF_OP, STMT_VUSE_OPS, NUM_VUSES, SET_VUSE_OP,
      	STMT_V_MUST_DEF_OPS, NUM_V_MUST_DEFS, SET_V_MUST_DEF_RESULT,
      	SET_V_MUST_DEF_KILL): Delete.
      	(V_MAY_DEF_OPS, V_MAY_DEF_RESULT_PTR, V_MAY_DEF_RESULT,
      	V_MAY_DEF_OP_PTR, V_MAY_DEF_OP): Rename to MAYDEF_*.
      	(V_MUST_DEF_OPS, V_MUST_DEF_RESULT_PTR, V_MUST_DEF_RESULT,
      	V_MUST_DEF_KILL_PTR, V_MUST_DEF_KILL): Rename to MUSTDEF_*.
      	(enum ssa_op_iter_type): Operand iterator typechecking values.
      	(struct ssa_operand_iterator_d): Use linked lists of operands.
      	(SSA_OP_VMUSTDEFKILL): Rename to SSA_OP_VMUSTKILL.
      	(FOR_EACH_SSA_MAYDEF_OPERAND, FOR_EACH_SSA_MUSTDEF_OPERAND,
      	FOR_EACH_SSA_MUST_AND_MAY_DEF_OPERAND): Use op_iter_next_maymustdef.
      	(FOR_EACH_PHI_ARG): New.  Iterate over PHI arguments.
      	(FOR_EACH_PHI_OR_STMT_USE): New.  Iterate over PHI or stmt uses.
      	(FOR_EACH_PHI_OR_STMT_DEF): New.  Iterate over PHI or stmt defs.
      	(SINGLE_SSA_TREE_OPERAND, SINGLE_SSA_USE_OPERAND,
      	SINGLE_SSA_DEF_OPERAND, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): New.
      	* tree-ssa-opfinalize.h: New.  Function templates for expansion.
      	(FINALIZE_ALLOC): Expands into alloc_def, alloc_use, alloc_maydef,
      	alloc_vuse, and alloc_mustdef.
      	(FINALIZE_FUNC): Expands into finalize_ssa_def_ops,
      	finalize_ssa_use_ops, finalize_ssa_v_may_def_ops, finalize_ssa_vuse_ops,
      	and finalize_ssa_v_must_def_ops.
      	* tree-ssa-pre.c (add_to_sets): Pass tree to vn_add.
      	(create_value_expr_from): Use stmt not vuse_optype as a parameter. Pass
      	stmt around.
      	(compute_avail): Use generic iterator interface.
      	* tree-ssa-propagate.c (first_vdef): Use generic operand interface.
      	(stmt_makes_single_load, stmt_makes_single_store): Use
      	ZERO_SSA_OPERANDS.
      	* tree-ssa-sink.c (is_hidden_global_store): Use ZERO_SSA_OPERANDS.
      	(statement_sink_location): Use generic interface.
      	* tree-ssa.c (verify_ssa):  Use %p in fprintf.  Use generic interface.
      	(delete_tree_ssa): Don't call release_defs.  Call release_ssa_name and
      	reset the immediate use link nodes.
      	(stmt_references_memory_p): Use ZERO_SSA_OPERANDS.
      	* tree-ssanames.c (make_ssa_name): Use use_operand_p.
      	* tree-tailcall.c (find_tail_calls): Use ZERO_SSA_OPERANDS.
      	(eliminate_tail_call): Use generic operand interface.
      	* tree-vect-analyze.c (vect_analyze_data_refs): Use ZERO_SSA_OPERANDS.
      	(vect_mark_relevant, vect_mark_stmts_to_be_vectorized): Use generic
      	interface.
      	* tree-vect-transform.c (update_vuses_to_preheader): Use generic
      	interface.
      	* tree-vectorizer.c (rename_variables_in_bb): Use generic interface.
      	* tree-vn.c (struct val_expr_pair_d): Cache statment pointer instead of
      	vuse_optype.
      	(vn_compute, val_expr_pair_hash, vn_add, vn_lookup, vn_lookup_or_add):
      	Use statement pointer instead of vuse_optype.  Use generic interface.
      	* tree-vrp.c (maybe_add_assert_expr): Use generic interface.
      	(stmt_interesting_for_vrp, vrp_visit_stmt): Use ZERO_SSA_OPERANDS.
      	* tree.h (struct ssa_imm_use_d): Renamed to ssa_use_operand_d.
      	(tree_ssa_name, phi_arg_d): Use ssa_use_operand_d.
      	* doc/tree-ssa.texi: Update documentation for operand interface.
      
      From-SVN: r99155
      Andrew MacLeod committed
  18. 17 Feb, 2005 1 commit
    • bt-load.c, [...]: Update copyright. · c8d3e15a
      	* bt-load.c, cfgloop.c, convert.c, dominance.c, global.c,
      	loop-invariant.c, stmt.c, tree-ssa-forwprop.c,
      	tree-ssa-live.c, tree-ssanames.c, tree-vn.c,
      	config/host-linux.c, config/arm/fpa.md, config/avr/avr.h:
      	Update copyright.
      
      From-SVN: r95202
      Kazu Hirata committed
  19. 15 Feb, 2005 1 commit
  20. 25 Sep, 2004 1 commit
  21. 09 Sep, 2004 1 commit
    • targhooks.c (default_unwind_emit, [...]): Use gcc_assert, gcc_unreachable &… · 1e128c5f
      targhooks.c (default_unwind_emit, [...]): Use gcc_assert, gcc_unreachable & internal_error instead of abort.
      
      	* targhooks.c (default_unwind_emit, default_scalar_mode_supported_p):
      	Use gcc_assert, gcc_unreachable & internal_error instead of abort.
      	* timevar.c (timevar_push, timevar_pop, timevar_start,
      	timevar_stop): Likewise.
      	* toplev.c (default_pch_valid_p): Likewise.
      	* tracer.c (tail_duplicate): Likewise.
      	* tree-alias-common.c (get_alias_var_decl,
      	get_values_from_constructor, create_alias_var, delete_alias_vars,
      	empty_points_to_set, same_points_to_set, ptr_may_alias_var):
      	Likewise.
      	* tree.c (tree_size, make_node_stat, copy_node_stat,
      	build_int_cst_wide, integer_all_onesp, list_length, chainon,
      	tree_node_structure, type_contains_placeholder_p, substitute_in_expr,
      	substitute_placeholder_in_expr, tabilize_reference_1, build0_stat,
      	build1_stat, build2_stat, build3_stat, build4_stat, is_attribute_p,
      	lookup_attribute, type_hash_canon, host_integerp, iterative_hash_expr,
      	build_method_type_directly, decl_type_context, get_callee_fndecl,
      	get_set_constructor_bits, build_vector_type_for_mode, int_cst_value,
      	tree_fold_gcd): Likewise.
      	* tree-cfg.c (create_bb, make_ctrl_stmt_edges, make_exit_edges,
      	make_cond_expr_edges, group_case_labels, tree_merge_blocks,
      	cleanup_control_expr_graph, find_taken_edge,
      	find_taken_edge_switch_expr, phi_alternatives_equal,
      	is_ctrl_altering_stmt, disband_implicit_edges, set_bb_for_stmt,
      	stmt_for_bsi, tree_find_edge_insert_loc, bsi_insert_on_edge_immediate,
      	tree_split_edge, tree_verify_flow_info, thread_jumps,
      	tree_redirect_edge_and_branch, tree_flow_call_edges_add): Likewise.
      	* tree-chrec.c (chrec_fold_poly_cst, chrec_fold_plus_poly_poly,
      	chrec_fold_multiply_poly_poly): Likewise.
      	* tree-complex.c (extract_component, expand_complex_division,
      	expand_complex_comparison, expand_complex_operations_1,
      	build_replicated_const, expand_vector_operations_1): Likewise.
      	* tree-data-ref.c (tree_fold_bezout, build_classic_dist_vector,
      	build_classic_dir_vector): Likewise.
      	* tree-dfa.c (compute_immediate_uses_for_phi,
      	compute_immediate_uses_for_stmt, create_var_ann, create_stmt_ann,
      	create_tree_ann, collect_dfa_stats, get_virtual_var): Likewise.
      	* tree-dump.c (dequeue_and_dump): Likewise.
      	* tree-eh.c (record_stmt_eh_region, add_stmt_to_eh_region,
      	record_in_finally_tree, replace_goto_queue_1,
      	maybe_record_in_goto_queue, verify_norecord_switch_expr,
      	do_return_redirection): Likewise.
      	* tree-if-conv.c (tree_if_convert_stmt, tree_if_convert_cond_expr,
      	add_to_dst_predicate_list, find_phi_replacement_condition,
      	replace_phi_with_cond_modify_expr, get_loop_body_in_if_conv_order):
      	Likewise.
      	* tree-inline.c (remap_decl, remap_type, remap_decls, copy_body_r,
      	initialize_inlined_parameters, declare_return_variable,
      	estimate_num_insns_1, expand_call_inline, expand_calls_inline,
      	optimize_inline_calls, copy_tree_r): Likewise.
      	* tree-into-ssa.c (rewrite_initialize_block_local_data, rewrite_stmt,
      	ssa_rewrite_stmt, rewrite_into_ssa): Likewise.
      	* tree-iterator.c (alloc_stmt_list, tsi_link_before, tsi_link_after,
      	tsi_split_statement_list_after, tsi_split_statement_list_before):
      	Likewise.
      	* tree-mudflap.c (mf_varname_tree): Likewise.
      	* tree-nested.c (create_tmp_var_for, lookup_field_for_decl,
      	lookup_tramp_for_decl, convert_all_function_calls): Likewise.
      	* tree-optimize.c (tree_rest_of_compilation): Likewise.
      	* tree-outof-ssa.c (create_temp, eliminate_build, eliminate_phi,
      	coalesce_abnormal_edges, coalesce_ssa_name, eliminate_virtual_phis,
      	free_temp_expr_table, add_dependance, finish_expr, rewrite_trees):
      	Likewise.
      	* tree-phinodes.c (resize_phi_node, add_phi_arg,
      	remove_all_phi_nodes_for): Likewise.
      	* tree-pretty-print.c (op_prio, print_call_name): Likewise.
      	* tree-profile.c (tree_gen_interval_profiler, tree_gen_pow2_profiler,
      	tree_gen_one_value_profiler, tree_gen_const_delta_profiler): Likewise.
      	* tree-sra.c (type_can_instantiate_all_elements, sra_hash_tree,
      	sra_elt_eq, sra_walk_expr, instantiate_missing_elements,
      	generate_one_element_ref, generate_element_copy,
      	generate_element_zero, scalarize_copy, scalarize_init,
      	scalarize_ldst): Likewise.
      	* tree-ssa-alias.c (delete_alias_info, group_aliases, may_alias_p,
      	add_may_alias, add_pointed_to_expr, add_pointed_to_var,
      	collect_points_to_info_r, get_tmt_for, get_ptr_info): Likewise.
      	* tree-ssa.c (walk_use_def_chains, check_phi_redundancy): Likewise.
      	* tree-ssa-ccp.c (dump_lattice_value, get_default_value, get_value,
      	set_lattice_value, likely_value, ccp_visit_phi_node, visit_assignment,
      	widen_bitfield, ccp_fold_builtin): Likewise.
      	* tree-ssa-copy.c (may_propagate_copy, merge_alias_info,
      	replace_exp_1, propagate_tree_value): Likewise.
      	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
      	* tree-ssa-dce.c (set_control_dependence_map_bit,
      	find_control_dependence, find_pdom, mark_operand_necessary,
      	mark_stmt_if_obviously_necessary,
      	mark_control_dependent_edges_necessary, remove_dead_stmt): Likewise.
      	* tree-ssa-dom.c (dom_opt_initialize_block_local_data,
      	simplify_switch_and_lookup_avail_expr, cprop_into_successor_phis,
      	eliminate_redundant_computations, avail_expr_eq): Likewise.
      	* tree-ssa-dse.c (fix_stmt_v_may_defs): Likewise.
      	* tree-ssa-loop-ch.c (should_duplicate_loop_header_p,
      	duplicate_blocks): Likewise.
      	* tree-ssa-loop-im.c (for_each_index, set_level,
      	is_call_clobbered_ref): Likewise.
      	* tree-ssa-loop-ivopts.c (dump_use, divide, stmt_after_ip_normal_pos,
      	stmt_after_increment, set_iv, contains_abnormal_ssa_name_p,
      	find_interesting_uses_outer_or_nonlin, add_derived_ivs_candidates,
      	peel_address, ptr_difference_cost, may_replace_final_value,
      	determine_use_iv_cost, rewrite_use_nonlinear_expr, rewrite_use_outer,
      	rewrite_use, rewrite_uses): Likewise.
      	* tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa,
      	check_loop_closed_ssa_use): Likewise.
      	* tree-ssanames.c (make_ssa_name): Likewise.
      	* tree-ssa-operands.c (finalize_ssa_defs, finalize_ssa_uses,
      	finalize_ssa_v_must_defs, finalize_ssa_stmt_operands,
      	get_stmt_operands, get_expr_operands, get_asm_expr_operands,
      	get_indirect_ref_operands, add_stmt_operand): Likewise.
      	* tree-ssa-pre.c (value_exists_in_set_bitmap,
      	value_remove_from_set_bitmap, bitmap_insert_into_set, insert_into_set,
      	phi_translate, valid_in_set, compute_antic,
      	find_or_generate_expression, create_expression_by_pieces, insert_aux,
      	create_value_expr_from, eliminate): Likewise.
      	* tree-ssa-propagate.c (cfg_blocks_get): Likewise.
      	* tree-ssa-threadupdate.c (remove_last_stmt_and_useless_edges):
      	Likewise.
      	* tree-tailcall.c (independent_of_stmt_p, adjust_return_value,
      	eliminate_tail_call): Likewise.
      	* tree-vectorizer.c (vect_create_index_for_array_ref,
      	vect_align_data_ref, vect_create_data_ref,
      	vect_create_destination_var, vect_get_vec_def_for_operand,
      	vect_finish_stmt_generation, vect_transform_stmt,
      	vect_transform_loop_bound, vect_transform_loop,
      	vect_analyze_operations): Likewise.
      	* tree-vn.c (vn_compute, set_value_handle, get_value_handle):
      	Likewise.
      	* tree-flow-inline.h (var_ann, get_var_ann, get_def_from_ptr,
      	get_use_op_ptr, immediate_use, phi_ssa_name_p, bsi_start,
      	bsi_after_labels, bsi_last): Likewise.
      	* tree-ssa-live.c (var_union, change_partition_var,
      	create_ssa_var_map, calculate_live_on_entry, root_var_init,
      	type_var_init, add_coalesce, sort_coalesce_list, pop_best_coalesce):
      	Likewise.
      	* tree-ssa-live.h (partition_is_global, live_entry_blocks,
      	tpa_find_tree): Likewise.
      	(register_ssa_partition_check): Declare.
      	(register_ssa_partition): use it.
      	* tree-ssa-live.c: Include errors.h.
      	(register_ssa_partition_check): New.
      	* tree-ssa-operands.c: Include errors.h.
      	* Makefile.in (tree-ssa-operands.o): Depend on errors.h.
      
      Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
      
      From-SVN: r87223
      Giovanni Bajo committed
  22. 10 Aug, 2004 1 commit
  23. 30 Jun, 2004 1 commit
  24. 29 Jun, 2004 1 commit
    • common.opt (ftree-fre): New flag. · ff2ad0f7
      	* common.opt (ftree-fre): New flag.
      	* flags.h (flag_tree_fre): Declare.
      	* opts.c (decode_options): Set.
      	* timevar.def (TV_TREE_FRE): Define.
      	* tree-flow-inline.h (may_propagate_copy): Re-arrange for
      	readability.  Handle destinations that are not SSA_NAMEs.
      	* tree-flow.h (struct ptr_info_def): Move from tree.h
      	(cprop_into_stmt, cprop_into_successor_phis): Remove.
      	(vn_compute, vn_lookup_or_add, vn_add, vn_lookup): Add
      	vuse_optype parameter.
      	* tree-pass.h (pass_fre): Declare.
      	* tree-ssa-copy.c (cprop_operand): Move to tree-ssa-dom.c
      	(cprop_into_stmt): Likewise.
      	(cprop_into_successor_phis): Likewise.
      	* tree-ssa-dom.c (eliminate_redundant_computations): Fix
      	argument ordering in call to may_propagate_copy.
      	* tree-ssa-pre.c (is_undefined_value): Assume hard registers
      	to be always defined.
      	(add_to_sets): New local function.
      	(create_value_expr_from): New local function.
      	(compute_avail): Call them.
      	(eliminate): Don't ignore statements with virtual operands.
      	(init_pre): New local function.
      	(fini_pre): New local function.
      	(execute_pre): Call them.
      	Add argument DO_FRE.  Don't do insertion if DO_FRE is true.
      	(do_pre): New function.
      	(do_fre): New function.
      	(gate_fre): New function.
      	(pass_fre): Declare.
      	* tree-ssa.c (init_tree_ssa): Don't call vn_init.
      	(delete_tree_ssa): Don't call vn_delete.
      	* tree-vn.c (val_expr_pair_d): Add documentation.
      	(vn_compute): Add VUSES argument to incorporate in computing
      	hash values.  Update all callers.
      	(expressions_equal_p): Call operand_equal_p with
      	OEP_PURE_SAME.
      	(vn_add): Add VUSES argument.  Update all callers.
      	(vn_lookup): Likewise.
      	(vn_lookup_or_add): Likewise.
      	* doc/invoke.texi: Document -ftree-fre and -fdump-tree-fre.
      
      From-SVN: r83837
      Diego Novillo committed
  25. 23 Jun, 2004 1 commit
    • Makefile.in (tree-vn.o): New. · 33c94679
      	* Makefile.in (tree-vn.o): New.
      	(tree-ssa-pre.o): Don't depend on RTL_H.
      	* tree-dfa.c (find_referenced_vars): Don't call init_tree_ssa.
      	* tree-flow.h (struct var_ann_d): Remove field expr_set.
      	(add_to_value, expressions_equal_p, get_value_handle, vn_compute,
      	vn_lookup_or_add, vn_add, vn_lookup, vn_init, vn_delete): Declare.
      	* tree-optimize.c (execute_init_datastructures): New local function.
      	(pass_init_datastructures): New local variable.
      	(init_tree_optimization_passes): Sequence pass_init_datastructures.
      	* tree-pretty-print.c (MASK_POINTER): Remove.
      	(dump_generic_node): Handle VALUE_HANDLE.
      	* tree-ssa-pre.c: Move all value numbering routines to tree-vn.c.
      	Update callers to use new function names.
      	Use VALUE_HANDLE_ID and VALUE_HANDLE_EXPR_SET instead of
      	variable annotations.
      	* tree-ssa.c (init_tree_ssa): Call vn_init.
      	(delete_tree_ssa): Call vn_delete.
      	* tree-vn.c: New file.
      	* tree.c (tree_size): Handle VALUE_HANDLE.
      	(tree_node_structure): Likewise.
      	(iterative_hash_expr): Likewise.
      	* tree.def (VALUE_HANDLE): New code.
      	* tree.h (struct tree_value_handle): New.
      	(VALUE_HANDLE_ID): Define.
      	(VALUE_HANDLE_EXPR_SET): Define.
      	(enum tree_node_structure_enum): Add TS_VALUE_HANDLE.
      	(union tree_node): Add struct tree_value_handle.
      
      From-SVN: r83564
      Diego Novillo committed