This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/70154] New: [openacc] failing alias analysis in oacc kernels region


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

            Bug ID: 70154
           Summary: [openacc] failing alias analysis in oacc kernels
                    region
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Created attachment 37908
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37908&action=edit
kernels-alias-ipa-pta-fail.c, to be run in gcc/testsuite/c-c++-common/goacc/

parloops fails to parallelize this testcase.

After ipa-pta, we have:
...
  # VUSE <.MEM_2>
  # PT = nonlocal unit-escaped { D.1869 } (nonlocal, escaped)
  _5 = MEM[(const struct .omp_data_t.2D.1887 &).omp_data_i_4(D) clique 1 base
1].aD.1893;

  # .MEM_6 = VDEF <.MEM_2>
  *_5[i_1] = i_1;

  # VUSE <.MEM_6>
  # PT = nonlocal unit-escaped { D.1870 } (nonlocal, escaped)
  _7 = MEM[(const struct .omp_data_t.2D.1887 &).omp_data_i_4(D) clique 1 base
1].bD.1891;

  # .MEM_8 = VDEF <.MEM_6>
  *_7[i_1] = i_1;

  i_9 = i_1 + 1;

  goto <bb 3>;
...

If I remove the parallel region, I get this instead (so no more 'nonlocal
unit-escaped'), and parallelization succeeds:
...
  # PT = { D.1869 } (nonlocal, escaped)
  ...
  # PT = { D.1870 } (nonlocal, escaped)
...

The same happens if I instead remove the data enter/exit bits.

My first suspicion was that the oacc internal fns were missing certain
annotations that should help ipa-tpa. But the fact that the failure doesn't
seem to be tied to either the parallel construct, or the data enter/exit
construct makes me suspect that I'm running into some ipa-pta limitation.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]