Commit Graph

80 Commits

Author SHA1 Message Date
Daniel Berlin
e8b19a779d tree-vectorizer.c (new_vec_stmt_info): Initialize STMT_VINFO_SUBVARS to NULL.
2005-03-16  Daniel Berlin  <dberlin@dberlin.org>

	* tree-vectorizer.c (new_vec_stmt_info): Initialize
	STMT_VINFO_SUBVARS to NULL.
	* tree-vect-analyze.c (vect_analyze_data_refs): Ditto.

From-SVN: r96581
2005-03-16 21:42:55 +00:00
Dorit Naishlos
5f55a1ba12 tree-vectorizer.h (unknown_alignment_for_access_p): Replaced by known_alignment_for_access_p.
* tree-vectorizer.h (unknown_alignment_for_access_p): Replaced by
        known_alignment_for_access_p.
        (known_alignment_for_access_p): New.
        (do_peeling_for_alignment): Field made int instead of bool and renamed
        to peeling_for_alignment.
        (LOOP_DO_PEELING_FOR_ALIGNMENT): Renamed to LOOP_PEELING_FOR_ALIGNMENT.
        * tree-vect-analyze.c (vect_determine_vectorization_factor): New. This
        functionality used to be in vect_analyze_operations.
        (vect_analyze_operations): Code to determine vectorization factor was
        moved to vect_determine_vectorization_factor.
        (vect_enhance_data_refs_alignment): Update to correct alignment when it
        is known instead of -1.  Set LOOP_PEELING_FOR_ALIGNMENT to peeling
        factor.
        (vect_analyze_loop): Call vect_determine_vectorization_factor (used to
        be part of vect_analyze_operations).
        * tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Use fold when
        creating the guard condition, as the number of iterations may be
        constant.
        (slpeel_tree_peel_loop_to_edge): Use new name of
        LOOP_DO_PEELING_FOR_ALIGNMENT. Set it to 0 instead of false.
        * tree-vect-transform.c (vect_gen_niters_for_prolog_loop): Handle known
        alignment case more efficiently. Use LOOP_PEELING_FOR_ALIGNMENT.
        (vect_do_peeling_for_alignment): Use fold.
        (vect_transform_loop): Use new name of LOOP_DO_PEELING_FOR_ALIGNMENT.

        (vect_update_inits_of_dr): Renamed to
        vect_update_init_of_dr.
        (vect_update_inits_of_drs): Use new name of vect_update_inits_of_dr.
        (vectorizable_store): Fix assertion to use == instead of =.

From-SVN: r96526
2005-03-15 18:33:09 +00:00
Zdenek Dvorak
c5cbcccf90 basic-block.h (single_succ_p, [...]): New inline functions.
* basic-block.h (single_succ_p, single_pred_p, single_succ_edge,
	single_pred_edge, single_succ, single_pred): New inline functions.
	* bb-reorder.c (rotate_loop, find_traces_1_round,
	add_labels_and_missing_jumps, fix_up_fall_thru_edges,
	duplicate_computed_gotos): Use the single_succ/pred functions.
	* cfganal.c (forwarder_block_p): Ditto.
	* cfgbuild.c (compute_outgoing_frequencies): Ditto.
	* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
	outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg,
	merge_seq_blocks): Ditto.
	* cfghooks.c (split_edge, tidy_fallthru_edges): Ditto.
	* cfglayout.c (fixup_reorder_chain): Ditto.
	* cfgloop.c (mark_single_exit_loops, update_latch_info,
	canonicalize_loop_headers, verify_loop_structure): Ditto.
	* cfgloopmanip.c (remove_path, unloop, loop_delete_branch_edge,
	mfb_update_loops, create_preheader, force_single_succ_latches,
	create_loop_notes): Ditto.
	* cfgrtl.c (rtl_can_merge_blocks, try_redirect_by_replacing_jump,
	force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge,
	commit_one_edge_insertion, purge_dead_edges,
	cfg_layout_can_merge_blocks_p): Ditto.
	* except.c (sjlj_emit_function_enter): Ditto.
	* flow.c (init_propagate_block_info): Ditto.
	* function.c (thread_prologue_and_epilogue_insns): Ditto.
	* gcse.c (find_implicit_sets, bypass_conditional_jumps,
	insert_insn_end_bb): Ditto.
	* ifcvt.c (merge_if_block, find_if_block, find_if_case_1,
	find_if_case_2): Ditto.
	* lambda-code.c (perfect_nestify): Ditto.
	* lcm.c (optimize_mode_switching): Ditto.
	* loop-doloop.c (doloop_modify): Ditto.
	* loop-init.c (loop_optimizer_init): Ditto.
	* loop-iv.c (simplify_using_initial_values): Ditto.
	* loop-unroll.c (unroll_loop_runtime_iterations): Ditto.
	* loop-unswitch.c (unswitch_loop): Ditto.
	* modulo-sched.c (generate_prolog_epilog): Ditto.
	* predict.c (combine_predictions_for_insn, estimate_probability,
	tree_estimate_probability, last_basic_block_p,
	estimate_bb_frequencies): Ditto.
	* profile.c (branch_prob): Ditto.
	* regrename.c (copyprop_hardreg_forward): Ditto.
	* sched-rgn.c (is_cfg_nonregular, find_rgns, update_live): Ditto.
	* tracer.c (layout_superblocks): Ditto.
	* tree-cfg.c (tree_can_merge_blocks_p, tree_merge_blocks,
	cfg_remove_useless_stmts_bb, cleanup_control_flow,
	cleanup_control_expr_graph, disband_implicit_edges,
	tree_find_edge_insert_loc, bsi_commit_edge_inserts,
	tree_verify_flow_info, tree_make_forwarder_block,
	tree_forwarder_block_p, remove_forwarder_block,
	remove_forwarder_block_with_phi, merge_phi_nodes): Ditto.
	* tree-if-conv.c (tree_if_conversion): Ditto.
	* tree-mudflap.c (mf_build_check_statement_for): Ditto.
	* tree-ssa-dce.c (remove_dead_stmt): Ditto.
	* tree-ssa-dom.c (dom_opt_finalize_block): Ditto.
	* tree-ssa-loop-ch.c (should_duplicate_loop_header_p,
	copy_loop_headers): Ditto.
	* tree-ssa-loop-im.c (loop_commit_inserts): Ditto.
	* tree-ssa-loop-ivopts.c (compute_phi_arg_on_exit): Ditto.
	* tree-ssa-loop-manip.c (split_loop_exit_edge, ip_normal_pos,
	lv_adjust_loop_entry_edge, tree_ssa_loop_version): Ditto.
	* tree-ssa-loop-niter.c (simplify_using_initial_conditions): Ditto.
	* tree-ssa-loop-unswitch.c (simplify_using_entry_checks): Ditto.
	* tree-ssa-phiopt.c (tree_ssa_phiopt, value_replacement): Ditto.
	* tree-ssa-pre.c (compute_antic_aux, insert_aux, init_pre): Ditto.
	* tree-ssa-threadupdate.c (redirect_edges): Ditto.
	* tree-tailcall.c (independent_of_stmt_p, find_tail_calls,
	eliminate_tail_call, tree_optimize_tail_calls_1): Ditto.
	* tree-vect-analyze.c (vect_analyze_loop_form): Ditto.
	* tree-vect-transform.c (vect_update_ivs_after_vectorizer): Ditto.
	* tree-vectorizer.c (slpeel_update_phi_nodes_for_guard,
	slpeel_add_loop_guard): Ditto.

