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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 09:13:52 PDT 2022


jdoerfert added inline comments.


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:1441
+      Value *DepArray =
+          Builder.CreateAlloca(DepArrayTy, nullptr, ".dep.arr.addr");
+
----------------
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.


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

https://reviews.llvm.org/D135695



More information about the llvm-commits mailing list