[PATCH] D101435: [OpenMP][MLIR]Add support for guided, auto and runtime scheduling

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 28 04:40:58 PDT 2021


ftynse added a comment.

The MLIR part LGTM after comments are addressed.



================
Comment at: mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp:192-194
+      return opInst.emitOpError(
+          "only static (default), dynamic and guided loop "
+          "schedule is currently supported");
----------------
Haven't we covered all clauses?


================
Comment at: mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp:275
+    default:
+      assert(0 && "Unknown schedule value");
+      break;
----------------
llvm_unreachable


================
Comment at: mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp:279-280
+
+    afterIP = ompBuilder->createDynamicWorkshareLoop(
+        ompLoc, loopInfo, allocaIP, schedType, !loop.nowait(), chunk);
   }
----------------
Could we have a test that at list hits this code path? Does not need to be detailed, just the check that the calls to runtime functions are actually emitted, similarly to what we have for static loops.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101435/new/

https://reviews.llvm.org/D101435



More information about the llvm-commits mailing list