Skip to content

[flang][OpenMP] Added support for lowering OpenMP barrier construct #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 7, 2020
Merged

[flang][OpenMP] Added support for lowering OpenMP barrier construct #248

merged 5 commits into from
Jul 7, 2020

Conversation

SouraVX
Copy link
Collaborator

@SouraVX SouraVX commented Jul 7, 2020

This patch adds lowering support for OpenMP barrier construct to OpenMP Dialect operations.

Since this is the very first patch in this direction, so in order to support lowering, this patch do following infra setup:

  • registers OpenMPDialect for lowering.

  • registers OpenMPDialect as a legal Dialect to the legalizer.

  • Also setup some basic infrastructure to lower other OpenMP constructs. This is in spirit to convey the overall design of lowering to OpenMP Dialect.

  • Patch is mergeable/upstream, but since upstream flang doesn't have bbc so this can't be validated in upstream. However if community wants we can have review here and merge it in upstream(leaving the test case down stream in this branch).

SouraVX added 4 commits July 5, 2020 23:06
This patch adds lowering support for OpenMP barrier construct to
OpenMP Dialect operations.

In order to support lowering, this patch registers OpenMPDialect
and also adds OpenMPDialect to the legalizer.
@schweitzpgi
Copy link

primary tool bbc, which is required to validate this, is not present in upstream. That's why I preferred this here.
Rest of the stuff is there.

Unfortunately, we are still upstreaming code. Merging into fir-dev for the moment to eliminate divergence will benefit everyone involved. It allows building, testing, coordinating, and the upstreaming process not to be derailed by creating diverging forks of the code.

The good news is that upstreaming is continuing to close the gap.

- Replace switch case with individual case statement as per enum.
- Modified test case to use tco tool for validating lowering to llvmir.
@schweitzpgi schweitzpgi merged commit 7d3527d into flang-compiler:fir-dev Jul 7, 2020
SouraVX added a commit to llvm/llvm-project that referenced this pull request Jul 14, 2020
Summary:
This patch implements lowering of OpenMP barrier construct from
pft to OpenMPDialect.

Patch is carved out of following merged PR's from fir-dev branch
of https://github.com/flang-compiler/f18-llvm-project/

PR's:
flang-compiler#248
flang-compiler#251

Unfortunately primary tool `bbc` for functional validation is not
yet upstreamed. So this patch includes a unittest for lowering
`!OMP barrier` construct.

Some part of the these PR's still remains downstream(functional test
and dialect registration to legalizer) for obvious reasons.
Will upstream them when the dependencies are upstreamed.

Reviewed By: schweitz, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D83659
arichardson pushed a commit to arichardson/llvm-project that referenced this pull request Jul 15, 2020
Summary:
This patch implements lowering of OpenMP barrier construct from
pft to OpenMPDialect.

Patch is carved out of following merged PR's from fir-dev branch
of https://github.com/flang-compiler/f18-llvm-project/

PR's:
flang-compiler/f18-llvm-project#248
flang-compiler/f18-llvm-project#251

Unfortunately primary tool `bbc` for functional validation is not
yet upstreamed. So this patch includes a unittest for lowering
`!OMP barrier` construct.

Some part of the these PR's still remains downstream(functional test
and dialect registration to legalizer) for obvious reasons.
Will upstream them when the dependencies are upstreamed.

Reviewed By: schweitz, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D83659
mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this pull request Oct 7, 2022
Summary:
This patch implements lowering of OpenMP barrier construct from
pft to OpenMPDialect.

Patch is carved out of following merged PR's from fir-dev branch
of https://github.com/flang-compiler/f18-llvm-project/

PR's:
flang-compiler/f18-llvm-project#248
flang-compiler/f18-llvm-project#251

Unfortunately primary tool `bbc` for functional validation is not
yet upstreamed. So this patch includes a unittest for lowering
`!OMP barrier` construct.

Some part of the these PR's still remains downstream(functional test
and dialect registration to legalizer) for obvious reasons.
Will upstream them when the dependencies are upstreamed.

Reviewed By: schweitz, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D83659
NimishMishra pushed a commit to NimishMishra/f18-llvm-project that referenced this pull request Jun 27, 2024
Merge attempt by ../aomp/trunk/merge_from_main.sh into branch amd-trunk-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants