This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Added codegen for masked directive
ClosedPublic

Authored by cchen on Apr 14 2021, 3:27 PM.

Diff Detail

Event Timeline

cchen created this revision.Apr 14 2021, 3:27 PM
cchen requested review of this revision.Apr 14 2021, 3:27 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
ABataev added inline comments.Apr 15 2021, 5:19 AM
clang/lib/CodeGen/CGStmtOpenMP.cpp
3853–3855

No need for braces here

clang/test/OpenMP/masked_codegen.cpp
87

Add a test with filter clauses

cchen updated this revision to Diff 337797.Apr 15 2021, 9:40 AM

Update test and fix code format

This revision is now accepted and ready to land.Apr 15 2021, 10:36 AM
This revision was landed with ongoing or failed builds.Apr 15 2021, 10:55 AM
This revision was automatically updated to reflect the committed changes.

Any reason we should not unconditionally use the OMPIRBuilder impl? (btw, many thanks for providing one!)
We have an OMPIRBuilder always around in clang's codegen, so there is little reason not to use it if it is feature complete.

Also, don't forget to mark it as done in https://clang.llvm.org/docs/OpenMPSupport.html :)

Any reason we should not unconditionally use the OMPIRBuilder impl? (btw, many thanks for providing one!)
We have an OMPIRBuilder always around in clang's codegen, so there is little reason not to use it if it is feature complete.

I'm fine using OMPIRBuilder as default. I was not set it as default since most of the clause/directive are still using Clang codegen as default (ex: master, critical, and for are now use Clang codegen as default).

Also, don't forget to mark it as done in https://clang.llvm.org/docs/OpenMPSupport.html :)

I'll mark it as done after combined constructs are also done. Thanks!

Any reason we should not unconditionally use the OMPIRBuilder impl? (btw, many thanks for providing one!)
We have an OMPIRBuilder always around in clang's codegen, so there is little reason not to use it if it is feature complete.

I'm fine using OMPIRBuilder as default. I was not set it as default since most of the clause/directive are still using Clang codegen as default (ex: master, critical, and for are now use Clang codegen as default).

Initially we did not have an OMPIRBuilder object unconditionally, now we have. Let's move over everything that is ready. So master and critical should be good to go as well I suppose.

cchen added a comment.Apr 16 2021, 3:25 PM

Initially we did not have an OMPIRBuilder object unconditionally, now we have. Let's move over everything that is ready. So master and critical should be good to go as well I suppose.

While using OMPIRBuilder as default, do we want to just remove codegen in Clang or we have a flag for using Clang codegen?

Initially we did not have an OMPIRBuilder object unconditionally, now we have. Let's move over everything that is ready. So master and critical should be good to go as well I suppose.

While using OMPIRBuilder as default, do we want to just remove codegen in Clang or we have a flag for using Clang codegen?

No duplication where it is not necessary. So if the OMPIRBuilder is fully capable use it remove the clang codegen, please.

Use irbuilder for masked and master construct: https://reviews.llvm.org/D100874.