[llvm] [OpenMPIRBuilder] Add support for target workshare loops (PR #73360)

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 11:14:38 PST 2023


================
@@ -2681,11 +2681,255 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::applyStaticChunkedWorkshareLoop(
   return {DispatchAfter, DispatchAfter->getFirstInsertionPt()};
 }
 
+// Returns an LLVM function to call for executing an OpenMP static worksharing
+// for loop depending on `type`. Only i32 and i64 are supported by the runtime.
+// Always interpret integers as unsigned similarly to CanonicalLoopInfo.
----------------
jdoerfert wrote:

The always unsigned rule seems odd. Is that a Fortran thing? We should not embed that here, C/C++ needs the signed version for sure. Add an argument to pick signed vs unsigned.

https://github.com/llvm/llvm-project/pull/73360


More information about the llvm-commits mailing list