@@ -97,7 +97,8 @@ struct IncrementLoopInfo {
97
97
bool isUnordered = false )
98
98
: loopVariableSym{&sym}, lowerExpr{Fortran::semantics::GetExpr (lower)},
99
99
upperExpr{Fortran::semantics::GetExpr (upper)},
100
- stepExpr{Fortran::semantics::GetExpr (step)}, isUnordered{isUnordered} {}
100
+ stepExpr{Fortran::semantics::GetExpr (step)}, isConcurrent{isUnordered} {
101
+ }
101
102
102
103
IncrementLoopInfo (IncrementLoopInfo &&) = default ;
103
104
IncrementLoopInfo &operator =(IncrementLoopInfo &&x) = default ;
@@ -120,7 +121,7 @@ struct IncrementLoopInfo {
120
121
const Fortran::lower::SomeExpr *upperExpr;
121
122
const Fortran::lower::SomeExpr *stepExpr;
122
123
const Fortran::lower::SomeExpr *maskExpr = nullptr ;
123
- bool isUnordered; // do concurrent, forall
124
+ bool isConcurrent;
124
125
llvm::SmallVector<const Fortran::semantics::Symbol *> localSymList;
125
126
llvm::SmallVector<const Fortran::semantics::Symbol *> localInitSymList;
126
127
llvm::SmallVector<
@@ -2317,11 +2318,11 @@ class FirConverter : public Fortran::lower::AbstractConverter {
2317
2318
bool genDoConcurrent = false ;
2318
2319
2319
2320
for (IncrementLoopInfo &info : incrementLoopNestInfo) {
2320
- genDoConcurrent = info.isStructured () && info.isUnordered ;
2321
+ genDoConcurrent = info.isStructured () && info.isConcurrent ;
2321
2322
2322
2323
if (!genDoConcurrent)
2323
2324
info.loopVariable = genLoopVariableAddress (loc, *info.loopVariableSym ,
2324
- info.isUnordered );
2325
+ info.isConcurrent );
2325
2326
2326
2327
if (!getLoweringOptions ().getIntegerWrapAround ()) {
2327
2328
iofBackup = builder->getIntegerOverflowFlags ();
@@ -2449,7 +2450,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
2449
2450
2450
2451
for (IncrementLoopInfo &info : llvm::reverse (incrementLoopNestInfo)) {
2451
2452
info.loopVariable = genLoopVariableAddress (loc, *info.loopVariableSym ,
2452
- info.isUnordered );
2453
+ info.isConcurrent );
2453
2454
}
2454
2455
2455
2456
builder->setInsertionPointToEnd (loopWrapperOp.getBody ());
@@ -2512,7 +2513,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
2512
2513
IncrementLoopInfo &info = *it;
2513
2514
if (info.isStructured ()) {
2514
2515
// End fir.do_concurent.loop.
2515
- if (info.isUnordered ) {
2516
+ if (info.isConcurrent ) {
2516
2517
builder->setInsertionPointAfter (info.loopOp ->getParentOp ());
2517
2518
continue ;
2518
2519
}
0 commit comments