diff options
author | Kewen Lin <linkw@linux.ibm.com> | 2023-05-17 02:48:40 -0500 |
---|---|---|
committer | Kewen Lin <linkw@linux.ibm.com> | 2023-05-17 02:48:40 -0500 |
commit | a04bf39f61ce7814d197d712760f08c206daf4f1 (patch) | |
tree | e64824b0486009a69cb6c5f1d1755917441c3c49 /gcc/cp/init.cc | |
parent | e0f2f4711794e3117db9e97164c674bd96a52fe6 (diff) | |
download | gcc-a04bf39f61ce7814d197d712760f08c206daf4f1.tar.gz |
vect: Don't retry if the previous analysis fails
When working on a cost tweaking patch, I found that a newly
added test case has different dumpings with stage-1 and
bootstrapped gcc. By looking into it, the apparent reason
is vect_analyze_loop_2 doesn't get slp_done_for_suggested_uf
set expectedly, the following retrying will use the garbage
slp_done_for_suggested_uf instead. In fact, the setting of
slp_done_for_suggested_uf only happens when the previous
analysis succeeds, for the mentioned test case, its previous
analysis does fail, it's unexpected to use the value of
slp_done_for_suggested_uf any more.
In function vect_analyze_loop_1, we only return success when
res is true, which is the result of 1st analysis. It means
we never try to vectorize with unroll_vinfo if the previous
analysis fails. So this patch shouldn't break anything, and
just stop some useless analysis early.
gcc/ChangeLog:
* tree-vect-loop.cc (vect_analyze_loop_1): Don't retry analysis with
suggested unroll factor once the previous analysis fails.
Diffstat (limited to 'gcc/cp/init.cc')
0 files changed, 0 insertions, 0 deletions