Skip to content

Commit 927a70d

Browse files
committed
Revert "[Flang OpenMP] Add LLVM translation support for UNTIED in Task (llvm#115283)"
This reverts commit 919aead. It breaks following LLVM bots: https://lab.llvm.org/buildbot/#/builders/199 https://lab.llvm.org/buildbot/#/builders/143 https://lab.llvm.org/buildbot/#/builders/17
1 parent a60050c commit 927a70d

File tree

6 files changed

+25
-47
lines changed

6 files changed

+25
-47
lines changed

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2867,7 +2867,6 @@ static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
28672867
!std::holds_alternative<clause::UseDevicePtr>(clause.u) &&
28682868
!std::holds_alternative<clause::InReduction>(clause.u) &&
28692869
!std::holds_alternative<clause::Mergeable>(clause.u) &&
2870-
!std::holds_alternative<clause::Untied>(clause.u) &&
28712870
!std::holds_alternative<clause::TaskReduction>(clause.u) &&
28722871
!std::holds_alternative<clause::Detach>(clause.u)) {
28732872
std::string name =
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s
2+
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s
3+
4+
!===============================================================================
5+
! `untied` clause
6+
!===============================================================================
7+
8+
! CHECK: not yet implemented: UNTIED clause is not implemented yet
9+
subroutine omp_task_untied()
10+
!$omp task untied
11+
call foo()
12+
!$omp end task
13+
end subroutine omp_task_untied

flang/test/Lower/OpenMP/task.f90

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -235,27 +235,10 @@ subroutine task_multiple_clauses()
235235
!$omp end task
236236
end subroutine task_multiple_clauses
237237

238-
!===============================================================================
239-
! `mergeable` clause
240-
!===============================================================================
241-
242238
subroutine task_mergeable()
243239
!CHECK: omp.task mergeable {
244240
!CHECK: omp.terminator
245241
!CHECK: }
246242
!$omp task mergeable
247243
!$omp end task
248244
end subroutine
249-
250-
!===============================================================================
251-
! `untied` clause
252-
!===============================================================================
253-
254-
!CHECK-LABEL: func.func @_QPomp_task_untied() {
255-
subroutine omp_task_untied()
256-
!CHECK: omp.task untied {
257-
!$omp task untied
258-
call foo()
259-
!CHECK: omp.terminator
260-
!$omp end task
261-
end subroutine omp_task_untied

mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ static LogicalResult checkImplementationStatus(Operation &op) {
258258
checkAllocate(op, result);
259259
checkInReduction(op, result);
260260
checkPriority(op, result);
261+
checkUntied(op, result);
261262
})
262263
.Case([&](omp::TaskgroupOp op) {
263264
checkAllocate(op, result);
@@ -267,10 +268,6 @@ static LogicalResult checkImplementationStatus(Operation &op) {
267268
checkDepend(op, result);
268269
checkNowait(op, result);
269270
})
270-
.Case([&](omp::TaskloopOp op) {
271-
// TODO: Add other clauses check
272-
checkUntied(op, result);
273-
})
274271
.Case([&](omp::WsloopOp op) {
275272
checkAllocate(op, result);
276273
checkLinear(op, result);

mlir/test/Target/LLVMIR/openmp-llvm.mlir

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3020,18 +3020,6 @@ module attributes {omp.is_target_device = true} {
30203020

30213021
// -----
30223022

3023-
llvm.func @omp_task_untied() {
3024-
// The third argument is 0: which signifies the united task
3025-
// CHECK: {{.*}} = call ptr @__kmpc_omp_task_alloc(ptr @1, i32 %{{.*}}, i32 0,
3026-
// CHECK-SAME: i64 40, i64 0, ptr @{{.*}})
3027-
omp.task untied {
3028-
omp.terminator
3029-
}
3030-
llvm.return
3031-
}
3032-
3033-
// -----
3034-
30353023
// Third argument is 5: essentially (4 || 1)
30363024
// signifying this task is TIED and MERGEABLE
30373025

mlir/test/Target/LLVMIR/openmp-todo.mlir

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,17 @@ llvm.func @task_priority(%x : i32) {
440440

441441
// -----
442442

443+
llvm.func @task_untied() {
444+
// expected-error@below {{not yet implemented: Unhandled clause untied in omp.task operation}}
445+
// expected-error@below {{LLVM Translation failed for operation: omp.task}}
446+
omp.task untied {
447+
omp.terminator
448+
}
449+
llvm.return
450+
}
451+
452+
// -----
453+
443454
llvm.func @taskgroup_allocate(%x : !llvm.ptr) {
444455
// expected-error@below {{not yet implemented: Unhandled clause allocate in omp.taskgroup operation}}
445456
// expected-error@below {{LLVM Translation failed for operation: omp.taskgroup}}
@@ -492,19 +503,6 @@ llvm.func @taskloop(%lb : i32, %ub : i32, %step : i32) {
492503

493504
// -----
494505

495-
llvm.func @taskloop_untied(%lb : i32, %ub : i32, %step : i32) {
496-
// expected-error@below {{not yet implemented: omp.taskloop}}
497-
// expected-error@below {{LLVM Translation failed for operation: omp.taskloop}}
498-
omp.taskloop untied {
499-
omp.loop_nest (%iv) : i32 = (%lb) to (%ub) step (%step) {
500-
omp.yield
501-
}
502-
}
503-
llvm.return
504-
}
505-
506-
// -----
507-
508506
llvm.func @taskwait_depend(%x: !llvm.ptr) {
509507
// expected-error@below {{not yet implemented: Unhandled clause depend in omp.taskwait operation}}
510508
// expected-error@below {{LLVM Translation failed for operation: omp.taskwait}}

0 commit comments

Comments
 (0)