[PATCH] D116292: [OMPIRBuilder][MLIR] Support ordered clause specified with parameter

Peixin Qiao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 26 18:26:29 PST 2021


peixin created this revision.
peixin added reviewers: kiranchandramohan, ftynse, Meinersbur, clementval, Leporacanthicus, kiranktp, jdoerfert, arnamoy10, bryanpkc.
peixin added projects: LLVM, MLIR.
Herald added subscribers: sdasgup3, wenzhicui, wrengr, Chia-hungDuan, dcaballe, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, hiraditya.
peixin requested review of this revision.
Herald added subscribers: llvm-commits, sstefan1, stephenneuendorffer, nicolasvasilache.

With ordered clause specified with parameter n, the n outer loops form a
doacross loop nest. Add applyDoacrossLoop to implement the doacross loop
"init" and "fini" runtime call in OpenMP IRBuilder. Add one virtual
clause in WsLoop MLIR Op to store the doacross loop bounds info.

In addition, move the barrier runtime call in the front of "after" basic
block, and set the insertion point at the end of "after" basic block.
With this change, lowering to LLVM IR is supported when dynamic schedule
is specified and collapse value is greater than 1. Also add the test
case.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116292

Files:
  llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
  llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
  llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
  mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
  mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
  mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
  mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir
  mlir/test/Dialect/OpenMP/invalid.mlir
  mlir/test/Dialect/OpenMP/ops.mlir
  mlir/test/Target/LLVMIR/openmp-llvm.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116292.396252.patch
Type: text/x-patch
Size: 46901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211227/e9410d53/attachment-0001.bin>


More information about the llvm-commits mailing list