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] |
This is a cleanup patch. It removes a redundant pass through all the ddrs, and replaces it with a field that is set during already existing data dependencies check. There's no real change in the behavior of the vectorizer. The removed pass checked whether there are load-store and store-store dependencies in the loop. If such dependencies were found, strided access analysis was not called. While the actual problem occurs only when there are two statements in the loop that access the exact same location (dependence distance of 0), since in all other cases our analysis prevents vectorization anyway. Therefore, the additional pass is redundant. With this patch in case there are a load and a store that access the same memory location, we mark the load in the _stmt_vec_info structure. The case of two stores to the same location is now handled in vect_analyze_data_ref_access. Testcase is included. Bootstrapped and tested on ppc-linix. O.K. for mainline? Thanks, Ira ChangeLog entry: * tree-vectorizer.h (struct _stmt_vec_info): Add new field read_write_dep and macros for its access. * tree-vectorizer.c (new_stmt_vec_info): Initialize the new field. * tree-vect-analyze.c (vect_analyze_data_ref_dependence): Remove argument, call vect_check_interleaving for every independent pair of data-refs. Mark loads that access the same memory location as a store in the loop. (vect_check_dependences): Remove. (vect_analyze_data_ref_dependences): Remove vect_check_dependences call, fix the call to vect_analyze_data_ref_dependence. (vect_analyze_data_ref_access): For statements that access the same data-ref, check that they are not stores; for loads, check that there is no store that access the same location. The patch: (See attached file: same_dr.txt) :ADDPATCH SSA (vectorizer):
Attachment:
same_dr.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |