[PATCH] D155633: [OpenMP][OpenMPIRBuilder] Add kernel launch codegen to emitTargetCall

Jan Sjödin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 07:58:17 PDT 2023


jsjodin added inline comments.


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:4390
+      [&OMPBuilder, &Builder, &Inputs, &CBFunc,
+       &AllocaIP](StringRef EntryFnName) {
         return createOutlinedFunction(OMPBuilder, Builder, EntryFnName, Inputs,
----------------
jdoerfert wrote:
> Is the AllocaIP expected to be used later?
Even if it is, it should not be part of this patch. I will remove it. Good catch.


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:4403
+                           Function *OutlinedFn, Constant *OutlinedFnID,
+                           int32_t NumTeams, int32_t NumThreads,
+                           SmallVectorImpl<Value *> &Args,
----------------
jdoerfert wrote:
> Is this NumThreads or ThreadLimit, I assume the latter.
It should be the equivalent of llvm::Value *NumThreads = OMPRuntime->emitNumThreadsForTargetDirective(CGF, D); in clang, which looks a bit involved, but is essentially ThreadLimit from what I can tell.


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

https://reviews.llvm.org/D155633



More information about the llvm-commits mailing list