[Bug tree-optimization/90573] New: Avoid unnecessary data transfer into OMP construct

tschwinge at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 22 13:59:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90573

            Bug ID: 90573
           Summary: Avoid unnecessary data transfer into OMP construct
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: openacc, openmp
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

As mentioned in PR90067: "it might generally be beneficial to have a pass
promoting 'firstprivate(x)' with a dominating write operation on 'x' to
'private(x)'".  This will avoid unnecessary data transfer for (all too common!)
code like:

    int i;
    #pragma acc parallel loop // implicit 'firstprivate(i)'
    for (i = 0; i < N; ++i)
      [...]

Similarly, there are cases where 'copy(x)' can be optimized to 'copyout(x)', or
'copyin(x)' to 'create(x)'.

This need not apply to implicit clauses only, but also to explicit ones, when
the user can't observe any difference.

The same applies to certain OpenMP clauses too, I suppose.


More information about the Gcc-bugs mailing list