Page MenuHomePhabricator

[flang][OpenMP] Support privatization for single construct
Changes PlannedPublic

Authored by peixin on Jun 25 2022, 11:18 PM.

Details

Summary

This supports the lowering of private and firstprivate clauses in single
construct. The OutlineableOpenMPOpInterface is added in order to get
the alloca block. No need to emit barrier for firstprivate clause since
there is one thread running the single region and no data-race problem.

Depends on D128595.

Diff Detail

Event Timeline

peixin created this revision.Jun 25 2022, 11:18 PM
peixin requested review of this revision.Jun 25 2022, 11:18 PM

I am preparing one patch to fix the same data-race problem in classic-flang. I noticed it seems the barrier is not necessary for task and single constructs. BTW, our test team found that the data race problem is more obvious when both firstprivate and lastprivate exist, even not only for pointer variables. Once we agree on a final decision on the data-race problem, I will submit one similar patch to classic-flang, too.

peixin planned changes to this revision.Jul 7 2022, 6:08 PM