[PATCH] D138495: [openmp][mlir] Lower parallel if to new fork_call_if function.

David Truby via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 06:26:12 PST 2022


DavidTruby created this revision.
Herald added subscribers: Moerafaat, zero9178, bzcheeseman, awarzynski, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, guansong, hiraditya, yaxunl.
Herald added a reviewer: ftynse.
Herald added a project: All.
DavidTruby requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, openmp-commits, sstefan1, stephenneuendorffer, nicolasvasilache.
Herald added a reviewer: dcaballe.
Herald added projects: OpenMP, MLIR, LLVM.

This patch adds a new runtime function `fork_call_if` and uses that
to lower parallel if statements when going through OpenMPIRBuilder.

This fixes an issue where the OpenMPIRBuilder passes all arguments to
fork_call as a struct but this struct is not filled corretly in the
non-if branch by handling the fork inside the runtime.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138495

Files:
  llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
  llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
  mlir/test/Target/LLVMIR/openmp-llvm.mlir
  openmp/runtime/src/kmp.h
  openmp/runtime/src/kmp_csupport.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138495.477171.patch
Type: text/x-patch
Size: 11048 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221122/bbd16682/attachment.bin>


More information about the llvm-commits mailing list