@@ -137,23 +137,19 @@ class CanonicalizationOfOmp {
137
137
// Keep track of the loops to handle the end loop directives
138
138
llvm::SmallVector<parser::OpenMPLoopConstruct *> loops;
139
139
loops.push_back (&x);
140
- if (auto *innerConstruct{
141
- GetConstructIf<parser::OpenMPConstruct>(*nextIt)}) {
142
- if (auto *innerOmpLoop{
143
- std::get_if<parser::OpenMPLoopConstruct>(&innerConstruct->u )}) {
144
- auto &innerBeginDir{
145
- std::get<parser::OmpBeginLoopDirective>(innerOmpLoop->t )};
146
- auto &innerDir{std::get<parser::OmpLoopDirective>(innerBeginDir.t )};
147
- if (innerDir.v == llvm::omp::Directive::OMPD_tile) {
148
- auto &innerLoop = std::get<std::optional<
149
- common::Indirection<parser::OpenMPLoopConstruct>>>(
150
- loops.back ()->t );
151
- innerLoop = std::move (*innerOmpLoop);
152
- // Retrieveing the address so that DoConstruct or inner loop can be
153
- // set later.
154
- loops.push_back (&(innerLoop.value ().value ()));
155
- nextIt = block.erase (nextIt);
156
- }
140
+ if (auto *innerOmpLoop{GetOmpIf<parser::OpenMPLoopConstruct>(*nextIt)}) {
141
+ auto &innerBeginDir{
142
+ std::get<parser::OmpBeginLoopDirective>(innerOmpLoop->t )};
143
+ auto &innerDir{std::get<parser::OmpLoopDirective>(innerBeginDir.t )};
144
+ if (innerDir.v == llvm::omp::Directive::OMPD_tile) {
145
+ auto &innerLoop = std::get<
146
+ std::optional<common::Indirection<parser::OpenMPLoopConstruct>>>(
147
+ loops.back ()->t );
148
+ innerLoop = std::move (*innerOmpLoop);
149
+ // Retrieveing the address so that DoConstruct or inner loop can be
150
+ // set later.
151
+ loops.push_back (&(innerLoop.value ().value ()));
152
+ nextIt = block.erase (nextIt);
157
153
}
158
154
}
159
155
0 commit comments