On Sat, Dec 03, 2011 at 09:58:17PM +0100, Thomas Koenig wrote:
> the recent discussion has convinced me that there is no way to
> mix OMP workshares and common function elimination as practiced by
> frontend-passes.c.  This patch therefore disables that
> particular optimization within workshares.
> 
> Regression-tested.  OK for trunk?

I think disabling these optimizations in workshare/parallel workshare
is reasonable, though perhaps you could enable it again in
EXEC_OMP_PARALLEL{,_DO,_SECTIONS} nested in the
EXEC_OMP_WORKSHARE/EXEC_OMP_PARALLEL_WORKSHARE.

E.g. in
  $omp parallel workshare
    a = b
    $omp parallel
      c = cos(d) + cos(d)
    $omp end parallel
    e = f
  $omp end parallel workshare
the body of the inner $omp parallel can be optimized just fine.

        Jakub

Reply via email to