Hi! On Wed, 13 Apr 2016 18:01:09 +0200, I wrote: > On Fri, 08 Apr 2016 11:36:03 +0200, I wrote: > > On Thu, 10 Dec 2015 09:08:35 +0100, Jakub Jelinek <ja...@redhat.com> wrote: > > > On Wed, Dec 09, 2015 at 06:23:22PM +0100, Bernd Schmidt wrote: > > > > On 12/09/2015 05:24 PM, Thomas Schwinge wrote: > > > > >how about we split up gcc/omp-low.c into several > > > > >files? Would it make sense (I have not yet looked in detail) to do so > > > > >along the borders of the several passes defined therein? > > > > > I suspect a split along the ompexp/omplow boundary would be quite easy > > > > to > > > > achieve.
> > And possibly some kind of omp-simd.c, and omp-checking.c, and so > > on, if feasible. > > Not yet looked into these. ..., and here they are: word-diff patches creating omp-diagnostics.c and omp-simd.c, 0001-new-file-gcc-omp-diagnostics.c.patch.xz and 0002-new-file-gcc-omp-simd.c.patch.xz. The former contains the "diagnose_omp_blocks" pass and the latter the "simdclone" pass, with the respective supporting code. I will certainly submit line-diff patches if we agree that this is sound -- these two may actually be good candidates to do first, individually, and do that now, because they're completely self-contained. Makes sense? Should possibly rename omp-simd.c to omp-simd-clone.c to make it clear that's the only thing it does, the "simdclone" pass? Should we maybe rename omp-diagnostics.c to omp-structured-blocks.c, and really only have it contain that "diagnose_omp_blocks" pass, or should we move other diagnostic stuff like check_omp_nesting_restrictions into that file, too? One //OMPTODO: --- gcc/omp-low.h +++ gcc/omp-low.h @@ -95,0 +96,11 @@ extern gimple *build_omp_barrier (tree); +//OMPTODO: moved from omp-low.c. Renamed from WALK_SUBSTMTS to OMP_WALK_SUBSTMTS because of the very generic name. Used in omp-low.c and omp-diagnostics.c. Alternatively, WALK_SUBSTMTS should perhaps simply be duplicated in the two files? +#define OMP_WALK_SUBSTMTS \ + case GIMPLE_BIND: \ + case GIMPLE_TRY: \ + case GIMPLE_CATCH: \ + case GIMPLE_EH_FILTER: \ + case GIMPLE_TRANSACTION: \ + /* The sub-statements for these should be walked. */ \ + *handled_ops_p = false; \ + break; Instead of that, duplicate WALK_SUBSTMTS into both omp-low.c and omp-diagnostics.c? Grüße Thomas
0001-new-file-gcc-omp-diagnostics.c.patch.xz
Description: application/xz
0002-new-file-gcc-omp-simd.c.patch.xz
Description: application/xz