[PATCH] D102197: [OpenMP] Enable HeapToStack conversion in OpenMPOpt for new RTL globalization calls

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 10 14:06:33 PDT 2021


jhuber6 created this revision.
jhuber6 added a reviewer: jdoerfert.
Herald added subscribers: uenoku, guansong, hiraditya, yaxunl.
Herald added a reviewer: uenoku.
jhuber6 requested review of this revision.
Herald added a reviewer: sstefan1.
Herald added subscribers: llvm-commits, sstefan1.
Herald added a reviewer: baziotis.
Herald added a project: LLVM.

The changes to globalization introduced in D97680 <https://reviews.llvm.org/D97680> introduce a large amount of overhead by default. The old globalization method would always ignore globalization code if executing in SPMD mode. This wasn't strictly correct as data sharing is still possible in SPMD mode. The new interface is correct but introduces globalization code even when unnecessary. This optimization will use the existing HeapToStack transformation in the attributor to allow for unneeded globalization to be replaced with thread-private stack memory. This is done using the newly introduced library instances for the RTL functions added in D102087 <https://reviews.llvm.org/D102087>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102197

Files:
  llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
  llvm/lib/Transforms/IPO/OpenMPOpt.cpp
  llvm/test/Transforms/OpenMP/remove_globalization.ll
  llvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102197.344200.patch
Type: text/x-patch
Size: 6485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210510/ca0767cc/attachment.bin>


More information about the llvm-commits mailing list