From-SVN: r96292
2005-03-11 09:05:12 +00:00
Zdenek Dvorak
2b27100224 Makefile.in (tree-optimize.o): Add CFGLOOP_H dependence.
* Makefile.in (tree-optimize.o): Add CFGLOOP_H dependence.
	* cfgloop.c (flow_loop_nodes_find): Export.
	* cfgloop.h (flow_loop_nodes_find, fix_loop_structure):
	Declare.
	* cfgloopmanip.c (fix_loop_structure): New function.
	* predict.c (predict_loops): Clean up the loops information.
	* tree-cfg.c (cleanup_tree_cfg_loop): New function.
	(tree_can_merge_blocks_p, remove_bb, tree_forwarder_block_p): Respect
	loop structure.
	* tree-flow.h (cleanup_tree_cfg_loop): Declare.
	(rewrite_into_loop_closed_ssa): Declaration changed.
	* tree-loop-linear.c (linear_transform_loops): Add argument to
	rewrite_into_loop_closed_ssa call.
	* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
	* tree-ssa-loop-im.c (move_computations): Ditto.
	* tree-ssa-loop.c (tree_loop_optimizer_init): Ditto.
	* tree-vectorizer.c (vectorize_loops): Ditto.
	* tree-optimize.c: Include cfgloop.h.
	(execute_todo): Choose whether to call cleanup_tree_cfg or
	cleanup_tree_cfg_loop.
	* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables,
	(tree_unroll_loops_completely): Enable cleanup_tree_cfg_loop call.
	* tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Enable
	cleanup_tree_cfg_loop call.
	* tree-ssa-loop-manip.c (find_uses_to_rename_bb): New function.
	(find_uses_to_rename, rewrite_into_loop_closed_ssa): Support
	work on part of cfg.

From-SVN: r96232
2005-03-10 08:55:57 +00:00
Zdenek Dvorak
70388d9433 cfgloop.c (flow_loop_entry_edges_find, [...]): Removed.
* cfgloop.c (flow_loop_entry_edges_find, flow_loop_exit_edges_find,
	flow_loop_pre_header_scan, flow_loop_pre_header_find,
	flow_loop_scan): Removed.
	(flow_loop_dump): Do not dump removed fields.
	(flow_loop_free): Do not free removed fields.
	(flow_loops_find): Flags argument removed.  Do not call flow_loop_scan.
	(loop_exit_edge_p): New function.
	* cfgloop.h (struct loop): Removed fields pre_header, pre_header_edges,
	num_pre_header_edges, entry_edges, num_entries, exit_edges,
	num_exits, exits_doms.
	(LOOP_TREE, LOOP_PRE_HEADER, LOOP_ENTRY_EDGES, LOOP_EXIT_EDGES,
	LOOP_EDGES, LOOP_ALL): Removed.
	(flow_loop_scan): Declaration removed.
	(loop_exit_edge_p, mark_loop_exit_edges): Declare.
	* cfgloopmanip.c (create_loop_notes): Do not pass flags to
	flow_loops_find.
	* ifcvt.c (mark_loop_exit_edges): Moved to cfgloopanal.c.
	(if_convert): Call flow_loops_find and flow_loops_free
	when calling mark_loop_exit_edges.
	* cfgloopanal.c (mark_loop_exit_edges): Moved from
	ifcvt.c.  Removed the flow_loops_find, flow_loops_free and
	free_dominance_info calls.
	* loop-init.c (flow_loops_find): Ditto.
	* passes.c (rest_of_handle_branch_prob): Ditto.
	* lambda-code.c (perfect_nestify): Do not call flow_loops_find.
	* loop-unroll.c (analyze_insns_in_loop): Do not use
	EDGE_LOOP_EXIT.
	* predict.c (predict_loops): Do not call flow_loop_scan.
	Use get_loop_exit_edges.
	(tree_estimate_probability): Do not pass flags to flow_loops_find.
	* tree-if-conv.c (bb_with_exit_edge_p): Take loop as argument.
	Do not use EDGE_LOOP_EXIT.
	(tree_if_convert_cond_expr, if_convertible_modify_expr_p): Pass loop
	to bb_with_exit_edge_p.
	(if_convertible_loop_p): Do not call flow_loop_scan.  Use
	loop->single_exit.  Do not use EDGE_LOOP_EXIT.  Pass loop
	to bb_with_exit_edge_p.
	(combine_blocks): Pass loop to bb_with_exit_edge_p.  Do not use
	EDGE_LOOP_EXIT.
	* tree-loop-linear.c (linear_transform_loops): Do not call
	flow_loop_scan.  Use loop->single_exit.
	* tree-vect-analyze.c (vect_analyze_operations): Use loop->single_exit.
	(vect_analyze_loop_form): Do not call flow_loop_scan.
	* tree-vect-transform.c (vect_update_ivs_after_vectorizer): Use
	loop->single_exit.
	(vect_do_peeling_for_loop_bound): Use loop_preheader_edge and
	loop->single_exit.
	* tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop,
	slpeel_make_loop_iterate_ntimes, slpeel_can_duplicate_loop_p,
	slpeel_tree_duplicate_loop_to_edge_cfg,
	slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge):
	Use loop_preheader_edge and loop->single_exit.  Do not call
	flow_loop_scan.

From-SVN: r95738
2005-03-01 13:44:46 +00:00
Nathan Sidwell
8bdbfff57e bitmap.h (BITMAP_XMALLOC, [...]): Remove.
* bitmap.h (BITMAP_XMALLOC, BITMAP_XFREE): Remove.
	* bb-reorder.c (duplicate_computed_gotos): Use BITMAP_ALLOC and
	BITMAP_FREE.
	* bt-load.c (btr_def_live_range, combine_btr_defs,
	migrate_btr_def, migrate_btr_defs): Likewise.
	* cfgcleanup.c (thread_jump): Likewise.
	* cfgloop.c (get_loop_body_in_bfs_order): Likewise.
	* df.c (df_insn_table_realloc, df_bitmaps_alloc, df_bitmaps_free,
	df_alloc, df_free, df_du_chain_create, df_bb_rd_local_compute,
	df_rd_local_compute, df_reg_info_compute): Likewise.
	* dominance.c (init_dom_info, free_dom_info): Likewise.
	* flow.c (init_propagate_block_info,
	free_propagate_block_info): Likewise.
	* gcse.c (alloc_gcse_mem, free_gcse_mem): Likewise.
	* global.c (allocate_bb_info, free_bb_info, calculate_reg_pav,
	modify_reg_pav): Likewise.
	* loop-invariant.c (find_defs, find_invariant_insn,
	find_invariants, free_inv_motion_data): Likewise.
	* predict.c (tree_predict_by_opcode,
	estimate_bb_frequencies): Likewise.
	* stmt.c (expand_case): Likewise.
	* tree-cfg.c (tree_duplicate_sese_region): Likewise.
	* tree-dfa.c (mark_new_vars_to_rename): Likewise.
	* tree-if-conv.c (get_loop_body_in_if_conv_order): Likewise.
	* tree-into-ssa.c (insert_phi_nodes_for, def_blocks_free,
	get_def_blocks_for, mark_def_site_blocks, rewrite_into_ssa,
	rewrite_ssa_into_ssa): Likewise.
	* tree-optimize.c (tree_rest_of_compilation): Likewise.
	* tree-outof-ssa.c (new_temp_expr_table, free_temp_expr_table,
	analyze_edges_for_bb, perform_edge_inserts): Likewise.
	* tree-scalar-evolution.c (scev_initialize, scev_finalize): Likewise.
	* tree-sra.c (tree_sra): Likewise.
	* tree-ssa-alias.c (init_alias_info, delete_alias_info): Likewise.
	* tree-ssa-ccp.c (ccp_fold_builtin): Likewise.
	* tree-ssa-dce.c (tree_dce_init, tree_dce_done): Likewise.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Likewise.
	* tree-ssa-dse.c (tree_ssa_dse): Likewise.
	* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_var):
	Likewise.
	* tree-ssa-live.c (new_tree_live_info, delete_tree_live_info,
	calculate_live_on_entry, calculate_live_on_exit,
	build_tree_conflict_graph): Likewise.
	* tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_init, record_use,
	record_important_candidates, set_use_iv_cost, find_depends,
	determine_use_iv_costs, iv_ca_new, iv_ca_free, free_loop_data,
	tree_ssa_iv_optimize_finalize): Likewise.
	* tree-ssa-loop-manip.c (add_exit_phis_var, get_loops_exit,
	find_uses_to_rename_use, rewrite_into_loop_closed_ssa,
	tree_duplicate_loop_to_header_edge): Likewise.
	* tree-ssa-pre.c (init_pre, fini_pre): Likewise.
	* tree-ssa.c (verify_flow_insensitive_alias_info,
	verify_name_tags, verify_ssa, init_tree_ssa,
	delete_tree_ssa): Likewise.
	* tree-ssanames.c (marked_ssa_names, init_ssanames,
	fini_ssanames): Likewise.
	* tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Likewise.

