Skip to content

Commit e970f59

Browse files
authored
[flang][OpenMP] Reintroduce TODO for FIR lowering of linear clause (#144883)
Current design of the linear clause lowering and translation shifts all responsibility for handling the clause (like privatisation, linear stepping, finalisation, and emission of synchronisation barriers) to the IRBuilder. However in certain corner cases (like associated loops in or before OpenMP version 4.5), variables are are implicitly linear. This currently causes a problem with the existing linear clause implementation. Hence, re-introduce TODO on the linear clause until the linear clause lowering/translation are robust enough to handle such cases as well. Fixes #142935
1 parent 8650c80 commit e970f59

File tree

2 files changed

+2
-59
lines changed

2 files changed

+2
-59
lines changed

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,13 +1968,13 @@ static void genWsloopClauses(
19681968
llvm::SmallVectorImpl<const semantics::Symbol *> &reductionSyms) {
19691969
ClauseProcessor cp(converter, semaCtx, clauses);
19701970
cp.processNowait(clauseOps);
1971-
cp.processLinear(clauseOps);
19721971
cp.processOrder(clauseOps);
19731972
cp.processOrdered(clauseOps);
19741973
cp.processReduction(loc, clauseOps, reductionSyms);
19751974
cp.processSchedule(stmtCtx, clauseOps);
19761975

1977-
cp.processTODO<clause::Allocate>(loc, llvm::omp::Directive::OMPD_do);
1976+
cp.processTODO<clause::Allocate, clause::Linear>(
1977+
loc, llvm::omp::Directive::OMPD_do);
19781978
}
19791979

19801980
//===----------------------------------------------------------------------===//

flang/test/Lower/OpenMP/wsloop-linear.f90

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)