Page MenuHomePhabricator

[OpenMP][OMPBuilder] Adding support for `omp single`
ClosedPublic

Authored by fghanim on Aug 9 2020, 12:32 PM.

Details

Summary

This adds support for generating omp single, and necessary calls for
copyprivate clause.

Diff Detail

Event Timeline

fghanim created this revision.Aug 9 2020, 12:32 PM
fghanim requested review of this revision.Aug 9 2020, 12:32 PM

Feel free to add other reviewers. Thanks.

Looks fine to me. A few nits.

llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
324–327

Full stop missing.

327

what is the full form of this name?
Would IsSingle be a better name?

329

Nit: The

Thanks. will fix nits.

llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
327

what is the full form of this name?
Would IsSingle be a better name?

That's the name used for it in the runtime. While it doesn't really matter, I am just using same name to be consistent.

fghanim updated this revision to Diff 285158.Aug 12 2020, 12:27 PM

Fixing nits

fghanim marked 3 inline comments as done.Aug 12 2020, 12:28 PM
kiranchandramohan added inline comments.
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
838

Where will this variable be updated to 1 to show it is the single thread?

This revision is now accepted and ready to land.Aug 14 2020, 4:29 PM
fghanim marked an inline comment as done.Aug 14 2020, 4:35 PM
fghanim added inline comments.
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
838

Inside the .... single region... below. Check line 3682 in D85619 to see actual update

This revision was landed with ongoing or failed builds.Aug 15 2020, 10:56 PM
This revision was automatically updated to reflect the committed changes.
fghanim marked an inline comment as done.