From-SVN: r95172
2005-02-17 16:19:49 +00:00
Dorit Naishlos
f7064d11bb Makefile.in (tree-vect-analyze.o, [...]): New.
* Makefile.in (tree-vect-analyze.o, tree-vect-transform.o): New.
        (tree-vectorizer.o): Added missing dependencies.

        * tree-vectorizer.h (vect_dump, vect_verbosity_level): Added extern
        decleration.
        (slpeel_tree_peel_loop_to_edge): Function externalized (had a static
        declaration in tree-vectorizer.c, now has an extern declaration in
        tree-vectorizer.h).
        (slpeel_make_loop_iterate_ntimes, slpeel_can_duplicate_loop_p,
        slpeel_verify_cfg_after_peeling, vect_strip_conversion,
        get_vectype_for_scalar_type, vect_is_simple_use,
        vect_is_simple_iv_evolution, vect_can_force_dr_alignment_p,
        vect_supportable_dr_alignment, new_loop_vec_info, destroy_loop_vec_info,
        new_stmt_vec_info, vect_analyze_loop, vectorizable_load,
        vectorizable_store, vectorizable_operation, vectorizable_assignment,
        vect_transform_loop, vect_print_dump_info, vect_set_verbosity_level,
        find_loop_location): Likewise.

        * tree-vectorizer.c (langhooks.h): #include removed.
        (slpeel_tree_peel_loop_to_edge): Function externalized. Declaration
        moved to tree-vectorized.h.
        (slpeel_make_loop_iterate_ntimes, slpeel_can_duplicate_loop_p,
        slpeel_verify_cfg_after_peeling, vect_strip_conversion,
        get_vectype_for_scalar_type, vect_is_simple_use,
        vect_is_simple_iv_evolution, vect_can_force_dr_alignment_p,
        vect_supportable_dr_alignment, new_loop_vec_info,
        destroy_loop_vec_info, new_stmt_vec_info, vect_print_dump_info,
        vect_set_verbosity_level, find_loop_location): Likewise.

        (vect_analyze_loop): Function externalized. Declaration moved to
        tree-vectorized.h. Function definition moved to tree-vect-analyze.c.
        (vect_analyze_loop_form): Moved to tree-vect-analyze.c.
        (vect_mark_stmts_to_be_vectorized, vect_analyze_scalar_cycles,
        vect_analyze_data_ref_accesses, vect_analyze_data_ref_dependences,
        vect_analyze_data_refs_alignment, vect_compute_data_refs_alignment,
        vect_enhance_data_refs_alignment, vect_analyze_operations,
        exist_non_indexing_operands_for_use_p, vect_mark_relevant,
        vect_stmt_relevant_p, vect_get_loop_niters,
        vect_analyze_data_ref_dependence, vect_compute_data_ref_alignment,
        vect_analyze_data_ref_access, vect_analyze_pointer_ref_access,
        vect_can_advance_ivs_p, vect_get_ptr_offset, vect_analyze_offset_expr,
        vect_base_addr_differ_p, vect_object_analysis, vect_address_analysis,
        vect_get_memtag): Likewise.

        (vectorizable_load): Function externalized. Declaration moved to
        tree-vectorized.h. Function definition moved to tree-vect-transform.c.
        (vectorizable_store, vectorizable_operation, vectorizable_assignment,
        vect_transform_loop): Likewise.
        (vect_transform_stmt): Moved to tree-vect-transform.c.
        (vect_align_data_ref, vect_create_destination_var,
        vect_create_data_ref_ptr, vect_create_index_for_vector_ref,
        vect_create_addr_base_for_vector_ref, vect_get_new_vect_var,
        vect_get_vec_def_for_operand, vect_init_vector,
        vect_finish_stmt_generation, vect_generate_tmps_on_preheader,
        vect_build_loop_niters, vect_update_ivs_after_vectorizer,
        vect_gen_niters_for_prolog_loop, vect_update_inits_of_dr,
        vect_update_inits_of_drs, vect_do_peeling_for_alignment,
        vect_do_peeling_for_loop_bound): Likewise.

        * tree-vect-analyze.c: New file.
        * tree-vect-transform.c: New file.

From-SVN: r95153
2005-02-17 08:47:28 +00:00
Ira Rosen
8ad833acc4 tree-vectorizer.c (vect_get_base_and_offset): Remove.
* tree-vectorizer.c (vect_get_base_and_offset): Remove.
        (vect_is_simple_iv_evolution): Remove redundant parameter
        and step check.
        (vect_analyze_scalar_cycles): Call vect_is_simple_iv_evolution
        without last parameter.
        (vect_analyze_pointer_ref_access): Get access_fn as parameter.
        Return pointer step. Call vect_is_simple_iv_evolution without
        last parameter. Check only that the step is multiple of size
        type. Remove stmt_vinfo updates.
        (vect_get_memtag_and_dr): Remove.
        (vect_get_memtag): New function.
        (vect_address_analysis): New function.
        (vect_object_analysis): New function.
        (vect_analyze_data_refs): Call vect_object_analysis and
        vect_get_memtag. Update stmt_vinfo fields.

From-SVN: r94934
2005-02-12 12:57:12 +00:00
Ira Rosen
e3a8a4eda9 tree-data-ref.c (array_base_name_differ_p): Check that the bases exist and are objects.
* tree-data-ref.c (array_base_name_differ_p): Check that the bases
        exist and are objects. Remove checks for pointer.
        * tree-vectorizer.c (vect_create_addr_base_for_vector_ref): Use
        STMT_VINFO_VECT_DR_BASE_ADDRESS instead of DR_BASE_NAME.
        (vect_create_data_ref_ptr): Likewise.
        (vect_base_addr_differ_p): New function.
        (vect_analyze_data_ref_dependence): Call vect_base_addr_differ_p.
        (vect_analyze_pointer_ref_access): Add output parameter - ptr_init.
        Don't set the DR_BASE_NAME field of data-ref.
        (vect_get_memtag_and_dr): Use ptr_init instead of DR_BASE_NAME.

