[Openmp-commits] [openmp] [OpenMP] Remove optimization skipping reduction struct initialization (PR #65697)

Shilei Tian via Openmp-commits openmp-commits at lists.llvm.org
Thu Sep 7 22:17:57 PDT 2023


================
@@ -2512,11 +2512,6 @@ void *__kmp_task_reduction_init(int gtid, int num, T *data) {
   KMP_ASSERT(tg != NULL);
   KMP_ASSERT(data != NULL);
   KMP_ASSERT(num > 0);
-  if (nth == 1) {
----------------
shiltian wrote:

Instead of completely removing the branch, it might be better to check if HHT is enabled. If no, then we can safely return here.

https://github.com/llvm/llvm-project/pull/65697


More information about the Openmp-commits mailing list