This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] vectorizer - improve loop location reports - part2


This is the second part of the patch described here: 
http://gcc.gnu.org/ml/gcc-patches/2005-01/msg00664.html

This patch consists of:
1. New function that computes the correct loop location (gets it from the 
loop exit condition if possible). It is called once, and the information 
is stored in a new field in loop_vec_info.
2. The rest is a technical update of all calls to vect_debug_details/stats 
to pass loop-location instead of loop.

(Also coming up:
- A patch to maintain the line-number information of the statements in the 
vectorized loop.
- A patch to add verbosity levels to the vectorizer's dump reports).

Reviewed by Dorit. Bootstrapped and tested on powerpc-suse-linux, 
i686-pc-linux-gnu and powerpc-darwin. 

ok for mainline?

Thanks,
Leehod

ChangeLog:
        * 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.


Patch:



For convenience:

Attachment: looplineno.part2
Description: Binary data

Attachment: looplineno.parts1and2
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]