From-SVN: r94932
2005-02-12 11:47:19 +00:00
Ira Rosen
a5ae3ad628 tree-vectorizer.h (struct _stmt_vec_info): Rename a field: base to base_address.
2005-02-13  Ira Rosen  <irar@il.ibm.com>

        * tree-vectorizer.h (struct _stmt_vec_info): Rename a field: base
        to base_address.
        * tree-vectorizer.c (new_stmt_vec_info): Rename the above field of
        stmt_vec_info.
        (vect_get_base_and_offset): Always return an address.
        (vect_create_addr_base_for_vector_ref): Remove treatment for
        different data reference types.
        (vect_compute_data_ref_alignment): Rename base to base_address in
        stmt_vec_info. Get the object in order to force its alignment.
        (vect_get_memtag_and_dr): Rename base to base_address in
        stmt_vec_info. Extract the object for memtag analysis.

From-SVN: r94930
2005-02-12 10:24:40 +00:00
Dorit Naishlos
8ca3515fbe tree-vectorizer.c (vect_set_dump_settings): Check that dump_file exists.
* tree-vectorizer.c (vect_set_dump_settings): Check that dump_file
        exists.

From-SVN: r94768
2005-02-09 19:21:07 +00:00
Leehod Baruch
c866976a42 invoke.texi (ftree-vectorizer-verbose): New.
* doc/invoke.texi (ftree-vectorizer-verbose): New.
        * opts.c (OPT_ftree_vectorizer_verbose_): New case for switch.
        * common.opt (ftree-vectorizer-verbose): New Flag for the vectorizer
        was added.
        * tree.h (vect_set_verbosity_level): New extern function declaration
        added.
        * tree-vectorizer.h (verbosity_levels): New enum type.
        * tree-vectorizer.c (vect_debug_stats): Function removed.
        (vect_debug_details): Likewise.
        (vect_verbosity_level): Global variable was defined and initialized.
        (vect_dump): Global variable definition.
        (vect_print_dump_info): New function.
        (vect_set_dump_settings): New function.
        (vect_set_verbosity_level): New function.
        (vectorize_loops): Add call to vect_set_dump_settings.

        (slpeel_make_loop_iterate_ntimes): Dump condition was changed.
        (slpeel_tree_duplicate_loop_to_edge_cfg): Likewise.
        (slpeel_tree_peel_loop_to_edge): Likewise.

        (vect_analyze_offset_expr): Call to vect_print_dump_info with
        appropriate verbosity level instead of call to vect_debug_details
        or vect_debug_stats.
        (vect_get_base_and_offset):
        (vect_create_addr_base_for_vector_ref):
        (get_vectype_for_scalar_type):
        (vect_create_data_ref_ptr):
        (vect_init_vector):
        (vect_get_vec_def_for_operand):
        (vect_finish_stmt_generation):
        (vectorizable_assignment):
        (vectorizable_operation):
        (vectorizable_store):
        (vectorizable_load):
        (vect_transform_stmt):
        (vect_update_ivs_after_vectorizer):
        (vect_do_peeling_for_loop_bound):
        (vect_update_inits_of_drs):
        (vect_do_peeling_for_alignment):
        (vect_transform_loop):
        (vect_is_simple_use):
        (vect_analyze_operations):
        (vect_is_simple_iv_evolution):
        (vect_analyze_scalar_cycles):
        (vect_analyze_data_ref_dependence):
        (vect_analyze_data_ref_dependences):
        (vect_compute_data_ref_alignment):
        (vect_enhance_data_refs_alignment):
        (vect_analyze_data_refs_alignment):
        (vect_analyze_data_ref_access):
        (vect_analyze_data_ref_accesses):
        (vect_analyze_pointer_ref_access):
        (vect_get_memtag_and_dr):
        (vect_analyze_data_refs):
        (vect_mark_relevant):
        (vect_stmt_relevant_p):
        (vect_mark_stmts_to_be_vectorized):
        (vect_can_advance_ivs_p):
        (vect_get_loop_niters):
        (vect_analyze_loop_form):
        (vect_analyze_loop):
        (vectorize_loops): Likewise.

        (vect_do_peeling_for_loop_bound): Dump format slightly changed.
        (vect_update_inits_of_drs):
        (vect_do_peeling_for_alignment):
        (vect_transform_loop):
        (vect_analyze_operations):
        (vect_analyze_scalar_cycles):
        (vect_analyze_data_ref_dependences):
        (vect_analyze_data_refs_alignment):
        (vect_analyze_data_ref_accesses):
        (vect_analyze_data_refs):
        (vect_mark_stmts_to_be_vectorized):
        (vect_get_loop_niters):
        (vect_analyze_loop_form):
        (vect_analyze_loop): Likewise.
        (vect_mark_stmts_to_be_vectorized): Add call to print_generic_expr.

Co-Authored-By: Dorit Naishlos <dorit@il.ibm.com>

From-SVN: r94697
2005-02-07 10:07:07 +00:00
Leehod Baruch
7353a8c12a tree-vectorizer.h (LOC): New type.
* tree-vectorizer.h (LOC): New type.
        (UNKNOWN_LOC, EXPR_LOC, LOC_FILE, LOC_LINE): New macros.
        (loop_line_number): New field in struct _loop_vec_info.
        (LOOP_VINFO_LOC, LOOP_LOC): New macros.

        * tree-vectorizer.c (input.h): Included.
        (find_loop_location): New function.
        (vect_debug_stats): Argument changed from loop to LOC. Computation of
        loop line number removed.
        (vect_debug_details): Likewise.
        (new_loop_vec_info): Initialize new field LOOP_VINFO_LOC.

        (slpeel_make_loop_iterate_ntimes): Call find_loop_location. Argument in
        call to vect_debug_details/stats changed from loop to loop_loc.
        (slpeel_tree_duplicate_loop_to_edge_cfg): Likewise.
        (slpeel_tree_peel_loop_to_edge): Likewise.

        (vect_analyze_offset_expr): Argument in call to vect_debug_details/stats
        changed from NULL to UNKNOWN_LOC.
        (vect_get_base_and_offset):
        (vect_create_addr_base_for_vector_ref):
        (get_vectype_for_scalar_type):
        (vect_create_data_ref_ptr):
        (vect_init_vector):
        (vect_get_vec_def_for_operand):
        (vect_finish_stmt_generation):
        (vectorizable_assignment):
        (vectorizable_operation):
        (vectorizable_store):
        (vectorizable_load):
        (vect_transform_stmt):
        (vect_update_ivs_after_vectorizer):
        (vect_do_peeling_for_loop_bound):
        (vect_do_peeling_for_alignment):
        (vect_transform_loop):
        (vect_is_simple_use):
        (vect_analyze_operations):
        (vect_is_simple_iv_evolution):
        (vect_analyze_scalar_cycles):
        (vect_analyze_data_ref_dependences):
        (vect_compute_data_ref_alignment):
        (vect_enhance_data_refs_alignment):
        (vect_analyze_data_ref_access):
        (vect_analyze_data_ref_accesses):
        (vect_analyze_pointer_ref_access):
        (vect_get_memtag_and_dr):
        (vect_analyze_data_refs):
        (vect_mark_relevant):
        (vect_stmt_relevant_p):
        (vect_mark_stmts_to_be_vectorized):
        (vect_can_advance_ivs_p):
        (vect_get_loop_niters):
        (vect_analyze_loop):
        (vectorize_loops): Likewise.

        (vectorizable_load): Argument in call to vect_debug_details/stats
        changed from loop to LOOP_LOC (loop_vinfo).
        (vect_transform_loop):
        (vect_analyze_operations):
        (vect_analyze_scalar_cycles):
        (vect_analyze_data_ref_dependence):
        (vect_enhance_data_refs_alignment):
        (vect_analyze_data_ref_accesses):
        (vect_analyze_pointer_ref_access):
        (vect_analyze_data_refs):
        (vect_analyze_loop): Likewise.

        (vect_analyze_loop_form): Argument in call to vect_debug_details/stats
        changed from loop to loop_loc.

        (vect_enhance_data_refs_alignment): Removed unused variable loop.

