[Mlir-commits] [llvm] [mlir] [mlir][OpenMP] Translation support for taskloop construct (PR #174386)
Jack Styles
llvmlistbot at llvm.org
Tue Jan 6 04:13:39 PST 2026
================
@@ -2233,28 +2308,36 @@ void TaskContextStructManager::generateTaskContextStruct() {
"omp.task.context_ptr");
}
-void TaskContextStructManager::createGEPsToPrivateVars() {
- if (!structPtr) {
- assert(privateVarTypes.empty());
- return;
- }
+SmallVector<llvm::Value *> TaskContextStructManager::createGEPsToPrivateVars(
+ llvm::Value *altStructPtr) const {
+ assert(!privateVarTypes.empty());
----------------
Stylie777 wrote:
When working on clause support, the following example is hitting this assert.
```
program test
use omp_lib
implicit none
integer :: i
integer :: t1, t2
!$omp parallel
!$omp single
!$omp taskloop private(t1, t2)
do i = 1, 20
t1 = omp_get_thread_num()
!$omp taskyield
t2 = omp_get_thread_num()
if (t1 /= t2) then
print *, "Iteration", i, "moved from thread", t1, "to", t2
end if
end do
!$omp end taskloop
!$omp end single
!$omp end parallel
end program
```
Compiled with
`flang -fc1 -emit-llvm -fopenmp -fopenmp-version=50 test-clause.f90 -o flang-test.ll`
This seems suspicious to me as we should either have the privateVarTypes listed, or not need to call this function.
https://github.com/llvm/llvm-project/pull/174386
More information about the Mlir-commits
mailing list