@@ -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<
@@ -2293,11 +2294,11 @@ class FirConverter : public Fortran::lower::AbstractConverter {
2293
2294
bool genDoConcurrent = false ;
2294
2295
2295
2296
for (IncrementLoopInfo &info : incrementLoopNestInfo) {
2296
- genDoConcurrent = info.isStructured () && info.isUnordered ;
2297
+ genDoConcurrent = info.isStructured () && info.isConcurrent ;
2297
2298
2298
2299
if (!genDoConcurrent)
2299
2300
info.loopVariable = genLoopVariableAddress (loc, *info.loopVariableSym ,
2300
- info.isUnordered );
2301
+ info.isConcurrent );
2301
2302
2302
2303
if (!getLoweringOptions ().getIntegerWrapAround ()) {
2303
2304
iofBackup = builder->getIntegerOverflowFlags ();
@@ -2425,7 +2426,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
2425
2426
2426
2427
for (IncrementLoopInfo &info : llvm::reverse (incrementLoopNestInfo)) {
2427
2428
info.loopVariable = genLoopVariableAddress (loc, *info.loopVariableSym ,
2428
- info.isUnordered );
2429
+ info.isConcurrent );
2429
2430
}
2430
2431
2431
2432
builder->setInsertionPointToEnd (loopWrapperOp.getBody ());
@@ -2488,7 +2489,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
2488
2489
IncrementLoopInfo &info = *it;
2489
2490
if (info.isStructured ()) {
2490
2491
// End fir.do_concurent.loop.
2491
- if (info.isUnordered ) {
2492
+ if (info.isConcurrent ) {
2492
2493
builder->setInsertionPointAfter (info.loopOp ->getParentOp ());
2493
2494
continue ;
2494
2495
}
0 commit comments