From-SVN: r94662
2005-02-03 16:22:22 +00:00
Leehod Baruch
ef30229313 tree-vectorizer.c (vect_analyze_data_ref_dependence): Function declaration added.
* tree-vectorizer.c (vect_analyze_data_ref_dependence): Function
        declaration added.
        (vect_analyze_data_ref_dependences): Likewise.

        (vect_is_simple_use): Argument changed from loop structure to
        loop_vect_info structure.
        (vect_can_advance_ivs_p): Likewise.
        (vect_create_index_for_vector_ref): Likewise.
        (vect_update_ivs_after_vectorizer): Likewise.
        (new_stmt_vec_info): Likewise.

        (new_loop_vec_info): Second argument in call to new_stmt_vec_info was
        changed from loop to loop_vinfo.
        (vect_create_data_ref_ptr): First argument in call to
        vect_create_index_for_vector_ref was changed from loop to loop_vinfo.
        (vectorizable_assignment): Second argument in call to vect_is_simple_use
        was changed from loop to loop_vinfo.
        (vectorizable_operation): Likewise.
        (vectorizable_store): Likewise.
        (vect_mark_stmts_to_be_vectorized): Likewise.
        (vect_do_peeling_for_loop_bound): First argument in call to
        vect_update_ivs_after_vectorizer was changed from loop to loop_vinfo.
        (vect_analyze_operations): Argument in call to vect_can_advance_ivs_p
        was changed from loop to loop_vinfo.
        (vect_analyze_data_ref_dependences): Third argument in call to
        vect_analyze_data_ref_dependence was changed from loop to loop_vinfo.

        (vect_create_index_for_vector_ref): Get the loop from loop_vinfo.
        (vect_create_data_ref_ptr): Likewise.
        (vect_init_vector): Likewise.
        (vect_get_vec_def_for_operand): Likewise.
        (vectorizable_assignment): Likewise.
        (vectorizable_operation): Likewise.
        (vectorizable_store): Likewise.
        (vectorizable_load): Likewise.
        (vect_update_ivs_after_vectorizer): Likewise.
        (vect_is_simple_use): Likewise.
        (vect_analyze_data_ref_dependence): Likewise.
        (vect_analyze_pointer_ref_access): Likewise.
        (vect_can_advance_ivs_p): Likewise.

        * tree-vectorizer.h: (_loop_vec_info): Definition and macros moved
        before _stmt_vec_info.
        (_stmt_vec_info): Loop field replaced by loop_vec_info.
        (STMT_VINFO_LOOP): Replaced with STMT_VINFO_LOOP_VINFO.
        (new_stmt_vec_info): Argument changed from loop structure to
        loop_vect_info structure

        (vect_analyze_data_ref_dependences): Unnecessary line was removed.
        (vect_analyze_offset_expr): Avoid 80 columns overflow.
        (vect_create_addr_base_for_vector_ref): Likewise.
        (vect_analyze_pointer_ref_access): Likewise.

Co-Authored-By: Dorit Naishlos <dorit@il.ibm.com>

From-SVN: r94661
2005-02-03 16:13:17 +00:00
Dorit Naishlos
cce4ca5559 tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Copy EXPR_LOCUS from orig_cond to the new cond_stmt.
* tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Copy
        EXPR_LOCUS from orig_cond to the new cond_stmt.
        (vect_finish_stmt_generation): Copy EXPR_LOCUS from stmt to
        the new vec_stmt.


        * tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Call
        standard_iv_increment_position. Remove call to bsi_next
        (no need to bump the iterator anymore).
        (vect_create_index_for_vector_ref): Call
        standard_iv_increment_position. Remove second function argument.
        (vect_finish_stmt_generation): Remove call to bsi_next
        (no need to bump the iterator anymore).
        (vect_create_data_ref_ptr): Remove second argument (bsi) in call
        to vect_create_index_for_vector_ref.


        * tree-vectorizer.c (vect_mark_stmts_to_be_vectorized): Check if
        phis are used out of the loop.

From-SVN: r94651
2005-02-03 06:19:16 +00:00
Ira Rosen
261ba0c8db tree-vectorizer.c (vect_analyze_offset_expr): Use ssizetype instead sizetype.
2005-01-31  Ira Rosen  <irar@il.ibm.com>

        * tree-vectorizer.c (vect_analyze_offset_expr): Use ssizetype instead
        sizetype.
        (vect_get_base_and_offset): Use ssizetype instead sizetype. Remove
        redundant fold. Fix misalignment for MINUS_EXPR.
        (vect_compute_data_ref_alignment): Use ssizetype instead sizetype.
        (vect_analyze_pointer_ref_access): Likewise.
        (vect_get_memtag_and_dr): Likewise.

From-SVN: r94480
2005-01-31 11:51:01 +00:00
Kazu Hirata
3a2f1f0665 tree-flow-inline.h (phi_arg_from_edge): Remove.
* tree-flow-inline.h (phi_arg_from_edge): Remove.
	* tree-flow.h: Remove the corresponding prototype.
	* tree-ssa-operands.h, tree-ssa-threadupdate.c, tree-ssa.c,
	tree-vectorizer.c: Use dest_idx instead of phi_arg_from_edge.

From-SVN: r94183
2005-01-24 20:47:43 +00:00
Kazu Hirata
35fd3193de alias.c, [...]: Fix comment typos.
* alias.c, c-common.h, c-incpath.c, c-incpath.h, expr.c,
	fold-const.c, gimplify.c, params.h, tree-data-ref.c,
	tree-if-conv.c, tree-nested.c, tree-outof-ssa.c,
	tree-ssa-dom.c, tree-vectorizer.c, tree.def, config/darwin.c,
	config/freebsd-spec.h, config/arm/arm.h,
	config/h8300/h8300.md, config/i386/i386.md,
	config/i386/predicates.md, config/i386/sse.md,
	config/ia64/ia64.c, config/ip2k/ip2k.c, config/s390/s390.c,
	config/vax/vax.md: Fix comment typos.  Follow spelling
	conventions.

From-SVN: r94112
2005-01-23 15:05:49 +00:00
Kazu Hirata
ad616de14c basic-block.h, [...]: Update copyright.
* basic-block.h, c-common.c, c-cppbuiltin.c, c-lang.c,
	c-tree.h, cfgbuild.c, cgraph.c, cgraph.h, collect2.c,
	combine.c, config.gcc, coverage.h, cse.c, cselib.c,
	defaults.h, df.c, dwarf2asm.c, dwarf2out.c, explow.c, expr.c,
	flow.c, fold-const.c, gcse.c, ggc-page.c, gimple-low.c,
	gimplify.c, ifcvt.c, langhooks-def.h, lcm.c, optabs.h,
	output.h, postreload-gcse.c, postreload.c, recog.c,
	resource.c, rtl.def, rtlanal.c, sched-deps.c, sched-rgn.c,
	targhooks.h, toplev.c, tree-data-ref.c, tree-eh.c,
	tree-flow.h, tree-loop-linear.c, tree-mudflap.h, tree-nrv.c,
	tree-optimize.c, tree-outof-ssa.c, tree-pass.h,
	tree-scalar-evolution.c, tree-ssa-copy.c, tree-ssa-dce.c,
	tree-ssa-dse.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c,
	tree-ssa-pre.c, tree-ssa.c, tree-vectorizer.c, tree.def,
	unwind-dw2-fde-darwin.c, var-tracking.c: Update copyright.

