[PATCH] D158462: [OMPIRBuilder] Fix shared clause for task construct
Prabhdeep Soni via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 21 14:58:47 PDT 2023
psoni2628 created this revision.
psoni2628 added reviewers: jdoerfert, kiranchandramohan, domada, shraiysh, dcaballe, clementval, ftynse.
psoni2628 added a project: OpenMP.
Herald added subscribers: gysit, Dinistro, bviyer, 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, hiraditya.
Herald added a project: All.
psoni2628 requested review of this revision.
Herald added subscribers: llvm-commits, jplehr, sstefan1, stephenneuendorffer, nicolasvasilache.
Herald added projects: MLIR, LLVM.
This patch fixes the shared clause for the task construct with multiple shared variables. The `shareds` field in the `kmp_task_t` is not an inline array in the struct, rather it is a pointer to an array. With an inline array, the pointer dereference to the outlined function body of the task would segmentation fault when accessed by the runtime.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158462
Files:
llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
mlir/test/Target/LLVMIR/openmp-llvm.mlir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158462.552144.patch
Type: text/x-patch
Size: 14802 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230821/49b0ebb2/attachment.bin>
More information about the llvm-commits
mailing list