[PATCH] D135695: [OMPIRBuilder] Support depend clause for task construct

Prabhdeep Soni via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 18 08:33:55 PDT 2022


psoni2628 added inline comments.


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:1441
+      Value *DepArray =
+          Builder.CreateAlloca(DepArrayTy, nullptr, ".dep.arr.addr");
+
----------------
jdoerfert wrote:
> psoni2628 wrote:
> > jdoerfert wrote:
> > > Same question as before. How do you ensure the alloca is placed where you want it (which is the function entry block).
> > Isn't the insertion point set on L1356 in `OMPIRBuilder.cpp`  at the caller of the outlined function, i.e. the outlined function entry block? I thought it made sense to do the alloca in this same block, right after the `__kmpc_omp_task_alloc`. If not this one, which function entry block are you suggesting I should place the alloca in?
> Reading L1356, it looks like it is set to the call site of outlined function, which could be anywhere in current function, no? Allocas that only need to provide a single memory location for each function invocation should be placed in the function entry block.
That makes sense. Thanks for the clarification.


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

https://reviews.llvm.org/D135695



More information about the llvm-commits mailing list