From-SVN: r93827
2005-01-18 11:36:31 +00:00
Kazu Hirata
1618f9483f * tree-vectorizer.c, tree.def: Fix comment typos.
From-SVN: r93153
2005-01-10 19:34:36 +00:00
Dorit Naishlos
5a3ed97adb tree-vectorizer.c (vect_enhance_data_refs_alignment): Add dump prints.
* tree-vectorizer.c (vect_enhance_data_refs_alignment): Add dump prints.
        (vect_analyze_data_refs_alignment): Add dump prints.

        * gcc.dg/vect/pr18400.c: Add checks for alignment prints.
        * gcc.dg/vect/pr18425.c: Add checks for alignment prints.
        * gcc.dg/vect/pr18536.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-1.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-2.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-3.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-4.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-5.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-6.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-7.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-13.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-17.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-18.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-19.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-20.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-21.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-22.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-23.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-24.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-25.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-26.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-27.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-28.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-29.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-31.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-32.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-33.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-34.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-35.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-36.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-37.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-40.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-41.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-42.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-43.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-44.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-46.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-47.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-48.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-50.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-52.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-53.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-56.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-58.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-60.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-62.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-64.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-65.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-66.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-67.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-68.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-69.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-72.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-73.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-74.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-75.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-76.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-77.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-78.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-80.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-86.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-87.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-88.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-89.c: Add checks for alignment prints.
        * gcc.dg/vect/vect-all.c: Add checks for alignment prints.

        * gcc.dg/vect/vect-1.c: Fix spelling.
        * gcc.dg/vect/vect-10.c: Fix spelling.
        * gcc.dg/vect/vect-11.c: Fix spelling.
        * gcc.dg/vect/vect-12.c: Fix spelling.
        * gcc.dg/vect/vect-14.c: Fix spelling.
        * gcc.dg/vect/vect-15.c: Fix spelling.
        * gcc.dg/vect/vect-16.c: Fix spelling.
        * gcc.dg/vect/vect-46.c: Remove obsolete comment.
        * gcc.dg/vect/vect-64.c: Fix comments.
        * gcc.dg/vect/vect-none.c: Remove vectorizable loop.

Co-Authored-By: Ira Rosen <irar@il.ibm.com>

From-SVN: r93114
2005-01-09 17:30:24 +00:00
Ira Rosen
db5dc63d62 tree-vectorizer.c (vect_analyze_offset_expr): Use expr_invariant_in_loop_p.
2005-01-09  Ira Rosen  <irar@il.ibm.com>

        * tree-vectorizer.c (vect_analyze_offset_expr): Use
        expr_invariant_in_loop_p.
        Initialize outputs first thing in the function.
        (vect_update_ivs_after_vectorizer): Call initial_condition_in_loop_num.
        (vect_is_simple_iv_evolution): Call initial_condition_in_loop_num.
        (vect_analyze_pointer_ref_access): Check that the initial condition of
        the access function is loop invariant.

From-SVN: r93113
2005-01-09 15:12:36 +00:00
Ira Rosen
8c427b58d1 tree-vectorizer.c (vect_analyze_offset_expr): Test for INTEGER_CST instead of TREE_CONSTANT.
2005-01-04  Ira Rosen  <irar@il.ibm.com>

        * tree-vectorizer.c (vect_analyze_offset_expr): Test for
        INTEGER_CST instead of TREE_CONSTANT.
        (vect_gen_niters_for_prolog_loop): Test for INTEGER_CST
        instead of TREE_CONSTANT.
        (vect_analyze_pointer_ref_access): Test for INTEGER_CST
        instead of TREE_CONSTANT.

From-SVN: r92894
2005-01-04 13:12:26 +00:00
Ira Rosen
7d23434bbe tree-vectorizer.c (vect_strip_conversions): New function.
2005-01-03  Ira Rosen  <irar@il.ibm.com>

        * tree-vectorizer.c (vect_strip_conversions): New function.
        (vect_analyze_offset_expr): Call vect_strip_conversions. Add
        check for binary class.

From-SVN: r92888
2005-01-04 07:56:51 +00:00
Richard Henderson
155a821372 tree-vectorizer.c (vect_analyze_offset_expr): Strip conversions that don't narrow the value.
* tree-vectorizer.c (vect_analyze_offset_expr): Strip conversions
        that don't narrow the value.  Fail for other conversions.

From-SVN: r92804
2005-01-02 00:35:34 -08:00
Dorit Nuzman
263db5562a tree-vectorizer.c (vect_get_base_and_offset): Adjust call too get_inner_reference (missing argument).
* tree-vectorizer.c (vect_get_base_and_offset): Adjust call too
        get_inner_reference (missing argument).

From-SVN: r92705
2004-12-29 13:54:29 +00:00
Ira Rosen
9479075aa0 re PR tree-optimization/18179 (vectorizer: wrong alignment/step/initial-address computed for struct accesses)
2004-12-29  Ira Rosen  <irar@il.ibm.com>

        PR tree-optimization/18179
        * tree-vectorizer.c (vect_get_base_and_offset): Call get_inner_reference
        and vect_analyze_offset_expr.
        (vect_create_addr_base_for_vector_ref): Build address_base by combining
        base and initial_offset fields of vect_stmt_info.
        (vect_update_inits_of_dr): Update offset of data-ref instead of its
        access-fn. Remove argument.
        (vect_update_inits_of_drs): Call vect_update_inits_of_dr with new
        arguments.
        (vect_compute_data_ref_alignment): Check misalignment info in
        vect_stmt_info. Remove argument.
        (vect_compute_data_refs_alignment): Call vect_compute_data_ref_alignment
        with correct argument.
        (vect_analyze_data_ref_access): Check access info in vect_stmt_info.
        (vect_analyze_pointer_ref_access): Update step and initial_offset fields
        of vect_stmt_info.
        (vect_get_memtag_and_dr): Call vect_get_base_and_offset and set the
        fields of stmt_vec_info.
        (vect_analyze_data_refs): Find vectype and pass it to
        vect_get_memtag_and_dr.
        (vect_get_first_index): Remove.
        (vect_compute_array_base_alignment): Remove.
        (vect_compute_array_ref_alignment): Remove
        (vect_create_data_ref_ptr): Use TYPE_SIZE_UNIT instead GET_MODE_SIZE.
        (vect_gen_niters_for_prolog_loop): Use TREE_CONSTANT instead
        host_integerp.
        (vectorizable_load): Use size arithmetics.

From-SVN: r92704
2004-12-29 13:38:30 +00:00
Ira Rosen
21c58af545 re PR tree-optimization/18179 (vectorizer: wrong alignment/step/initial-address computed for struct accesses)
2004-12-29  Ira Rosen  <irar@il.ibm.com>

        PR tree-optimization/18179
        * tree-vectorizer.c (vect_get_base_and_offset): Rename (previous name
        vect_get_base_and_bit_offset).
        (vect_get_memtag_and_dr): Rename (previous name vect_get_symbl_and_dr).

From-SVN: r92702
2004-12-29 13:20:35 +00:00
Ira Rosen
1de6a87312 re PR tree-optimization/18179 (vectorizer: wrong alignment/step/initial-address computed for struct accesses)
2004-12-29  Ira Rosen  <irar@il.ibm.com>

        PR tree-optimization/18179
        * tree-vectorizer.h (struct _stmt_vec_info): Add new fields:
        initial_offset, step, misalignment and base_aligned_p and macros
        to access them.
        * tree-vectorizer.c (vect_analyze_offset_expr): New function.
        (new_stmt_vec_info): Initialize the new fields of stmt_vec_info.

        (vect_create_data_ref_ptr): Fix printings.

