@@ -152,23 +152,19 @@ class CanonicalizationOfOmp {
152
152
// Keep track of the loops to handle the end loop directives
153
153
llvm::SmallVector<parser::OpenMPLoopConstruct *> loops;
154
154
loops.push_back (&x);
155
- if (auto *innerConstruct{
156
- GetConstructIf<parser::OpenMPConstruct>(*nextIt)}) {
157
- if (auto *innerOmpLoop{
158
- std::get_if<parser::OpenMPLoopConstruct>(&innerConstruct->u )}) {
159
- auto &innerBeginDir{
160
- std::get<parser::OmpBeginLoopDirective>(innerOmpLoop->t )};
161
- auto &innerDir{std::get<parser::OmpLoopDirective>(innerBeginDir.t )};
162
- if (innerDir.v == llvm::omp::Directive::OMPD_tile) {
163
- auto &innerLoop = std::get<std::optional<
164
- common::Indirection<parser::OpenMPLoopConstruct>>>(
165
- loops.back ()->t );
166
- innerLoop = std::move (*innerOmpLoop);
167
- // Retrieveing the address so that DoConstruct or inner loop can be
168
- // set later.
169
- loops.push_back (&(innerLoop.value ().value ()));
170
- nextIt = block.erase (nextIt);
171
- }
155
+ if (auto *innerOmpLoop{GetOmpIf<parser::OpenMPLoopConstruct>(*nextIt)}) {
156
+ auto &innerBeginDir{
157
+ std::get<parser::OmpBeginLoopDirective>(innerOmpLoop->t )};
158
+ auto &innerDir{std::get<parser::OmpLoopDirective>(innerBeginDir.t )};
159
+ if (innerDir.v == llvm::omp::Directive::OMPD_tile) {
160
+ auto &innerLoop = std::get<
161
+ std::optional<common::Indirection<parser::OpenMPLoopConstruct>>>(
162
+ loops.back ()->t );
163
+ innerLoop = std::move (*innerOmpLoop);
164
+ // Retrieveing the address so that DoConstruct or inner loop can be
165
+ // set later.
166
+ loops.push_back (&(innerLoop.value ().value ()));
167
+ nextIt = block.erase (nextIt);
172
168
}
173
169
}
174
170
0 commit comments