This is an archive of the discontinued LLVM Phabricator instance.

[Flang][openmp][1/5] Make Allocate clause part of OmpClause
ClosedPublic

Authored by sameeranjoshi on Dec 21 2020, 9:25 AM.

Details

Summary

After discussion in D93482 we found that the some of the clauses were not
following the common OmpClause convention.

The benefits of using OmpClause:

  • Functionalities from structure checker are mostly aligned to work with llvm::omp::Clause.
  • The unparsing as well can take advantage.
  • Homogeneity with OpenACC and rest of the clauses in OpenMP.
  • Could even generate the parser with TableGen, when there is homogeneity.
  • It becomes confusing when to use flangClass and flangClassValue inside TableGen, if incase we generate parser using TableGen we could have only a single let expression.

This patch makes allocate clause part of OmpClause.The unparse function for
OmpAllocateClause is adapted since the keyword and parenthesis are issued by
the corresponding unparse function for parser::OmpClause::Allocate.

Diff Detail

Event Timeline

sameeranjoshi created this revision.Dec 21 2020, 9:25 AM
sameeranjoshi requested review of this revision.Dec 21 2020, 9:25 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: sstefan1. · View Herald Transcript
clementval accepted this revision.Dec 21 2020, 9:34 AM

Thanks for working on this. LGTM

This revision is now accepted and ready to land.Dec 21 2020, 9:34 AM
This revision was landed with ongoing or failed builds.Dec 21 2020, 11:23 PM
This revision was automatically updated to reflect the committed changes.