From-SVN: r92701
2004-12-29 13:16:07 +00:00
Ira Rosen
6e611d9276 re PR tree-optimization/18179 (vectorizer: wrong alignment/step/initial-address computed for struct accesses)
2004-12-29  Ira Rosen  <irar@il.ibm.com>

        PR tree-optimization/18179
        * tree-vectorizer.c (vect_get_symbl_and_dr): Reorganize. Add memtag
        retrieval.
        (vect_analyze_data_refs): Remove memtag retrieval.

From-SVN: r92700
2004-12-29 13:11:58 +00:00
Dorit Naishlos
2b0729bafa * tree-vectorizer.c (vect_mark_relevant) First argument changed from
varray_type to varray_type*.
        (vect_mark_stmts_to_be_vectorized): Pass &worklist instead of worklist
        when calling vect_mark_relevant.

From-SVN: r92671
2004-12-28 12:44:29 +00:00
Richard Henderson
1e0598e25c optabs.h (OTI_movmisalign, [...]): New.
* optabs.h (OTI_movmisalign, movmisalign_optab): New.
        * optabs.c (init_optabs): Create it.
        * genopinit.c (optabs): Initialize it.
        * expr.c (expand_expr_real_1) <MISALIGNED_INDIRECT_REF>: Use it.
        * tree-vectorizer.c (vect_supportable_dr_alignment): Likewise.
        * target-def.h (TARGET_VECTORIZE_MISALIGNED_MEM_OK): Remove.
        * target.h (vectorize.misaligned_mem_ok): Remove.
        * targhooks.c (default_vect_misaligned_mem_ok): Remove.
        * doc/md.texi (movmisalign): New.
        * doc/tm.texi (TARGET_VECTORIZE_MISALIGNED_MEM_OK): Remove.

From-SVN: r92537
2004-12-22 23:58:41 -08:00
Diego Novillo
7d5f9cc68f tree-into-ssa.c (REWRITE_THIS_STMT): Define.
* tree-into-ssa.c (REWRITE_THIS_STMT): Define.
	(mark_def_sites): Clear REWRITE_THIS_STMT for statements that
	don't need any operands rewritten.
	(rewrite_stmt): Ignore statements that don't need to be
	rewritten.
	(rewrite_operand): Validate that an existing SSA_NAME is
	identical to the current reaching definition of the operand.


	* tree-dfa.c (mark_call_clobbered_vars_to_rename): New function.
	* tree-vectorizer.c (vectorizable_load): Call it.
	* tree-flow.h (mark_call_clobbered_vars_to_rename): Declare.
	* tree-sra.c (mark_all_v_defs): Also mark VUSEs for renaming.

From-SVN: r92010
2004-12-10 16:54:42 -05:00
Dorit Naishlos
bfe5acd6af re PR tree-optimization/18716 ([ICE] verify_flow_info failed (loop))
PR tree-opt/18716
        * tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Properly set
        then and else labels.

From-SVN: r91637
2004-12-02 14:00:30 +00:00
Nathan Sidwell
c21accc5d9 tree-vectorizer.c (vect_analyze_data_refs): Reformat and avoid uninitialized variable.
2004-11-30  Nathan Sidwell  <nathan@codesourcery.com>

        * tree-vectorizer.c (vect_analyze_data_refs): Reformat and avoid
        uninitialized variable.

From-SVN: r91543
2004-11-30 15:28:54 -08:00
Ira Rosen
f2b60e4039 re PR tree-optimization/18607 (Vectorizer: data_reference is overwritten in vect_analyze_data_refs)
2004-11-30  Ira Rosen  <irar@il.ibm.com>

        PR tree-opt/18607
        * tree-vectorizer.c (vect_analyze_data_refs): Use temporary
        variable for data_reference when looking for memtag.

From-SVN: r91521
2004-11-30 14:40:38 +00:00
Dorit Naishlos
37ea4e6756 tree-vectorizer.c (vect_gen_niters_for_prolog_loop): Use tree_low_cst instead of TREE_INT_CST_LOW.
* tree-vectorizer.c (vect_gen_niters_for_prolog_loop): Use
	tree_low_cst instead of TREE_INT_CST_LOW.

From-SVN: r91518
2004-11-30 13:24:16 +00:00
Dorit Naishlos
d75bf0cab4 tree-vectorizer.c (vect_can_force_dr_alignment_p): Return false for decls that are assembled before vectorization takes place.
* tree-vectorizer.c (vect_can_force_dr_alignment_p): Return false for
	decls that are assembled before vectorization takes place.
	(vect_compute_data_ref_alignment): Set DECL_USER_ALIGN to 1.

From-SVN: r91517
2004-11-30 13:19:54 +00:00
Kazu Hirata
d2e398dfc8 tree-phinodes.c (add_phi_arg): Take "tree" instead of "tree *" as the first argument.
* tree-phinodes.c (add_phi_arg): Take "tree" instead of
	"tree *" as the first argument.
	* tree-flow.h: Update the prototype of add_phi_arg.
	* lambda-code.c, tree-cfg.c, tree-into-ssa.c,
	tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-pre.c,
	tree-ssa-threadupdate.c, tree-ssa.c, tree-tailcall.c,
	tree-vectorizer.c: Update all call sites of add_phi_arg.

From-SVN: r91307
2004-11-25 22:31:09 +00:00
Dorit Naishlos
e9c00ceb85 tree-vectorizer.c (vect_analyze_operations): Don't vectorize if the vectorization factor is greater than the iteration count.
* tree-vectorizer.c (vect_analyze_operations): Don't vectorize if
        the vectorization factor is greater than the iteration count.
        (vect_gen_niters_for_prolog_loop): No need to calculate min if the
        iteration count is known.

        (vect_build_symbol_bound): Removed. Its functionality moved to
        vect_generate_tmps_on_preheader.
        (vect_generate_tmps_on_preheader): Moved content of
        vect_build_symbol_bound here instead of calling it.  Changed some
        variables names.

        (vect_build_loop_niters): We don't expect a new_bb to be generated -
        use gcc_assert.
        (vect_gen_niters_for_prolog_loop): Likewise.
        (vect_gen_niters_for_prolog_loo): Likewise.

        (slpeel_make_loop_iterate_ntimes): Use buildN instead of build.
        (slpeel_add_loop_guard): Likewise.
        (slpeel_tree_peel_loop_to_edge): Likewise.
        (vect_do_peeling_for_alignment): Likewise.

        (vect_get_first_index): Missing space.

From-SVN: r91100
2004-11-23 19:43:11 +00:00
Dorit Naishlos
e088c55299 re PR tree-optimization/18403 (FAILs to vectorize testcases on ppc64-linux)
PR tree-opt/18403
        PR tree-opt/18505
        * tree-vectorizer.c (vect_create_data_ref_ptr): Use
        lang_hooks.types.type_for_size instead of integer_type_node for the
        type of ptr_update.

