diff options
author | Jing Yu <jingyu@google.com> | 2012-02-15 15:40:16 -0800 |
---|---|---|
committer | Jing Yu <jingyu@google.com> | 2012-02-15 15:40:16 -0800 |
commit | 3f73d6ef90458b45bbbb33ef4c2b174d4662a22d (patch) | |
tree | 1b5f0d96c51b51168b3713058a1b62e92f1136eb /gcc-4.6/gcc/tree-vect-data-refs.c | |
parent | d7030123e04baab5dbff9c9ee04c0de99bd9a774 (diff) | |
download | toolchain_gcc-3f73d6ef90458b45bbbb33ef4c2b174d4662a22d.tar.gz toolchain_gcc-3f73d6ef90458b45bbbb33ef4c2b174d4662a22d.tar.bz2 toolchain_gcc-3f73d6ef90458b45bbbb33ef4c2b174d4662a22d.zip |
Sync down FSF r184235@google/gcc-4_6_2-mobile branch
1) Get mostly new patches from FSF gcc-4.6 branch
2) Fix PR52129
3) Insert GNU-stack note for all ARM targets
Change-Id: I2b9926981210e517e4021242908074319a91d6bd
Diffstat (limited to 'gcc-4.6/gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc-4.6/gcc/tree-vect-data-refs.c | 55 |
1 files changed, 36 insertions, 19 deletions
diff --git a/gcc-4.6/gcc/tree-vect-data-refs.c b/gcc-4.6/gcc/tree-vect-data-refs.c index e0427c702..e39427716 100644 --- a/gcc-4.6/gcc/tree-vect-data-refs.c +++ b/gcc-4.6/gcc/tree-vect-data-refs.c @@ -1495,6 +1495,9 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo) stmt = DR_STMT (dr); stmt_info = vinfo_for_stmt (stmt); + if (!STMT_VINFO_RELEVANT (stmt_info)) + continue; + /* For interleaving, only the alignment of the first access matters. */ if (STMT_VINFO_STRIDED_ACCESS (stmt_info) @@ -2049,6 +2052,10 @@ vect_analyze_group_access (struct data_reference *dr) HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step); HOST_WIDE_INT stride, last_accessed_element = 1; bool slp_impossible = false; + struct loop *loop = NULL; + + if (loop_vinfo) + loop = LOOP_VINFO_LOOP (loop_vinfo); /* For interleaving, STRIDE is STEP counted in elements, i.e., the size of the interleaving group (including gaps). */ @@ -2079,11 +2086,18 @@ vect_analyze_group_access (struct data_reference *dr) if (loop_vinfo) { - LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true; - if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Data access with gaps requires scalar " "epilogue loop"); + if (loop->inner) + { + if (vect_print_dump_info (REPORT_DETAILS)) + fprintf (vect_dump, "Peeling for outer loop is not" + " supported"); + return false; + } + + LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true; } return true; @@ -2279,10 +2293,17 @@ vect_analyze_group_access (struct data_reference *dr) /* There is a gap in the end of the group. */ if (stride - last_accessed_element > 0 && loop_vinfo) { - LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true; if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Data access with gaps requires scalar " "epilogue loop"); + if (loop->inner) + { + if (vect_print_dump_info (REPORT_DETAILS)) + fprintf (vect_dump, "Peeling for outer loop is not supported"); + return false; + } + + LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true; } } @@ -2576,14 +2597,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); } - if (bb_vinfo) - { - /* Mark the statement as not vectorizable. */ - STMT_VINFO_VECTORIZABLE (stmt_info) = false; - continue; - } - else - return false; + return false; } if (TREE_CODE (DR_BASE_ADDRESS (dr)) == INTEGER_CST) @@ -2591,14 +2605,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) fprintf (vect_dump, "not vectorized: base addr of dr is a " "constant"); - if (bb_vinfo) - { - /* Mark the statement as not vectorizable. */ - STMT_VINFO_VECTORIZABLE (stmt_info) = false; - continue; - } - else - return false; + return false; } if (TREE_THIS_VOLATILE (DR_REF (dr))) @@ -2626,6 +2633,16 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, return false; } + if (is_gimple_call (stmt)) + { + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) + { + fprintf (vect_dump, "not vectorized: dr in a call "); + print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); + } + return false; + } + /* Update DR field in stmt_vec_info struct. */ /* If the dataref is in an inner-loop of the loop that is considered for |