[flang-commits] [flang] [llvm] [mlir] [MLIR][Flang][OpenMP] Make omp.simdloop into a loop wrapper (PR #87365)
Sergio Afonso via flang-commits
flang-commits at lists.llvm.org
Mon Apr 15 04:41:33 PDT 2024
================
@@ -521,7 +521,7 @@ struct OpWithBodyGenInfo {
/// \param [in] op - the operation the body belongs to.
/// \param [in] info - options controlling code-gen for the construction.
template <typename Op>
-static void createBodyOfOp(Op &op, OpWithBodyGenInfo &info) {
+static void createBodyOfOp(mlir::Operation &op, OpWithBodyGenInfo &info) {
----------------
skatrak wrote:
That's a good point, thanks for the suggestion. Since it uses the template argument to check for loop operations and also for `omp.parallel`, I thought an enum added to the `OpWithBodyGenInfo` structure could work well in this case. Let me know what you think about this solution.
I'd rather try to avoid queries on `op` here, like checking op traits, calling `isa()` or anything like this, because when lowering loops `op` is the `omp.loop_nest` rather than any wrapper operations.
https://github.com/llvm/llvm-project/pull/87365
More information about the flang-commits
mailing list