From-SVN: r91081
2004-11-23 09:19:24 +00:00
Dorit Naishlos
618bb89c87 re PR tree-optimization/18536 (ICE: in emit_move_insn, at expr.c:2590 with -ftree-vectorize -msse2)
PR tree-opt/18536
        * tree-vectorizer.c (make_loop_iterate_ntimes): Use type of niters when
        creating iv instead of integer_type.
        (vect_build_loop_niters): Remove redundant code.
        (vect_transform_loop_bound): Removed (duplicates functionality of
        make_loop_iterate_ntimes.
        (vect_gen_niters_for_prolog_loop): Add documentation. Call
        lang_hooks.types.type_for_size to create a type of the required size.
        Use that type instead of integer_type. Remove redundant code.
        (vect_update_niters_after_peeling): Use type of niters instead of
        integer_type.
        (vect_transform_loop): Unify handling of known and unknown loop bound
        cases. Call make_loop_iterate_ntimes instead of
        vect_transform_loop_bound.

From-SVN: r91014
2004-11-22 13:55:05 +00:00
Dorit Naishlos
2fa2d802da re PR tree-optimization/18544 (ICE with -ftree-vectorize)
PR tree-opt/18544
        * tree-vectorizer.c (vect_analyze_data_refs): Fail if memtag not found.

From-SVN: r91011
2004-11-22 13:41:57 +00:00
Kazu Hirata
e7a531ae61 tree-ssa-threadupdate.c, [...]: Fix comment typos.
* tree-ssa-threadupdate.c, tree-vectorizer.c: Fix comment
	typos.
	* config/arm/arm.c: Follow spelling conventions.

From-SVN: r90963
2004-11-20 12:48:15 +00:00
Andreas Tobler
1d8a9009f5 tree-vectorizer.c (slpeel_verify_cfg_after_peeling): Define only if checking is enabled.
2004-11-19  Andreas Tobler  <a.tobler@schweiz.ch>

	* tree-vectorizer.c (slpeel_verify_cfg_after_peeling): Define only
	if checking is enabled.

From-SVN: r90939
2004-11-19 22:56:19 +01:00
Dorit Naishlos
63dfe6ff6f re PR tree-optimization/18181 (vectorizer: problem in the peeling mechanism in the presence of loop invariants that are used after the loop)
PR tree-opt/18181
        * tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Peeling scheme
        changed to suppoer uses-after-loop and to void creating flow paths
        that shouldn't exist.
        (slpeel_update_phi_nodes_for_guard): Takes additional two arguments.
        Modified to fit the new peeling scheme. Avoid quadratic behavior.
        (slpeel_add_loop_guard): Takes additional argument.
        (slpeel_verify_cfg_after_peeling): New function.
        (vect_update_ivs_after_vectorizer): Takes additional argument. Updated
        documentation. Use 'exit-bb' instead of creating 'new-bb'.
        (rename_variables_in_bb): Don't update phis for BBs out of loop, to fit
        the new peeling scheme.
        (copy_phi_nodes): Function removed. Its functionality moved to
        update_phis_for_duplicate_loop.
        (slpeel_update_phis_for_duplicate_loop): Functionality of copy_phi_nodes
        moved here. Added documentation. Modified to fit the new peeling scheme.
        (slpeel_make_loop_iterate_ntimes): Setting loop->single_exit not not
        needed - done in slpeel_tree_peel_loop_to_edge.
        (slpeel_tree_duplicate_loop_to_edge_cfg): Debug printouts compacted.
        (vect_do_peeling_for_loop_bound): Add documentation. Call
        slpeel_verify_cfg_after_peeling. Call vect_update_ivs_after_vectorizer
        with additional argument.
        (vect_do_peeling_for_alignment): Call slpeel_verify_cfg_after_peeling.

        (vect_finish_stmt_generation): Avoid 80 column oveflow.

From-SVN: r90932
2004-11-19 19:39:40 +00:00
Dorit Naishlos
335d3d5495 tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Last two arguments removed.
* tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Last two
        arguments removed.
        (slpeel_tree_peel_loop_to_edge): Call slpeel_make_loop_iterate_ntimes
        without last two arguments. Update single_exit of loops.
        (vect_update_niters_after_peeling): Removed. Its functionality was
        moved to vect_do_peeling_for_alignment.
        (vect_do_peeling_for_loop_bound): New name for function previously
        called vect_transform_for_unknown_loop_bound.
        (vect_transform_loop_bound): Call slpeel_make_loop_iterate_ntimes
        instead of code that duplicates the same functionality.
        (vect_do_peeling_for_alignment): Functionality of
        vect_update_niters_after_peeling moved here.
        (vect_transform_loop): Unify call to vect_do_peeling_for_loop_bound -
        previously named vect_transform_for_unknown_loop_bound - for both known
        and unknown loop bound cases.

From-SVN: r90931
2004-11-19 19:08:03 +00:00
Dorit Naishlos
d690175432 tree-vectorizer.c (slpeel_can_duplicate_loop_p): New name for function previously called verify_loop_for_duplication.
* tree-vectorizer.c (slpeel_can_duplicate_loop_p): New name for function
        previously called verify_loop_for_duplication. All conditions compacted
        into one compound condition. Removed debug dumps.
        (vect_analyze_loop_with_symbolic_num_of_iters): Removed. Some of the
        functionality moved to vect_can_advance_ivs_p, and some to
        vect_analyze_loop_form.
        (vect_can_advance_ivs_p): New function. Contains functionality that was
        taken out of vect_analyze_loop_with_symbolic_num_of_iters.
        (slpeel_tree_peel_loop_to_edge): Call slpeel_can_duplicate_loop_p.
        (vect_analyze_operations): Call vect_can_advance_ivs_p and
        slpeel_can_duplicate_loop_p.
        (vect_get_loop_niters): Added documentation.
        (vect_analyze_loop_form): Check the loop entry always - not only in case
        of unknown loop bound. Create preheader and exit bb if necessary. Apply
        a check that used to take place in
        vect_analyze_loop_with_symbolic_num_of_iters.
        (vectorize_loops): Call verify_loop_closed_ssa under ENABLE_CHECKING.
        Remove redundant call to rewrite_into_loop_closed_ssa.
        (vect_compute_data_refs_alignment): Removed obsolete comment.

From-SVN: r90930
2004-11-19 19:03:56 +00:00
Dorit Naishlos
f88a8cfa39 tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): New name for function previously called tree_duplicate_loop_to_edge.
* tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): New name for
        function previously called tree_duplicate_loop_to_edge.
        (slpeel_tree_duplicate_loop_to_edge_cfg): New name for function
        previously called tree_duplicate_loop_to_edge_cfg.
        (slpeel_update_phis_for_duplicate_loop): Prefix 'slpeel' added to
        function name.
        (slpeel_update_phi_nodes_for_guard): Likewise.
        (slpeel_make_loop_iterate_ntimes): Likewise.
        (slpeel_add_loop_guard): Likewise.
        (allocate_new_names, free_new_names): Function declaration moved to top
        of file.
        (rename_use_op, rename_def_op): Likewise.
        (rename_variables_in_bb, rename_variables_in_loop): Likewise.
        (vect_generate_tmps_on_preheader): Function declaration moved.
        (vect_transform_for_unknown_loop_bound): Added missing function
        declaration.

From-SVN: r90929
2004-11-19 18:58:55 +00:00
Kazu Hirata
a62346841c tree-cfg.c (verify_expr): Replace TREE_OPERAND with COND_EXPR_COND.
* tree-cfg.c (verify_expr): Replace TREE_OPERAND with
	COND_EXPR_COND.
	* tree-if-conv.c (tree_if_convert_cond_expr): Likewise.
	* tree-ssa-dom.c (thread_across_edge): Likewise.
	* tree-vectorizer.c (vect_transform_loop_bound): Replace
	TREE_OPERAND with COND_EXPR_COND, COND_EXPR_THEN, or
	COND_EXPR_ELSE.

From-SVN: r90703
2004-11-16 00:05:30 +00:00