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] |
Hi, Consider this loop: for (i=0; i<N; i++) s *= i/2; when distributing the iterations to multiple threads, the shared variables need registered in a shared struct. For the case of the above loop, the only shared variable is the reduction var. For such cases, where there are no shared variables except reduction, the struct was not created. This is fixed in the attached patch. Another fix in this patch is explicitly NULLing the vect_dump global variable, because it is when vect_analyze_loop_form () is called from parloop pass. Bootstrapped and regtested for C,C++, Fortran on i586 OK? Thanks, Razya * tree-parloops.c (loop_parallel_p): NULL vect_dump. (separate_decls_in_region): Create shared struct even when there are only reductions.
Attachment:
diff_1.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |