[PATCH] D69828: [WIP][OpenMP] Lower taskwait using OpenMP IR Builder
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 6 14:56:44 PST 2019
jdoerfert added a comment.
> Also for taskwait inside untied tasks we should be reusing the available global_tid instead of calling __kmpc_global_thread_num again.
FWIW, calling `getThreadID(getIdent(SrcLocStr))` is the right thing to do here. We do use a cache in that method and at the end of the optimization pipeline, after inlining, etc. we can replace/merge `omp_get_thread_id`, `__kmpc_global_thread_num`, and `global_tid` arguments as a separate (more powerful) step.
================
Comment at: llvm/lib/IR/OpenMPIRBuilder.cpp:230
+ Builder.CreateCall(getRuntimeFunction(OMPRTL___kmpc_omp_taskwait), Args);
+}
----------------
I will modify my patch to allow an insertion point without block (in order to mimic Clang for now). Other than that in the `emit` vs. `create` thing, I think this is fine.
Nit: We both could actually cache `getIdent(SrcLocStr)` so we don't have to go through the map ;)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69828/new/
https://reviews.llvm.org/D69828
More information about the llvm-commits
mailing list