@@ -5324,32 +5324,9 @@ convertTargetOpsInNest(Operation *op, llvm::IRBuilderBase &builder,
53245324 dyn_cast<omp::BlockArgOpenMPOpInterface>(oper))
53255325 forwardArgs (moduleTranslation, blockArgsIface);
53265326 else {
5327- // For non-BlockArgOpenMPOpInterface ops, we also want to map
5328- // their entry block arguments to their operands, if any. For the
5329- // current support in the OpenMP dialect, the table below lists
5330- // all ops that have arguments (SSA operands and/or attributes)
5331- // and not target-related. Of all these ops, we need to only
5332- // process `omp.atomic.update` since it is the only op that has
5333- // SSA operands & an attached region. Therefore, the region's
5334- // entry block arguments must be mapped to the op's operands in
5335- // case they are referenced inside the region.
5336- //
5337- // clang-format off
5338- // =============================================================================
5339- // | op | operands? | region(s)? | parent is func? | processed? |
5340- // =============================================================================
5341- // | atomic.read | yes | no | yes | no |
5342- // | atomic.write | yes | no | yes | no |
5343- // | atomic.update | yes | yes | yes | yes |
5344- // | critical | no | no | yes | no |
5345- // | declare_mapper | no | yes | no | no |
5346- // | declare_reduction | no | yes | no | no |
5347- // | flush | yes | no | yes | no |
5348- // | private | no | yes | yes | no |
5349- // | threadprivate | yes | no | yes | no |
5350- // | yield | yes | no | yes | no |
5351- // =============================================================================
5352- // clang-format on
5327+ // Here we map entry block arguments of
5328+ // non-BlockArgOpenMPOpInterface ops if they can be encountered
5329+ // inside of a function and they define any of these arguments.
53535330 if (isa<mlir::omp::AtomicUpdateOp>(oper))
53545331 for (auto [operand, arg] :
53555332 llvm::zip_equal (oper->getOperands (),
0 commit comments