Saieiei wrote:

> where the "task in_reduction" construct is not lexically nested inside the 
> taskgroup?

@dreachem I checked the runtime behavior for the orphaned-looking case. With a 
NULL descriptor, `__kmpc_task_reduction_get_th_data` walks the dynamic 
current-taskgroup chain from `th_current_task->td_taskgroup` through parent 
taskgroups.

So a task that is not lexically nested inside the `taskgroup task_reduction` 
can still be valid if it is dynamically/interprocedurally enclosed by a 
matching task reduction context. Clang does not diagnose this locally either.

Because of that, I did not add a translation-time verifier/diagnostic here. It 
could reject valid dynamic cases. A stricter missing-enclosing-context 
diagnostic would be better handled as a front-end/semantic follow-up if needed.


https://github.com/llvm/llvm-project/pull/202611
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to